Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/plugin/agents/winapp.agent.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: winapp
description: Expert in Windows app development, packaging, and distribution. Activate for ANY task involving packaging apps for Windows, creating Windows installers (MSIX), code signing Windows apps, Windows SDK setup, Windows App SDK, Windows API access (push notifications, background tasks, share target, startup tasks), creating or editing appxmanifest.xml, generating certificates for Windows apps, or distributing apps through the Microsoft Store. Covers all app frameworks including Electron, .NET (WPF, WinForms), C++, Rust, Flutter, and Tauri. Uses the winapp CLI tool.
description: Expert in Windows app development, packaging, and distribution. Activate for ANY task involving packaging apps for Windows, creating Windows installers (MSIX), code signing Windows apps, Windows SDK setup, Windows App SDK, Windows API access (push notifications, background tasks, share target, startup tasks), creating or editing appxmanifest.xml, generating certificates for Windows apps, distributing apps through the Microsoft Store, adding execution aliases or file type associations, or adding MSIX packaging to build scripts or CI/CD pipelines. Covers all app frameworks including Electron, .NET (WPF, WinForms), C++, Rust, Flutter, and Tauri. Uses the winapp CLI tool.
infer: true
---

Expand Down
8 changes: 8 additions & 0 deletions .github/plugin/skills/winapp-cli/frameworks/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,11 @@ C++ projects use winapp primarily for SDK projections (CppWinRT headers) and pac
- Tauri has its own bundler for `.msi` installers
- Use winapp specifically for **MSIX distribution** and package identity features
- winapp adds capabilities beyond what Tauri's built-in bundler provides (identity, sparse packages, Windows API access)

## Related skills
- **Setup**: `winapp-setup` — initial project setup with `winapp init`
- **Manifest**: `winapp-manifest` — creating and customizing `appxmanifest.xml`
- **Signing**: `winapp-signing` — certificate generation and management
- **Packaging**: `winapp-package` — creating MSIX installers from build output
- **Identity**: `winapp-identity` — enabling package identity for Windows APIs during development
- Not sure which command to use? See `winapp-troubleshoot` for a command selection flowchart
6 changes: 6 additions & 0 deletions .github/plugin/skills/winapp-cli/identity/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ After running, launch your exe normally — Windows will recognize it as having
- If you have both a debug identity and an installed MSIX, they may conflict — use `--keep-identity` carefully
- For Electron apps, use `npx winapp node add-electron-debug-identity` instead (handles Electron-specific paths)

## Related skills
- Need a manifest? See `winapp-manifest` to generate `appxmanifest.xml`
- Need a certificate? See `winapp-signing` — a trusted cert is required for identity registration
- Ready for full MSIX distribution? See `winapp-package` to create an installer
- Having issues? See `winapp-troubleshoot` for common error solutions

## Troubleshooting
| Error | Cause | Solution |
|-------|-------|----------|
Expand Down
8 changes: 7 additions & 1 deletion .github/plugin/skills/winapp-cli/manifest/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: winapp-manifest
description: Create and edit Windows app manifest files (appxmanifest.xml) that define app identity, capabilities, and visual assets. Use when creating a Windows app manifest, adding Windows capabilities, or updating app icons and assets.
description: Create and edit Windows app manifest files (appxmanifest.xml) that define app identity, capabilities, and visual assets. Use when creating a Windows app manifest for any app type (GUI, console, CLI tool, service), adding Windows capabilities, updating app icons and assets, or adding execution aliases, file associations, protocol handlers, or other app extensions.
version: 0.2.1
---
## When to use
Expand Down Expand Up @@ -114,6 +114,12 @@ Key fields to edit:
- You can manually edit `appxmanifest.xml` after generation — it's a standard XML file
- Image assets must match the paths referenced in the manifest — `update-assets` handles this automatically
- For logos, transparent PNGs work best. Use a square image for best results across all sizes.
- **`$targetnametoken$` placeholder:** When `winapp manifest generate` creates `appxmanifest.xml`, it sets `Application.Executable` to `$targetnametoken$.exe` by default. This is a valid placeholder that gets automatically resolved by `winapp package --executable <name>` at packaging time — you rarely need to override it during manifest generation. If `--executable` is provided to `winapp manifest generate`, winapp reads `FileVersionInfo` from the actual exe to auto-fill package name, description, publisher, and extract an icon, so the exe must already exist on disk.

## Related skills

- After generating a manifest, see `winapp-signing` for certificate setup and `winapp-package` to create the MSIX installer
- Not sure which command to use? See `winapp-troubleshoot` for a command selection flowchart

