Edit

Windows App Development CLI (winapp CLI)

Important

The Windows App Development CLI is currently in public preview. Features and commands may change before the final release. Share your feedback by creating an issue.

The Windows App Development CLI (winapp CLI) is a command-line tool for building Windows apps with the framework you choose. It works from a terminal, the editor you prefer, or an AI coding agent.

  • WinUI apps: create, run, debug, test, and package WinUI apps without opening Visual Studio.
  • Cross-platform and other frameworks: bring Windows features to your existing Electron, Flutter, Tauri, Rust, .NET, or C++ app without changing frameworks. winapp CLI sets up the Windows App SDK and Windows SDK, gives your app package identity so you can call APIs like notifications and on-device AI, and packages it as MSIX for the Microsoft Store or your own distribution.

Key benefits of winapp CLI

A command prompt icon on a raised tile over a blue pixel wave

Create and run WinUI apps from the terminal
winapp new creates a WinUI app from the official templates, including blank, NavigationView, TabView, and MVVM starters. winapp run builds the project, installs the matching Windows App Runtime, and launches the app, whether it's packaged or unpackaged.
Build your first WinUI app

A bug icon on a raised tile over a diagonal band of blue pixels

Debug with package identity and crash diagnostics
Run your app with package identity so you can test notifications, on-device AI, and other APIs that require identity. Add --debug-output to capture debug messages and crash dumps. For WinUI crashes, winapp decodes stowed exceptions to point you at the XAML event handler that failed.
Debugging with package identity

A chat bubble with sparkles icon on a raised tile over a blue pixel wave

Ground AI coding agents in real WinUI code
winapp find-ui returns working XAML and C# from the WinUI 3 Gallery and the Windows Community Toolkit. winapp find-api inspects the Windows Runtime APIs your project references. Agents use them to generate code from real samples and metadata instead of guessing.
Use winapp CLI with AI agents

A pointer and touch icon on a raised tile over a diagonal band of blue pixels

Automate and test your app's UI
winapp ui inspects and interacts with running apps through UI Automation, and captures screenshots and recordings. Run your app in Windows Sandbox to test it in a clean environment.
UI automation

A package icon on a raised tile over a blue pixel wave

Package, sign, and ship
winapp pack builds your project, packages it as MSIX, and signs it in one step. Generate development certificates locally, sign release builds with Azure Trusted Signing, and install winapp CLI on GitHub Actions or Azure DevOps runners.
Package your app

A puzzle piece icon on a raised tile over a diagonal band of blue pixels

Bring Windows features to any framework
Add the Windows SDK and Windows App SDK, package identity, and MSIX packaging to apps built with .NET, C++, Electron, Flutter, Rust, or Tauri, without changing your build system.
See supported frameworks

Get started with WinUI

After you install winapp CLI and the .NET SDK, create and run a WinUI app:

winapp new --name MyWinUIApp --template winui-navview --use-defaults
cd MyWinUIApp
winapp run

When you're ready to test a package locally, generate a development certificate and create a signed MSIX package:

winapp cert generate --manifest ./Package.appxmanifest
winapp pack ./MyWinUIApp.csproj -c Release --cert ./devcert.pfx

The development certificate uses a default password and is for local testing only. Before you distribute your app, sign it with a trusted certificate, for example with winapp az-sign. For more information, see Security.

For a step-by-step walkthrough that includes setup and your first UI change, see Build your first WinUI app. To see all available templates, run winapp new --list. For the complete workflow, including debugging, UI automation, and packaging, see Using winapp CLI with WinUI.

Installation

WinGet

The easiest way to install the CLI is via WinGet (Windows Package Manager):

winget install Microsoft.winappcli --source winget

If you use the WinGet PowerShell module, run Install-WinGetPackage Microsoft.winappcli instead.

NPM

For Electron projects, install via NPM:

npm install @microsoft/winappcli --save-dev

GitHub Actions / Azure DevOps

For CI/CD pipelines, use the setup-WinAppCli action to automatically install the CLI on your runners/agents.

Manual download

Download the latest build from GitHub Releases.

Verify installation

Once installed, verify the installation by calling the CLI:

winapp --help

Or if using Electron/Node.js:

npx winapp --help

Use winapp CLI with AI agents

winapp CLI is designed to work well with AI coding agents. Commands such as find-ui and find-api return machine-readable output with --json, so an agent can look up real WinUI samples and Windows Runtime APIs before it writes code.

Install the winapp plugin to give your agent skills for the winapp CLI workflow:

# GitHub Copilot CLI
copilot plugin install microsoft/WinAppCli

# Claude Code
claude plugin marketplace add microsoft/WinAppCli
claude plugin install winappcli@winappcli

If you work in Visual Studio Code, the WinApp VS Code extension runs winapp CLI commands from the editor and launches your app with package identity when you press F5. Install it from the Visual Studio Marketplace.

Supported frameworks

winapp CLI works with WinUI and other app frameworks:

Framework Guide
WinUI Get started with WinUI
.NET / WPF / WinForms Get started with .NET
.NET MAUI Get started with .NET MAUI
C++ (CMake) Get started with C++
Electron Get started with Electron
Rust Get started with Rust
Tauri Get started with Tauri
Flutter Get started with Flutter

Additional guides:

  • Packaging an EXE/CLI: step-by-step guide for packaging an existing EXE/CLI as MSIX
  • Sparse packaging: give an unpackaged app package identity with an identity-only (sparse) MSIX and external content
  • Shell Completion: enable tab completion for commands, options, and values in PowerShell, bash, zsh, and fish
  • Security guidance: what development certificates and Developer Mode change on your machine, how to handle devcert.pfx, and how to sign for production

Commands overview

Category Commands
Create & set up new, init, restore, update
Run & debug run, create-debug-identity, embed-identity, unregister
Packaging pack
Manifests manifest generate, manifest update-assets, manifest add-alias
Certificates & Signing cert generate, cert install, sign, az-sign, create-external-catalog
Code search for agents find-ui, find-api
UI automation & Sandbox ui, target
Utilities tool, store, get-winapp-path, complete
Node.js/Electron node create-addon, node generate-bindings, node add-electron-debug-identity, node clear-electron-debug-identity

For the full CLI reference, see CLI reference.

Samples

The samples folder on GitHub has a runnable project for each supported framework:

Sample Description
WinUI app Packaged WinUI app registered and launched with winapp run
WinUI unpackaged app Unpackaged WinUI app launched with winapp run
WinUI solution Multi-project solution (app and test project) that shows how winapp run selects the app project
C++ WinUI app WinUI window built in C++ with CMake, without XAML or MSBuild
WPF app WPF desktop app
.NET MAUI app .NET MAUI Windows project packaged and signed with winapp CLI
C++ app Native C++ Win32 app built with CMake
Electron Electron Forge app with a manifest, assets, and native C++ and C# addons
Rust app Rust app that calls Windows APIs
Tauri app Tauri app with a Rust backend
Flutter app Flutter desktop app with package identity and the Windows App SDK
Sparse app WPF app with sparse packaging (identity-only MSIX) and an installer

Why package identity?

Many Windows APIs require your app to have package identity. With identity, your app gains access to features like notifications, OS integration, and on-device AI. WinUI app templates include a package manifest, so winapp run gives them identity by default. For a full list of what package identity unlocks and help choosing the right packaging model, see Packaging overview.

Open source

winapp CLI is open source. You can find the source code, file issues, and contribute on GitHub. For help, see Support.