# WinApp CLI — build, UI automation and packaging

[BASE product page](<https://base.akulich.dev/en/library/microsoft-winapp-cli/>) · [Resource](<https://github.com/microsoft/WinAppCli>)

ID: microsoft\-winapp\-cli · Language: en
Schema version: 1 · Data version: cbbe7123b47a5ae80983

This is editorial data. An unknown field neither confirms nor rules out a capability.
dataVersion is a dataset fingerprint, not evidence of a recent fact check.

Official CLI and examples for Windows development: project creation and launch, Windows API and WinUI control lookup, package identity, MSIX, and signing\. winapp ui commands give an agent verifiable interface states through Windows UI Automation\.

## Type

Windows development CLI

## Entry type

tool

## Separate catalog

No

## [Access conditions](<https://base.akulich.dev/en/library/microsoft-winapp-cli/#resource-access>)

free

## [What you can use for free](<https://base.akulich.dev/en/library/microsoft-winapp-cli/#resource-access>)

The CLI and examples are free and open source\.

## [Access and limitations](<https://base.akulich.dev/en/library/microsoft-winapp-cli/#resource-access>)

The CLI and examples are free and open source\. Commercial signing services, certificates, and app publication have their own terms\.

## [Use cases](<https://base.akulich.dev/en/library/microsoft-winapp-cli/#resource-tasks>)

- Build and run an app from the terminal through an edit — diagnose — check cycle\.
- Find an API from actual metadata or a WinUI control example\.
- Test elements, values, navigation, and dialogs in a Windows app\.
- Use official WPF, WinUI, \.NET, Win32, and other CLI integration examples\.
- Build and sign MSIX\.

## Platforms

- Windows

## Tech stack

- WinUI / XAML

## Category IDs

- apps
- quality
- infrastructure
- software

## Subcategory IDs

- apps\.windows
- apps\.winui
- quality\.testing
- infrastructure\.cicd
- software\.cli

## Tags

- MSIX
- CLI
- WinUI

## [Selection purpose](<https://base.akulich.dev/en/library/microsoft-winapp-cli/#resource-selection>)

Build and run an app from the terminal through an edit — diagnose — check cycle\.

## [Choose this when](<https://base.akulich.dev/en/library/microsoft-winapp-cli/#resource-selection>)

- Build and run an app from the terminal through an edit — diagnose — check cycle\.
- Find an API from actual metadata or a WinUI control example\.
- Test elements, values, navigation, and dialogs in a Windows app\.

## [Requirements](<https://base.akulich.dev/en/library/microsoft-winapp-cli/#resource-selection>)

- An unlocked interactive desktop is required for real\-input commands; touch/pen require a target\.

## [Limitations](<https://base.akulich.dev/en/library/microsoft-winapp-cli/#resource-selection>)

- Access terms: The CLI and examples are free and open source\. Commercial signing services, certificates, and app publication have their own terms\.
- Terms of use: MIT\.
- UI checks do not replace visual assessment of clipping, positioning, and themes\.
- Windows Sandbox has separate requirements\.
- UIA patterns and real OS input have different requirements; screenshots are not guaranteed in every headless workflow\.
- If the target moves between resolve and input, a targetMoved error may occur\.

## [Questions before use](<https://base.akulich.dev/en/library/microsoft-winapp-cli/#resource-faq>)

### What can you use for free in WinApp CLI — build, UI automation and packaging?

The CLI and examples are free and open source\.

### What are the access terms for WinApp CLI — build, UI automation and packaging?

The CLI and examples are free and open source\. Commercial signing services, certificates, and app publication have their own terms\.

### What terms of use matter for WinApp CLI — build, UI automation and packaging?

MIT\.

### Which environment can you use WinApp CLI — build, UI automation and packaging in?

Tech stack: WinUI / XAML\. Environment: Windows\.

### How do you get started with WinApp CLI — build, UI automation and packaging?

Check the workflow against the released CLI version and build the project\. Run the application and perform the required action through its available controls\. Compare automated states with the visual appearance and investigate diagnostics\.

### What should you consider when choosing WinApp CLI — build, UI automation and packaging?

Public Preview; main may differ from the released version\. UI Automation depends on accessible controls and stable AutomationId values; input actions require an unlocked interactive desktop\.

### Which WinApp UI commands suit CI, and which require an unlocked desktop?

UIA pattern operations inspect/search/get/set value/invoke are intended for headless or locked\-desktop workflows\. click/hover/drag and send\-input/send\-keys send real OS input and require an unlocked interactive desktop and a foreground target; otherwise no\_interactive\_desktop may occur\. For CI, the documentation recommends patterns\. Screenshots and some capture operations may also require an interactive session\.

## Sources for the selection guide

- [https://github\.com/microsoft/WinAppCli/blob/main/README\.md](<https://github.com/microsoft/WinAppCli/blob/main/README.md>)
- [https://github\.com/microsoft/WinAppCli/blob/main/docs/ui\-automation\.md](<https://github.com/microsoft/WinAppCli/blob/main/docs/ui-automation.md>)
- [https://github\.com/microsoft/WinAppCli/blob/main/LICENSE](<https://github.com/microsoft/WinAppCli/blob/main/LICENSE>)
- [https://github\.com/microsoft/win\-dev\-skills/blob/main/README\.md](<https://github.com/microsoft/win-dev-skills/blob/main/README.md>)
- [https://developers\.openai\.com/codex/windows](<https://developers.openai.com/codex/windows>)
- [https://raw\.githubusercontent\.com/microsoft/WinAppCli/HEAD/README\.md](<https://raw.githubusercontent.com/microsoft/WinAppCli/HEAD/README.md>)
- [https://raw\.githubusercontent\.com/microsoft/WinAppCli/HEAD/docs/ui\-automation\.md](<https://raw.githubusercontent.com/microsoft/WinAppCli/HEAD/docs/ui-automation.md>)
- [https://raw\.githubusercontent\.com/microsoft/WinAppCli/HEAD/LICENSE](<https://raw.githubusercontent.com/microsoft/WinAppCli/HEAD/LICENSE>)

## [Possible workflow](<https://base.akulich.dev/en/library/microsoft-winapp-cli/#resource-scenario>)

Example workflow with WinApp CLI — build, UI automation and packaging: Build and run an app from the terminal through an edit — diagnose — check cycle\.

A possible workflow; this is not a report of hands-on testing.

## Before you start

- A Windows project and one change to build and test\.
- The appropriate CLI version and an interactive environment for UI Automation\.

## Steps

1. Check the workflow against the released CLI version and build the project\.
2. Run the application and perform the required action through its available controls\.
3. Compare automated states with the visual appearance and investigate diagnostics\.

## Check your result

- Build and launch are confirmed; controls have stable AutomationId values for the chosen workflow\.
- An unlocked desktop is available for actions; UI Automation is supplemented by visual checks\.

## [License](<https://base.akulich.dev/en/library/microsoft-winapp-cli/#resource-license>)

MIT\.

## License explanations for the specified scope

### MIT — permissive license

You can use, modify, distribute, and sell the code, including in a closed\-source commercial product\. When sharing copies or substantial portions of the code, retain the license text and copyright notice\. You do not need to open\-source your entire project; the author provides no warranties\.

[License terms](<https://opensource.org/license/mit>)

## [Usage details](<https://base.akulich.dev/en/library/microsoft-winapp-cli/#resource-notes>)

Public Preview; main may differ from the released version\. UI Automation depends on accessible controls and stable AutomationId values; input actions need an unlocked interactive desktop\. UI checks do not replace visual assessment of clipping, layout, and themes\. Windows Sandbox has separate requirements\.

## [Sources](<https://base.akulich.dev/en/library/microsoft-winapp-cli/#resource-sources>)

- [Documentation](<https://github.com/microsoft/WinAppCli/blob/main/README.md>)
- [Documentation](<https://github.com/microsoft/WinAppCli/blob/main/docs/ui-automation.md>)
- [License](<https://github.com/microsoft/WinAppCli/blob/main/LICENSE>)
- [Documentation](<https://github.com/microsoft/win-dev-skills/blob/main/README.md>)
- [Documentation](<https://developers.openai.com/codex/windows>)
- [Official source](<https://raw.githubusercontent.com/microsoft/WinAppCli/HEAD/README.md>)
- [Official source](<https://raw.githubusercontent.com/microsoft/WinAppCli/HEAD/docs/ui-automation.md>)
- [Official source](<https://raw.githubusercontent.com/microsoft/WinAppCli/HEAD/LICENSE>)

## Editorial review date

2026\-10\-03

## Editorial review scope

Purpose and published terms were reviewed against the cited primary sources\. This product page does not confirm execution or testing in every environment\.

Dates refer to the stated editorial review, not hands-on testing, a product update, or a recent review of all sources.
