Microsoft Windows App Development CLI tool now in version 0.6.0
Posted: (EET/GMT+2)
Microsoft's Windows App Development CLI, or winapp, is a command-line tool for
building, running, packaging, and signing Windows applications.
The just announced version 0.6.0 is especially interesting for WinUI developers, because it can now create new WinUI applications from the command line.
Install the tool with WinGet:
winget install Microsoft.WinAppCLI
After installation, check that the command is available:
winapp --help
To list available WinUI templates:
winapp new --list
Create a new blank WinUI 3 application:
winapp new --name MyApp
Or start from a richer template:
winapp new --name MyApp --template winui-navview winapp new --name MyApp --template winui-mvvm
The available templates include options such as a blank WinUI app, NavigationView, TabView, MVVM starter, class library, and a packaged unit-test app. Once the application exists, run it from the project folder:
winapp run
Or point directly to a project file:
winapp run .\src\MyApp\MyApp.csproj
You can also pass familiar build options:
winapp run . -c Release -r win-arm64
Another useful command is find-ui. It searches WinUI examples and returns code
samples without leaving the terminal.
winapp find-ui "tabbed layout"
To narrow the search to Windows Community Toolkit samples:
winapp find-ui "settings card" --source toolkit
And to fetch a specific sample:
winapp find-ui --id gallery-tabview-1
For build pipelines, signing is also becoming interesting. Version 0.6.0 includes az-sign for signing with Azure Trusted Signing. For example:
winapp az-sign .\app.msix
For CI/CD, specify the Azure resources explicitly:
winapp az-sign .\app.msix ^
--subscription <sub-id> ^
--resource-group <rg> ^
--account <account> ^
--profile <profile>
This avoids storing a local PFX certificate on the build machine.
Good use cases for winapp include:
- creating new WinUI applications from the terminal
- running packaged and unpackaged Windows apps
- finding WinUI control examples quickly
- creating package identity for existing desktop apps
- packaging and signing MSIX outputs
- making Windows app workflows easier for scripts and agents.
Note that this new CLI tool does not replace understanding WinUI, MSIX, or Windows App SDK packaging. But it does make many common setup and packaging tasks easier to repeat.
For developers who like command-line workflows, winapp is worth trying. It brings
more of the Windows desktop development lifecycle into the same style of tooling we already use with dotnet, git, and az.
Happy WinUI hacking!