BASE

WinApp CLI — build, UI automation and packaging

WinApp CLI — build, UI automation and packaging

Windows development CLI · Free

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.

Resource illustration: WinApp CLI — build, UI automation and packaging

Open resource ↗

What you can use for free

The CLI and examples are free and open source.

Access and limitations

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

Use cases

  • 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.

Example workflow

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

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

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.

Choosing WinApp CLI — build, UI automation and packaging

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

Choose this when

  • 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

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

Things to consider

  • 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.

Frequently asked questions

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.

Related tasks and approaches

Platforms

  • Windows

Tech stack

  • WinUI / XAML

License

MIT.

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

Usage details

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.

Technologies and topics

  • MSIX
  • CLI
  • WinUI

Sources

Other resources