Install Developer Tools for Power Apps Code Apps — A Complete Setup Guide (PAC CLI)
Set up your environment for Power Apps Code apps step by step: install the developer tools (VS Code, git, .NET, Node.js and the Power Platform CLI), enable code apps on your Power Platform environment, understand what PAC CLI does, compare installation options and OS support, verify your install, connect to an environment, and manage authentication profiles.
Building Power Apps Code apps starts with a proper developer environment. This is a step-by-step setup guide: install the right tools, understand the Power Platform CLI (PAC CLI), pick the installation method that fits your OS, verify everything works, connect to your environment, and manage authentication profiles. Everything you need to set up your environment and start building modern code apps with confidence.
Install the developer tools
Code apps need a few developer tools available on the command line: Visual Studio Code (or your IDE of choice), git, .NET (dotnet), Node.js and npm, plus the Power Platform CLI to authenticate, manage and build. Install them and you’re ready to code.
- Visual Studio Code — a lightweight, powerful editor with rich extensions, debugging and Power Platform CLI integration.
- Node.js (LTS) & npm — the JavaScript runtime (built on Chrome’s V8 engine) and package manager required by modern dev tools and PAC CLI.
- git & .NET (dotnet) — also needed on the command line for source control and to install the CLI as a .NET tool.
- Power Apps CLI (PAC CLI) — the command line to authenticate, manage environments and solutions, and build code apps.
- Pro tip — keep tools on the latest LTS versions for better performance, security and compatibility.
Good to know: starting with the Power Apps client library for code apps v1.0.4+, the library ships an npm-based CLI for code apps that reduces prerequisites and will eventually replace the Power Platform CLI’s pac code commands (slated for deprecation in a future release). PAC CLI remains the tool for authentication, environments and solutions — this guide uses it throughout.
Enable code apps on your environment
Code apps must be turned on for a Power Platform environment before you can push an app to it. An admin enables the setting once, in the Power Platform admin center.
- Sign in to the Power Platform admin center (
admin.powerplatform.microsoft.com) as an admin. - Go to Manage > Environments and select the environment where you’ll use code apps.
- Open Settings, expand the Product subsection, and select Features.
- Find Power Apps code apps and turn on the Enable code apps toggle.
- Select Save.
- Who can do it — Power Platform admins and environment admins; the setting respects groups and rules set by Power Platform admins.
- At scale — use environment groups and rules to configure this setting for many environments at once.
- Licensing — end users who run code apps need a Power Apps Premium license.
What is PAC CLI?
The Microsoft Power Platform CLI (PAC CLI) is a single command-line tool that simplifies development and administration across the whole Power Platform — from environments and authentication to Dataverse, solutions, Power Pages, code components and automation.
- Environments & authentication — create and manage environments, and connect to multiple tenants.
- Dataverse & solutions — work with tables and solutions, and export/import solution packages.
- Power Pages & code components — build, manage and deploy sites and custom components.
- Automation & more — script repetitive tasks; the CLI keeps expanding with new capabilities.
Why developers need it
PAC CLI empowers developers to build, manage and automate Power Platform solutions efficiently — one CLI with endless possibilities.
- Build faster & automate — scaffold, build and deploy quickly, and automate ALM pipelines and repetitive tasks.
- Connect & manage everything — authenticate once and manage environments, solutions and connectors from the command line.
- Secure & productive — modern auth profiles, less manual work, and more time building great solutions.
- Work anywhere & collaborate — cross-platform support with standardized, team-friendly processes.
Installation options
You can install PAC CLI in three ways. Choose the one that fits your workflow — and you can even mix methods on the same computer.
- VS Code Extension — run PAC CLI inside the PowerShell terminal within VS Code. Best for developers who mainly work in VS Code.
- .NET Tool — run PAC CLI in PowerShell, CMD or Bash on Windows, Linux and macOS. Best for using it outside VS Code.
- Windows MSI — install globally on Windows and manage installed versions easily.
- Recommendation — install the VS Code Extension for the best experience.
OS support for PAC CLI
PAC CLI supports multiple operating systems. The right installation method depends on your OS — and a few commands are Windows-only.
- VS Code Extension — Windows, Linux and macOS (recommended).
- .NET Tool — Windows, Linux and macOS via PowerShell, CMD or Bash.
- Windows MSI — Windows only.
- Windows-only commands —
pac data,pac package deployandpac package showrequire the VS Code Extension or MSI.
Check your installation
Before you start building, verify that PAC CLI is installed correctly. On Windows use PowerShell; on macOS or Linux use a terminal.
- Windows — run
Get-Command pac | Format-Listin PowerShell to see the file path and version. - macOS & Linux — run
which pacto confirm the path (for example,~/.dotnet/tools/pac). - Check version — run
pac; the version appears on the second line. - Not recognized? — restart your terminal after installing.
- US sovereign cloud — PAC CLI supports GCC and GCC High; use the
--cloudparameter withpac auth create.
Connect to an environment
PAC CLI needs an authentication profile to connect to your Power Platform environment. Use pac auth create to connect and target exactly the right environment.
- Create a profile —
pac auth create --environment "HR-Dev"(use an Environment ID, URL, unique or partial name). - Helpful parameters —
--environmenttargets a specific environment;--deviceCodeenables device-code login for non-interactive environments. - Why connect — target the right environment, secure access, support multiple tenants, and boost productivity.
- No environment specified? — you connect to the default environment.
Manage authentication profiles
Work with multiple tenants or environments by creating and switching between profiles — no need to log in again each time.
- List all profiles —
pac auth listshows every profile; the*marks the active one. - Switch profiles —
pac auth select --index 2switches to a different profile by index. - Tips — give profiles meaningful names, switch before running commands, and keep your machine secure (profiles hold access tokens).
You’re all set — start building
With your tools installed and your environment connected, you’re ready to build, test and deploy amazing solutions with Power Apps Code apps. The tools are ready — the power is in your hands.
- Build powerful web apps using your favorite frameworks, and connect to 1,500+ connectors and data sources.
- Deploy securely on the managed Power Platform, and govern with your organization’s policies and security.
- Scale to enterprise-grade solutions that grow with your business.
Resources & limits: explore official samples and starter templates in the Power Apps Code Apps GitHub repository. A few current limitations to keep in mind: code apps aren’t supported in Power Apps for Windows, don’t support Power Platform Git integration or SharePoint forms integration, and service principals (SPNs) can’t create or own them.
The tools are ready. The power is in your hands. Build. Automate. Innovate. Transform.
Keywords: Power Apps Code, PAC CLI, Power Platform CLI, install PAC CLI, enable code apps, Power Platform admin center, Power Apps Premium license, VS Code, Node.js, git, dotnet, npm CLI, pac auth create, pac auth list, pac auth select, Power Platform developer tools, Dataverse, ALM, setup guide.
Share this:
Learn Microsoft 365 with new tutorials every week
Subscribe on YouTube and follow on LinkedIn for hands-on Power Platform, SharePoint, Copilot Studio, and Microsoft 365 guides.
Related articles
- Power Apps Code — React Project Structure Explained (PAC CLI)A folder-by-folder, file-by-file tour of a Power Apps Code (React + Vite + TypeScript) project scaffolded by the PAC CLI. What .power, node_modules, public, src and generated are for, what App.tsx, main.tsx, package.json and power.config.json do, and which files to leave alone.
- What Is Microsoft Power Fx? The Low-Code Language of the Power PlatformA plain-English introduction to Microsoft Power Fx — the Excel-like, low-code language behind Power Apps and the wider Power Platform. What it is, why it "thinks spreadsheet", how declarative formulas auto-recalculate, the no-code to pro-code spectrum, its design principles, and where you use it.
- Connect Power Apps Code Apps to Any Data Source — Dataverse, Azure SQL, SharePoint, Copilot Studio & MoreA complete developer guide to connecting Power Apps Code apps to any data source: Dataverse, Azure SQL, SharePoint, Copilot Studio agents, table metadata and REST APIs. See how to add each data source with PAC CLI, what each supports, how to choose the right one, and Microsoft best practices.