## Troubleshooting
| Error | Cause | Solution |
Expand Down
27 changes: 26 additions & 1 deletion .github/plugin/skills/winapp-cli/package/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
---
name: winapp-package
description: Package a Windows app as an MSIX installer for distribution or testing. Use when creating a Windows installer, packaging an Electron/Flutter/.NET/Rust/C++/Tauri app for Windows, building an MSIX, or distributing a desktop app.
description: Package a Windows app as an MSIX installer for distribution or testing. Use when creating a Windows installer, packaging an Electron/Flutter/.NET/Rust/C++/Tauri app for Windows, building an MSIX, distributing a desktop app, packaging a console app or CLI tool, or adding MSIX packaging to a build script or CI/CD pipeline.
version: 0.2.1
---
## When to use

Use this skill when:
- **Creating an MSIX installer** from a built app for distribution or testing
- **Packaging any Windows app** — GUI apps, console apps, CLI tools, services, or background processes
- **Signing a package** with a development or production certificate
- **Bundling the Windows App SDK runtime** for self-contained deployment

Expand Down Expand Up @@ -111,6 +112,25 @@ winapp create-external-catalog "./bin/Release" --recursive --output ./catalog/Co

This hashes executables in the specified directories so Windows trusts them when running with sparse package identity.

## CI/CD

### GitHub Actions

Use the `microsoft/setup-winapp` action to install winapp on GitHub-hosted runners:

```yaml
- uses: microsoft/setup-winapp@v1

- name: Package
run: winapp package ./dist --cert ${{ secrets.CERT_PATH }} --cert-password ${{ secrets.CERT_PASSWORD }} --quiet
```

**Tips for CI/CD pipelines:**
- Use `--quiet` (or `-q`) to suppress progress output
- Use `--if-exists skip` with `winapp cert generate` to avoid regenerating existing certificates
- Store your PFX certificate as a repository secret and decode it in CI
- Use `--use-defaults` (or `--no-prompt`) with `winapp init` to avoid interactive prompts

## Tips

- The `package` command aliases to `pack` — both work identically
Expand All @@ -120,6 +140,11 @@ This hashes executables in the specified directories so Windows trusts them when
- The `--executable` flag overrides the entry point in the manifest — useful when your exe name differs from what's in `appxmanifest.xml`
- For production distribution, use a certificate from a trusted CA and add `--timestamp` when signing with `winapp sign`

## Related skills
- Need a manifest first? See `winapp-manifest` to generate `appxmanifest.xml`
- Need a certificate? See `winapp-signing` for certificate generation and management
- Having issues? See `winapp-troubleshoot` for a command selection flowchart and error solutions

## Troubleshooting
| Error | Cause | Solution |
|-------|-------|----------|
Expand Down
6 changes: 6 additions & 0 deletions .github/plugin/skills/winapp-cli/setup/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@ This updates `winapp.yaml` with the latest versions and reinstalls packages.
- `winapp init` is idempotent for the config file — re-running it won't overwrite an existing `winapp.yaml` unless you use `--config-only`
- For Electron projects, prefer `npm install --save-dev @microsoft/winappcli` and use `npx winapp init` instead of the standalone CLI

## Related skills
- After setup, see `winapp-manifest` to customize your `appxmanifest.xml`
- Ready to package? See `winapp-package` to create an MSIX installer
- Need a certificate? See `winapp-signing` for certificate generation
- Not sure which command to use? See `winapp-troubleshoot` for a command selection flowchart

## Troubleshooting
| Error | Cause | Solution |
|-------|-------|----------|
Expand Down
5 changes: 5 additions & 0 deletions .github/plugin/skills/winapp-cli/signing/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ Note: The `package` command can sign automatically when you pass `--cert`, so yo
- Use `--timestamp` when signing production builds so the signature survives certificate expiration
- You can also use the shorthand: `winapp package ./dist --generate-cert --install-cert` to do everything in one command

## Related skills
- Need to create a manifest first? See `winapp-manifest` to generate `appxmanifest.xml` with correct publisher info
- Ready to package? See `winapp-package` to create and sign an MSIX in one step
- Having issues? See `winapp-troubleshoot` for common error solutions

## Troubleshooting
| Error | Cause | Solution |
|-------|-------|----------|
Expand Down
8 changes: 8 additions & 0 deletions .github/plugin/skills/winapp-cli/troubleshoot/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,14 @@ Does the project have an appxmanifest.xml?
- Framework-specific guides: https://github.com/microsoft/WinAppCli/tree/main/docs/guides
- File an issue: https://github.com/microsoft/WinAppCli/issues

