Add winappcli external plugin (#1674)

* Add winappcli external plugin

References microsoft/WinAppCli rel/v0.3.1 branch.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Address PR feedback: use source.ref and trim keywords

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* moving ref to stable branch

* removing skills doc and references

* minor changes in language

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Jaylyn Barbee
2026-05-14 21:07:32 -04:00
committed by GitHub
parent 0193383e4b
commit 9c54e98353
5 changed files with 58 additions and 204 deletions
+29
View File
@@ -707,6 +707,35 @@
"repo": "microsoft/What-I-Did-Copilot"
}
},
{
"name": "winappcli",
"description": "Windows app development, packaging, and distribution. Helps with creating Windows installers (MSIX), code signing, certificates, Windows SDK and Windows App SDK setup, package identity for Windows APIs (push notifications, background tasks, share target), appxmanifest authoring, and Microsoft Store distribution. Supports Electron, .NET, C++, Rust, Flutter, and Tauri apps.",
"version": "0.3.1",
"author": {
"name": "Microsoft",
"url": "https://github.com/microsoft/WinAppCli"
},
"homepage": "https://github.com/microsoft/WinAppCli",
"keywords": [
"windows",
"msix",
"packaging",
"installer",
"code-signing",
"appxmanifest",
"microsoft-store",
"electron",
"tauri",
"desktop-app"
],
"license": "MIT",
"repository": "https://github.com/microsoft/WinAppCli",
"source": {
"source": "github",
"repo": "microsoft/WinAppCli",
"ref": "stable"
}
},
{
"name": "winui",
"description": "Agents and skills for WinUI 3 app development. Create new WinUI 3 desktop apps, convert from other frameworks (WPF, WinForms, Electron, Tauri, Flutter) to WinUI 3, or add features to existing WinUI 3 applications. Includes MSIX packaging, code signing, UI automation testing, and Windows App SDK guidance.",
-1
View File
@@ -363,7 +363,6 @@ See [CONTRIBUTING.md](../CONTRIBUTING.md#adding-skills) for guidelines on how to
| [web-design-reviewer](../skills/web-design-reviewer/SKILL.md)<br />`gh skills install github/awesome-copilot web-design-reviewer` | This skill enables visual inspection of websites running locally or remotely to identify and fix design issues. Triggers on requests like "review website design", "check the UI", "fix the layout", "find design problems". Detects issues with responsive design, accessibility, visual consistency, and layout breakage, then performs fixes at the source code level. | `references/framework-fixes.md`<br />`references/visual-checklist.md` |
| [webapp-testing](../skills/webapp-testing/SKILL.md)<br />`gh skills install github/awesome-copilot webapp-testing` | Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs. | `assets/test-helper.js` |
| [what-context-needed](../skills/what-context-needed/SKILL.md)<br />`gh skills install github/awesome-copilot what-context-needed` | Ask Copilot what files it needs to see before answering a question | None |
| [winapp-cli](../skills/winapp-cli/SKILL.md)<br />`gh skills install github/awesome-copilot winapp-cli` | Windows App Development CLI (winapp) for building, packaging, signing, debugging, and UI-automating Windows applications. Use when asked to initialize Windows app projects, create MSIX packages, manage AppxManifest.xml or development certificates, run an app as packaged for debugging, automate Windows UI via Microsoft UI Automation, publish to the Microsoft Store, or access Windows SDK build tools. Covers commands like init, pack, run, unregister, manifest, cert, sign, store, ui, and tool. Supports .NET (csproj), C++, Electron, Rust, Tauri, Flutter, and other Windows frameworks. | `references/ui-json-envelope.md` |
| [winmd-api-search](../skills/winmd-api-search/SKILL.md)<br />`gh skills install github/awesome-copilot winmd-api-search` | Find and explore Windows desktop APIs. Use when building features that need platform capabilities — camera, file access, notifications, UI controls, AI/ML, sensors, networking, etc. Discovers the right API for a task and retrieves full type details (methods, properties, events, enumeration values). | `LICENSE.txt`<br />`scripts/Invoke-WinMdQuery.ps1`<br />`scripts/Update-WinMdCache.ps1`<br />`scripts/cache-generator` |
| [winui3-migration-guide](../skills/winui3-migration-guide/SKILL.md)<br />`gh skills install github/awesome-copilot winui3-migration-guide` | UWP-to-WinUI 3 migration reference. Maps legacy UWP APIs to correct Windows App SDK equivalents with before/after code snippets. Covers namespace changes, threading (CoreDispatcher to DispatcherQueue), windowing (CoreWindow to AppWindow), dialogs, pickers, sharing, printing, background tasks, and the most common Copilot code generation mistakes. | None |
| [workiq-copilot](../skills/workiq-copilot/SKILL.md)<br />`gh skills install github/awesome-copilot workiq-copilot` | Guides the Copilot CLI on how to use the WorkIQ CLI/MCP server to query Microsoft 365 Copilot data (emails, meetings, docs, Teams, people) for live context, summaries, and recommendations. | None |
+29
View File
@@ -334,5 +334,34 @@
"repo": "microsoft/win-dev-skills",
"path": "plugins/winui"
}
},
{
"name": "winappcli",
"description": "Windows app development, packaging, and distribution. Helps with creating Windows installers (MSIX), code signing, certificates, Windows SDK and Windows App SDK setup, package identity for Windows APIs (push notifications, background tasks, share target), appxmanifest authoring, and Microsoft Store distribution. Supports Electron, .NET, C++, Rust, Flutter, and Tauri apps.",
"version": "0.3.1",
"author": {
"name": "Microsoft",
"url": "https://github.com/microsoft/WinAppCli"
},
"homepage": "https://github.com/microsoft/WinAppCli",
"keywords": [
"windows",
"msix",
"packaging",
"installer",
"code-signing",
"appxmanifest",
"microsoft-store",
"electron",
"tauri",
"desktop-app"
],
"license": "MIT",
"repository": "https://github.com/microsoft/WinAppCli",
"source": {
"source": "github",
"repo": "microsoft/WinAppCli",
"ref": "stable"
}
}
]
-116
View File
@@ -1,116 +0,0 @@
---
name: winapp-cli
description: 'Windows App Development CLI (winapp) for building, packaging, signing, debugging, and UI-automating Windows applications. Use when asked to initialize Windows app projects, create MSIX packages, manage AppxManifest.xml or development certificates, run an app as packaged for debugging, automate Windows UI via Microsoft UI Automation, publish to the Microsoft Store, or access Windows SDK build tools. Covers commands like init, pack, run, unregister, manifest, cert, sign, store, ui, and tool. Supports .NET (csproj), C++, Electron, Rust, Tauri, Flutter, and other Windows frameworks.'
---
# Windows App Development CLI
`winapp` manages Windows SDKs, MSIX packaging, app identity, manifests, certificates, signing, store publishing, and UI automation for any framework targeting Windows (.NET/csproj, C++, Electron, Rust, Tauri, Flutter, etc.). Public preview — subject to change.
## Prerequisites
- Windows 10 or later
- Install via one of:
- WinGet: `winget install Microsoft.WinAppCli --source winget`
- npm (Electron/Node): `npm install @microsoft/winappcli --save-dev`
- CI: [`setup-WinAppCli`](https://github.com/microsoft/setup-WinAppCli) GitHub Action
- Manual: [GitHub Releases](https://github.com/microsoft/WinAppCli/releases/latest)
## Commands
| Command | Purpose |
| ------- | ------- |
| `init` | Initialize project: SDKs (`stable`/`preview`/`experimental`/`none`), manifest, `winapp.yaml`. **`.csproj` projects skip `winapp.yaml`** and use NuGet directly. **Does not auto-generate a cert** (v0.2.0+). |
| `restore` / `update` | Restore or update SDK package versions (`--setup-sdks preview` for preview SDKs). |
| `pack <dir>` | Build MSIX. Flags: `--generate-cert`, `--cert <pfx> --cert-password`, `--self-contained` (bundles WinAppSDK runtime), `--output`. Auto-discovers third-party WinRT components from `.winmd` (v0.2.1+). |
| `run <dir> [-- <app args>]` | Pack as loose layout and launch as packaged app — ideal for IDE F5 debugging without producing an MSIX. Supports `--` arg passthrough (v0.3.1+). (v0.3.0+) |
| `create-debug-identity <exe>` | Add sparse package identity to an exe so it can call identity-gated APIs (notifications, Windows AI, shell integration) without full packaging. |
| `unregister` | Remove sideloaded dev packages registered by `run` / `create-debug-identity`. |
| `manifest` | Generate `AppxManifest.xml`; supports placeholders and qualified names. `manifest update-assets <image>` generates all required icon sizes from one source (PNG **or SVG**, v0.2.1+). |
| `cert generate` / `install` / `info` | Manage dev certs. `cert info <pfx> --password <pwd>` shows subject/issuer/validity. `--export-cer` exports the public key. `--json` available on `generate` and `info`. (v0.2.1+) |
| `sign <target> --cert <pfx>` | Sign MSIX or exe; optional timestamp server. |
| `tool` | Run Windows SDK build tools with paths configured. |
| `store` | Run Microsoft Store Developer CLI for store submission/validation/publishing. |
| `create-external-catalog` | Generate `CodeIntegrityExternal.cat` for TrustedLaunch sparse packages. |
| `ui list-windows` / `inspect` / `click` / `search` / `wait-for` / `get-focused` | UI automation via Microsoft UI Automation. All support `--json`. **JSON envelopes for `inspect`, `get-focused`, `search`, and `wait-for` changed in v0.3.1** — see [`references/ui-json-envelope.md`](./references/ui-json-envelope.md) (other `ui` subcommands keep their pre-0.3.1 output). (v0.3.0+) |
| `node create-addon` / `add-electron-debug-identity` / `clear-electron-debug-identity` | Electron/Node helpers. All commands also exposed as typed JS/TS functions from `@microsoft/winappcli` (v0.2.1+). |
CI tip: pass `--no-prompt` to skip interactive prompts.
## Workflow
Standard init → package flow:
1. **Initialize the project** in your app folder. Sets up SDK refs, manifest, and `winapp.yaml` (`.csproj` projects skip the YAML and configure NuGet directly).
```bash
winapp init # add --no-prompt in CI
```
2. **Generate a dev signing certificate** — required for sideloading. `init` no longer creates one for non-`.csproj` projects (v0.2.0+). Pin the output path so later steps can reference it.
```bash
winapp cert generate --publisher "CN=My Company" --output ./mycert.pfx --install
```
3. **Build your app** with the framework's own toolchain (`dotnet build`, `npm run build`, `cargo build`, etc.).
4. **Package as MSIX**, signing with the cert from step 2.
```bash
winapp pack ./build-output --cert ./mycert.pfx --cert-password password --output MyApp.msix
```
5. **(Optional) Re-sign with a production cert** before distribution.
```bash
winapp sign MyApp.msix --cert ./prod.pfx --cert-password $env:CERT_PWD
```
6. **(Optional) Submit to the Microsoft Store** with `winapp store …` (wraps the Store Developer CLI).
### Alternate flows
- **Debug identity-gated APIs without packaging** (notifications, Windows AI, shell):
```bash
winapp create-debug-identity ./bin/MyApp.exe
./bin/MyApp.exe
```
- **Run as packaged app for IDE F5** (loose layout; app args after `--`):
```bash
winapp run ./bin/Debug/net10.0-windows10.0.26100.0/win-x64 \
--manifest ./appxmanifest.xml -- --my-flag value
```
- **Electron**:
```bash
npx winapp init
npx winapp node add-electron-debug-identity
npx winapp pack ./out --output MyElectronApp.msix
```
## Gotchas
- **`winapp ui --json` envelope reshaped in v0.3.1** — `ui inspect`, `ui get-focused`, `ui search`, and `ui wait-for` use new shapes; per-element `id` / `parentSelector` / `windowHandle` are removed (use `selector`). Full schemas in [`references/ui-json-envelope.md`](./references/ui-json-envelope.md).
- **`winapp init` no longer auto-generates a certificate** (v0.2.0+) — run `winapp cert generate` explicitly. The old `--no-cert` flag was removed.
- **`.csproj` projects skip `winapp.yaml`** — SDK packages live in the project file. Hybrid setups need adjustment.
- **NuGet global cache, not `%userprofile%/.winapp/packages`** (v0.2.0+) — scripts depending on the old folder will break.
- **Re-run `create-debug-identity` after any manifest change** — identity is bound at registration time.
## Troubleshooting
| Issue | Fix |
| ----- | --- |
| Certificate not trusted | `winapp cert install <pfx>` to add to local machine store |
| Identity-gated API fails | Re-run `create-debug-identity` after manifest changes |
| SDK not found | `winapp restore` or `winapp update` |
| `run` / `create-debug-identity` registration error `0x800704EC` | Developer Mode is off — enable it in **Settings → Privacy & security → For developers** (or `Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock' -Name AllowDevelopmentWithoutDevLicense -Value 1`), then retry |
| `run` / `create-debug-identity` registration error `0x80073CFB` | Package already registered with a conflicting identity — run `winapp unregister` (or `winapp unregister --force` if registered from a different project tree), then retry |
## References
- [winapp CLI repo](https://github.com/microsoft/WinAppCli) · [Full usage docs](https://github.com/microsoft/WinAppCli/blob/main/docs/usage.md) · [.NET guide](https://github.com/microsoft/WinAppCli/blob/main/docs/guides/dotnet.md) · [Samples](https://github.com/microsoft/WinAppCli/tree/main/samples)
- [Windows App SDK](https://learn.microsoft.com/windows/apps/windows-app-sdk/) · [MSIX overview](https://learn.microsoft.com/windows/msix/overview) · [Package identity overview](https://learn.microsoft.com/windows/apps/desktop/modernize/package-identity-overview)
@@ -1,87 +0,0 @@
# `winapp ui --json` envelope (v0.3.1+)
The `--json` output for the `winapp ui` command group was reshaped in v0.3.1.
Generate parsers against these shapes — pre-0.3.1 parsers will silently break
because most fields were renamed, removed, or moved into envelopes.
## `ui inspect --json`
Top-level shape (elements are now nested under `windows[]`, not flat):
```json
{
"depth": 0,
"interactive": false,
"hideDisabled": false,
"hideOffscreen": false,
"windows": [
{
"hwnd": "0x...",
"title": "...",
"className": "...",
"elementCount": 0,
"elements": [
{
"selector": "...",
"name": "...",
"controlType": "...",
"children": [ ... ]
}
]
}
]
}
```
Pre-0.3.1 the shape was `{ "elements": [...] }`. Per-element `id`, `depth`,
`parentSelector`, and `windowHandle` fields have been **removed**`selector`
is the public handle.
## `ui inspect --ancestors --json`
Ancestors are now nested as a parent → child chain keyed by `Depth=i`
(previously emitted as sibling roots).
## `ui inspect --interactive`
Non-interactive ancestors are collapsed and surfaced as `ancestorPath` on
surviving descendants. `+more` markers indicate truncated subtrees in both
text and JSON modes.
## `ui get-focused --json`
Always emits an envelope (never a bare value):
- No focus: `{ "hasFocus": false }`
- With focus: `{ "hasFocus": true, "element": { ... } }`
Pre-0.3.1 emitted bare `null` when nothing was focused.
## `ui search --json` / `ui wait-for --json`
Both commands return matching elements using the same element shape as
`ui inspect` (so `selector`, `name`, `controlType`, `children`, etc.).
Each match may also include an `invokableAncestor` field — itself an
element-shaped object — pointing to the nearest parent that supports
`InvokePattern` (useful when a search hits a non-invokable element
like a label inside a button).
```json
[
{
"selector": "btn-save-c3d4",
"name": "Save",
"controlType": "Button",
"children": [ ... ],
"invokableAncestor": {
"selector": "btn-save-c3d4",
"name": "Save",
"controlType": "Button"
}
}
]
```
The internal `id`, `parentSelector`, and `windowHandle` fields are
**scrubbed** from results — both at the top level and inside any nested
`invokableAncestor`. Don't depend on them; use `selector` as the handle.