# How do I initialize and run a Power Apps code app locally?

Exam: AB-400 — Power Platform Developer Associate
Knowledge domain: Extend the user experience (25–30%)
Updated: 2026-11-25T06:47:18.096472+00:00
HTML: https://learningpathx.com/faq/AB-400/ab400-initialize-and-run-power-apps-code-app.html

## Also asked as

- Which CLI do I use to create a code app and open Local Play?
- How can I verify my code app is initialized in the intended Power Platform environment?

Use the **Power Apps CLI** `pa` from the approved starter's project root. Initialize the app in an environment where code apps are enabled, then open its Local Play address from a browser profile signed into the intended Power Platform tenant.

With Node.js LTS, npm, Git and Microsoft's Vite starter, the documented setup is:

```shell
npm install --global @microsoft/power-apps-cli
npm install --global @microsoft/power-apps
npm install
pa app init
pa app run
```

Review the starter's dependency versions as well as the globally installed tooling. Sign in when prompted, select the intended development environment and inspect the resulting project configuration. Allow browser local network access if the Local Play workflow requires it. Verify that the blank app loads in the correct tenant before adding live data connections. Microsoft Power Platform CLI `pac` remains a separate tool used for tasks such as PCF development.

[Code app CLI quickstart](https://learn.microsoft.com/en-us/power-apps/developer/code-apps/how-to/create-an-app-from-scratch) · [Code app requirements](https://learn.microsoft.com/en-us/power-apps/developer/code-apps/overview)

Source: [AB-400: Building Code Apps with Dataverse and Automation](https://learningpathx.com/news/ab-400-building-code-apps-with-dataverse-and-automation.html)