## Related skills
- **Setup & init**: `winapp-setup` — adding Windows support to a project
- **Manifest**: `winapp-manifest` — creating and editing `appxmanifest.xml`
- **Signing**: `winapp-signing` — certificate generation and management
- **Packaging**: `winapp-package` — creating MSIX installers
- **Identity**: `winapp-identity` — enabling package identity for Windows APIs
- **Frameworks**: `winapp-frameworks` — framework-specific guidance (Electron, .NET, C++, Rust, Flutter, Tauri)


## Command Reference

Expand Down
6 changes: 4 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,11 @@ Look at the `docs\cli-schema.json` for the full schema to know what the cli can

## Auto-generation pipeline

The following files are auto-generated from `cli-schema.json` via `scripts/generate-llm-docs.ps1`. Do not run this script directly and run via the `build-cli.ps1` script. Do not edit these files directly:
The following files are auto-generated from `cli-schema.json` via `scripts/generate-llm-docs.ps1`. Do not run this script directly and run via the `build-cli.ps1` script. **Do not edit these files directly — your changes will be overwritten:**

- `docs/cli-schema.json` — machine-readable schema
- `.github/plugin/skills/winapp-cli/*/SKILL.md` — Copilot CLI plugin skills

The hand-written workflow content lives in `docs/fragments/skills/winapp-cli/`. Running `scripts/build-cli.ps1` triggers regeneration automatically.
**To edit skill content**, modify the hand-written templates in `docs/fragments/skills/winapp-cli/`. Each template file (e.g., `package.md`, `manifest.md`) contains the workflow docs, examples, and troubleshooting content. The auto-generation script appends command reference tables from the CLI schema. Running `scripts/build-cli.ps1` triggers regeneration automatically.

Skill descriptions (used for Copilot skill matching) are defined in the `$SkillDescriptions` hashtable in `scripts/generate-llm-docs.ps1`.
8 changes: 8 additions & 0 deletions docs/fragments/skills/winapp-cli/frameworks.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,11 @@ C++ projects use winapp primarily for SDK projections (CppWinRT headers) and pac
- Tauri has its own bundler for `.msi` installers
- Use winapp specifically for **MSIX distribution** and package identity features
- winapp adds capabilities beyond what Tauri's built-in bundler provides (identity, sparse packages, Windows API access)

## Related skills
- **Setup**: `winapp-setup` — initial project setup with `winapp init`
- **Manifest**: `winapp-manifest` — creating and customizing `appxmanifest.xml`
- **Signing**: `winapp-signing` — certificate generation and management
- **Packaging**: `winapp-package` — creating MSIX installers from build output
- **Identity**: `winapp-identity` — enabling package identity for Windows APIs during development
- Not sure which command to use? See `winapp-troubleshoot` for a command selection flowchart
6 changes: 6 additions & 0 deletions docs/fragments/skills/winapp-cli/identity.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,12 @@ After running, launch your exe normally — Windows will recognize it as having
- If you have both a debug identity and an installed MSIX, they may conflict — use `--keep-identity` carefully
- For Electron apps, use `npx winapp node add-electron-debug-identity` instead (handles Electron-specific paths)

## Related skills
- Need a manifest? See `winapp-manifest` to generate `appxmanifest.xml`
- Need a certificate? See `winapp-signing` — a trusted cert is required for identity registration
- Ready for full MSIX distribution? See `winapp-package` to create an installer
- Having issues? See `winapp-troubleshoot` for common error solutions

## Troubleshooting
| Error | Cause | Solution |
|-------|-------|----------|
Expand Down
6 changes: 6 additions & 0 deletions docs/fragments/skills/winapp-cli/manifest.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,12 @@ Key fields to edit:
- You can manually edit `appxmanifest.xml` after generation — it's a standard XML file
- Image assets must match the paths referenced in the manifest — `update-assets` handles this automatically
- For logos, transparent PNGs work best. Use a square image for best results across all sizes.
- **`$targetnametoken$` placeholder:** When `winapp manifest generate` creates `appxmanifest.xml`, it sets `Application.Executable` to `$targetnametoken$.exe` by default. This is a valid placeholder that gets automatically resolved by `winapp package --executable <name>` at packaging time — you rarely need to override it during manifest generation. If `--executable` is provided to `winapp manifest generate`, winapp reads `FileVersionInfo` from the actual exe to auto-fill package name, description, publisher, and extract an icon, so the exe must already exist on disk.

## Related skills

- After generating a manifest, see `winapp-signing` for certificate setup and `winapp-package` to create the MSIX installer
- Not sure which command to use? See `winapp-troubleshoot` for a command selection flowchart

