npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@microsoft/power-apps-cli

v0.6.7

Published

CLI for PowerApps

Readme

@microsoft/power-apps-cli

A command-line interface for managing Power Apps code apps. This CLI enables you to initialize, develop, and publish Code Apps directly from your terminal.

Note: This CLI is designed to be used alongside the @microsoft/power-apps package. It is generally not recommended to install this package separately. When you install @microsoft/power-apps, this CLI is included automatically.

Installation

npm install @microsoft/power-apps-cli

After installation, run commands using:

npx power-apps <command>

Usage

You can use the CLI in two ways:

  1. Pass options directly: Provide all required options as command-line arguments.

    npx power-apps init --displayName "My App" --environmentId abc-123
  2. Interactive prompts: Simply run a command without options, and the CLI will prompt you for any required information.

    npx power-apps init
    # The CLI will interactively ask for display name, environment ID, etc.

Configuration

The CLI reads configuration from your power.config.json file:

  • environmentId - Required. The environment ID to connect to. If a config file is not present yet, the CLI will prompt you to provide one.
  • region - The cloud instance region. If a config file is not present yet, defaults to prod.

Global Options

| Option | Alias | Description | | ----------------- | ----- | ----------------------------------------------------- | | --region | -r | Cloud instance region to use (e.g., prod, test, etc.) | | --environmentId | -e | Environment ID to connect to | | --help | -h | Display help for a command | | --version | -v | Output the current version |

Commands

init

Initialize a new Power Apps code app.

npx power-apps init [options]

Options:

| Option | Alias | Description | Default | | ------------------ | ----- | ----------------------------------------------------- | ----------------------- | | --environmentId | -e | Environment ID to connect to | | | --region | -r | Cloud instance region to use (e.g., prod, test, etc.) | prod | | --displayName | -n | Display name for the app | | | --description | -d | App description | (empty) | | --buildPath | -b | Build output path | ./dist | | --fileEntryPoint | -f | Entry point file for the app | index.html | | --appUrl | -a | Local URL where the app is hosted | http://localhost:3000 | | --logoPath | -l | Path to the app logo file | Default |


run

Run the code app locally for development.

npx power-apps run [options]

Options:

| Option | Alias | Description | Default | | --------------- | ----- | --------------------------------- | ----------------------- | | --port | -p | Port number for the local server | 8080 | | --localAppUrl | -l | Local URL where the app is hosted | http://localhost:3000 |


push

Push the code app to the Power Apps environment.

npx power-apps push [options]

Options:

| Option | Alias | Description | | -------------- | ----- | ------------------------------------- | | --solutionId | -s | Solution name or ID to add the app to |


add-data-source

Add a data source to the current Power Apps code app.

npx power-apps add-data-source [options]

Options:

| Option | Alias | Description | | ---------------------- | ----- | ------------------------- | | --apiId | -a | API identifier | | --connectionId | -c | Connection identifier | | --connectionRef | -cr | Connection reference name | | --resourceName | -t | Table or resource name | | --dataset | -d | Dataset identifier | | --orgUrl | -u | Organization URL | | --sqlStoredProcedure | -sp | SQL stored procedure name | | --solutionId | -s | Solution identifier |


delete-data-source

Remove a data source from the Power Apps code app.

npx power-apps delete-data-source [options]

Options:

| Option | Alias | Description | | ---------------------- | ----- | ---------------------------------------------- | | --apiId | -a | API identifier associated with the data source | | --dataSourceName | -n | Data source or table name to remove | | --sqlStoredProcedure | -sp | SQL stored procedure name to remove |


list-codeapps

List all code apps in the environment.

npx power-apps list-codeapps

list-connection-references

List all connection references in the environment.

npx power-apps list-connection-references [options]

Options:

| Option | Alias | Description | | -------------- | ----- | -------------------------------- | | --solutionId | -s | Solution identifier to filter by | | --orgUrl | -u | Organization URL |


list-datasets

List all datasets for a connection.

npx power-apps list-datasets [options]

Options:

| Option | Alias | Description | | ---------------- | ----- | --------------------- | | --apiId | -a | API identifier | | --connectionId | -c | Connection identifier |


list-tables

List all tables for a dataset.

npx power-apps list-tables [options]

Options:

| Option | Alias | Description | | ---------------- | ----- | --------------------- | | --apiId | -a | API identifier | | --connectionId | -c | Connection identifier | | --dataset | -d | Dataset name |


list-sqlStoredProcedures

List all SQL stored procedures for a dataset.

npx power-apps list-sqlStoredProcedures [options]

Options:

| Option | Alias | Description | | ---------------- | ----- | --------------------- | | --connectionId | -c | Connection identifier | | --dataset | -d | Dataset name |


list-environment-variables

List all environment variables in the environment.

npx power-apps list-environment-variables [options]

Options:

| Option | Alias | Description | | ---------- | ----- | ---------------- | | --orgUrl | -u | Organization URL |


telemetry

Manage telemetry settings.

npx power-apps telemetry [options]

Options:

| Option | Description | | ------------------- | ----------------------------------------------------- | | --enable | Enable telemetry | | --disable | Disable telemetry | | --showSettings | Show current telemetry settings | | --consoleOnly | Output telemetry to console only | | --outputToConsole | Output telemetry to console in addition to sending it |


logout

Log out the current user.

npx power-apps logout

Getting Help

To see help for any command, use the --help flag:

# Global help
npx power-apps --help

# Command-specific help
npx power-apps init --help
npx power-apps add-data-source --help

License

Copyright (C) Microsoft Corporation. All rights reserved.