Install Developer Tools for Power Apps Code Apps — A Complete Setup Guide (PAC CLI)

Suresh Girinathuni6 min read
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.

Tools you need for Power Apps Code apps: Visual Studio Code (your IDE of choice), Node.js LTS version, and Power Apps CLI (PAC CLI), with a pro tip to keep tools updated
  • 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.

Enable code apps on a Power Platform environment: in the Power Platform admin center go to Manage, Environments, select the environment, Settings, Product, Features, and turn on the Enable code apps toggle, then Save; end users need a Power Apps Premium license
  1. Sign in to the Power Platform admin center (admin.powerplatform.microsoft.com) as an admin.
  2. Go to Manage > Environments and select the environment where you’ll use code apps.
  3. Open Settings, expand the Product subsection, and select Features.
  4. Find Power Apps code apps and turn on the Enable code apps toggle.
  5. 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.

What PAC CLI helps you do: environment lifecycle, authentication, Dataverse operations, solution packages, Power Pages, code components, automation and more — and why it matters
  • 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.

Why developers need PAC CLI: build faster, connect easily, manage everything, automate tasks, secure by design, improve productivity, work anywhere and team collaboration
  • 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.

Three ways to install PAC CLI: Visual Studio Code extension, .NET tool, and Windows MSI, each with OS support and best-for guidance
  1. VS Code Extension — run PAC CLI inside the PowerShell terminal within VS Code. Best for developers who mainly work in VS Code.
  2. .NET Tool — run PAC CLI in PowerShell, CMD or Bash on Windows, Linux and macOS. Best for using it outside VS Code.
  3. Windows MSI — install globally on Windows and manage installed versions easily.
  4. 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.

OS support for PAC CLI: VS Code extension and .NET tool run on Windows, Linux and macOS; Windows MSI is Windows only; some 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 commandspac data, pac package deploy and pac package show require 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.

Check PAC CLI installation on Windows with Get-Command pac in PowerShell and pac to see the version, plus US sovereign cloud availability
  • Windows — run Get-Command pac | Format-List in PowerShell to see the file path and version.
  • macOS & Linux — run which pac to 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 --cloud parameter with pac 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.

Connect to a Power Platform environment with pac auth create --environment, why you should connect, and a success message confirming the connection
  • Create a profilepac auth create --environment "HR-Dev" (use an Environment ID, URL, unique or partial name).
  • Helpful parameters--environment targets a specific environment; --deviceCode enables 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.

Manage PAC CLI authentication profiles: list all profiles with pac auth list, switch with pac auth select --index, an example profile table, and tips
  • List all profilespac auth list shows every profile; the * marks the active one.
  • Switch profilespac auth select --index 2 switches 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.

You're all set to start building Power Apps Code apps: build, connect, deploy, govern and scale, with a call to action to build the future
  • 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:

#Power Apps Code#PAC CLI#Power Platform CLI#Power Apps#Power Platform#VS Code#Node.js#Developer Tools#Pro-Code#Dataverse#ALM#Microsoft 365

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