## Troubleshooting
| Error | Cause | Solution |
Expand Down
25 changes: 25 additions & 0 deletions docs/fragments/skills/winapp-cli/package.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

Use this skill when:
- **Creating an MSIX installer** from a built app for distribution or testing
- **Packaging any Windows app** — GUI apps, console apps, CLI tools, services, or background processes
- **Signing a package** with a development or production certificate
- **Bundling the Windows App SDK runtime** for self-contained deployment

Expand Down Expand Up @@ -106,6 +107,25 @@ winapp create-external-catalog "./bin/Release" --recursive --output ./catalog/Co

This hashes executables in the specified directories so Windows trusts them when running with sparse package identity.

## CI/CD

### GitHub Actions

Use the `microsoft/setup-winapp` action to install winapp on GitHub-hosted runners:

```yaml
- uses: microsoft/setup-winapp@v1

- name: Package
run: winapp package ./dist --cert ${{ secrets.CERT_PATH }} --cert-password ${{ secrets.CERT_PASSWORD }} --quiet
```

**Tips for CI/CD pipelines:**
- Use `--quiet` (or `-q`) to suppress progress output
- Use `--if-exists skip` with `winapp cert generate` to avoid regenerating existing certificates
- Store your PFX certificate as a repository secret and decode it in CI
- Use `--use-defaults` (or `--no-prompt`) with `winapp init` to avoid interactive prompts

## Tips

- The `package` command aliases to `pack` — both work identically
Expand All @@ -115,6 +135,11 @@ This hashes executables in the specified directories so Windows trusts them when
- The `--executable` flag overrides the entry point in the manifest — useful when your exe name differs from what's in `appxmanifest.xml`
- For production distribution, use a certificate from a trusted CA and add `--timestamp` when signing with `winapp sign`

## Related skills
- Need a manifest first? See `winapp-manifest` to generate `appxmanifest.xml`
- Need a certificate? See `winapp-signing` for certificate generation and management
- Having issues? See `winapp-troubleshoot` for a command selection flowchart and error solutions

## Troubleshooting
| Error | Cause | Solution |
|-------|-------|----------|
Expand Down
6 changes: 6 additions & 0 deletions docs/fragments/skills/winapp-cli/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,12 @@ This updates `winapp.yaml` with the latest versions and reinstalls packages.
- `winapp init` is idempotent for the config file — re-running it won't overwrite an existing `winapp.yaml` unless you use `--config-only`
- For Electron projects, prefer `npm install --save-dev @microsoft/winappcli` and use `npx winapp init` instead of the standalone CLI

## Related skills
- After setup, see `winapp-manifest` to customize your `appxmanifest.xml`
- Ready to package? See `winapp-package` to create an MSIX installer
- Need a certificate? See `winapp-signing` for certificate generation
- Not sure which command to use? See `winapp-troubleshoot` for a command selection flowchart

## Troubleshooting
| Error | Cause | Solution |
|-------|-------|----------|
Expand Down
5 changes: 5 additions & 0 deletions docs/fragments/skills/winapp-cli/signing.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ Note: The `package` command can sign automatically when you pass `--cert`, so yo
- Use `--timestamp` when signing production builds so the signature survives certificate expiration
- You can also use the shorthand: `winapp package ./dist --generate-cert --install-cert` to do everything in one command

## Related skills
- Need to create a manifest first? See `winapp-manifest` to generate `appxmanifest.xml` with correct publisher info
- Ready to package? See `winapp-package` to create and sign an MSIX in one step
- Having issues? See `winapp-troubleshoot` for common error solutions

## Troubleshooting
| Error | Cause | Solution |
|-------|-------|----------|
Expand Down
8 changes: 8 additions & 0 deletions docs/fragments/skills/winapp-cli/troubleshoot.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,11 @@ Does the project have an appxmanifest.xml?
- Full CLI documentation: https://github.com/microsoft/WinAppCli/blob/main/docs/usage.md
- Framework-specific guides: https://github.com/microsoft/WinAppCli/tree/main/docs/guides
- File an issue: https://github.com/microsoft/WinAppCli/issues

## Related skills
- **Setup & init**: `winapp-setup` — adding Windows support to a project
- **Manifest**: `winapp-manifest` — creating and editing `appxmanifest.xml`
- **Signing**: `winapp-signing` — certificate generation and management
- **Packaging**: `winapp-package` — creating MSIX installers
- **Identity**: `winapp-identity` — enabling package identity for Windows APIs
- **Frameworks**: `winapp-frameworks` — framework-specific guidance (Electron, .NET, C++, Rust, Flutter, Tauri)
Loading
Loading