winapp-cli by github/awesome-copilot
npx skills add https://github.com/github/awesome-copilot --skill winapp-cliWindows 应用开发 CLI (winapp) 是一个命令行界面,用于管理 Windows SDK、MSIX 打包、生成应用标识、清单、证书,以及在任何应用框架中使用构建工具。它弥合了跨平台开发和 Windows 原生功能之间的差距。
在以下情况下使用此技能:
winapp store 将应用发布到 Microsoft Storewinget install Microsoft.WinAppCli --source wingetnpm install @microsoft/winappcli --save-dev广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
winapp init)使用构建现代 Windows 应用所需的资源(清单、证书、库)初始化目录。支持 SDK 安装模式:stable、preview、experimental 或 none。
winapp pack)从准备好的目录创建 MSIX 包,支持可选签名、证书生成和独立部署捆绑。
winapp create-debug-identity)为可执行文件添加临时包标识,以便调试需要标识的 Windows API(通知、Windows AI、Shell 集成),而无需完整打包。
winapp manifest)生成 AppxManifest.xml 文件并从源图像更新图像资源,自动创建所有所需的尺寸和宽高比。支持清单占位符用于动态内容,以及 AppxManifest 中的限定名称用于灵活的应用标识定义。
winapp cert)生成开发证书并将其安装到本地计算机存储中以用于签名包。
winapp sign)使用 PFX 证书为 MSIX 包和可执行文件签名,支持可选的时间戳服务器。
winapp tool)从任何框架或构建系统运行 Windows SDK 构建工具,并正确配置路径。
winapp store)直接从 winapp 运行 Microsoft Store 开发者 CLI 命令,实现在不离开 CLI 的情况下进行商店提交、包验证和发布工作流。
winapp create-external-catalog)创建外部目录以简化开发人员的资产管理,将目录数据与主包分离。
# 使用默认设置初始化工作区
winapp init
# 注意:从 v0.2.0 开始,init 不再自动生成证书。请显式生成一个:
winapp cert generate
# 构建您的应用程序(特定于框架)
# ...
# 创建已签名的 MSIX 包
winapp pack ./build-output --generate-cert --output MyApp.msix
# 为可执行文件添加调试标识以测试 Windows API
winapp create-debug-identity ./bin/MyApp.exe
# 运行您的应用 - 它现在具有包标识
./bin/MyApp.exe
# GitHub Actions 示例
- name: 设置 winapp CLI
uses: microsoft/setup-WinAppCli@v1
- name: 初始化并打包
run: |
winapp init --no-prompt
winapp pack ./build-output --output MyApp.msix
# 通过 npm 安装
npm install @microsoft/winappcli --save-dev
# 为 Electron 初始化和添加调试标识
npx winapp init
npx winapp node add-electron-debug-identity
# 打包以供分发
npx winapp pack ./out --output MyElectronApp.msix
winapp init - 在使用其他命令之前始终初始化您的项目,以确保 SDK 设置和清单已配置。注意:从 v0.2.0 开始,winapp init 不再自动生成开发证书。当您需要使用开发证书签名时,请显式运行 winapp cert generate。create-debug-identity - 每当修改 AppxManifest.xml 时,必须重新创建包标识。--no-prompt - 通过使用默认值防止在自动化流水线中出现交互式提示。winapp restore - 在不同机器上重新创建 winapp.yaml 中定义的确切环境状态。winapp manifest update-assets 和一个徽标来生成所有所需的图标尺寸。cd my-project
winapp init
# 创建:AppxManifest.xml、SDK 配置、winapp.yaml
# 注意:.NET (csproj) 项目会跳过 winapp.yaml,直接在 .csproj 中配置 NuGet 包
# 显式生成开发签名证书(不再由 init 完成)
winapp cert generate
winapp pack ./build-output --cert ./mycert.pfx --cert-password secret --output MyApp.msix
# 将 Windows 应用 SDK 运行时与包捆绑
winapp pack ./my-app --self-contained --generate-cert
# 更新到最新的稳定版 SDK
winapp update
# 或更新到预览版 SDK
winapp update --setup-sdks preview
create-debug-identitywinapp init 不再自动生成证书(v0.2.0+);请显式运行 winapp cert generatewinapp.yaml;SDK 包直接在项目文件中配置%userprofile%/.winapp/packages)包标识解锁了对强大 Windows API 的访问:
| API 类别 | 示例 |
|---|---|
| 通知 | 交互式原生通知、通知管理 |
| Windows AI | 设备端 LLM、文本/图像 AI API(Phi Silica、Windows ML) |
| Shell 集成 | 资源管理器、任务栏、共享页面集成 |
| 协议处理程序 | 自定义 URI 方案 (yourapp://) |
| 设备访问 | 摄像头、麦克风、位置(需同意) |
| 后台任务 | 在应用关闭时运行 |
| 文件关联 | 使用您的应用打开文件类型 |
| 问题 | 解决方案 |
|---|---|
| 证书不受信任 | 运行 winapp cert install <cert-path> 将证书安装到本地计算机存储 |
| 包标识不工作 | 在任何清单更改后运行 winapp create-debug-identity |
| 找不到 SDK | 运行 winapp restore 或 winapp update 以确保 SDK 已安装 |
| 签名失败 | 验证证书密码并确保证书未过期 |
每周安装量
7.4K
仓库
GitHub Stars
26.9K
首次出现
Feb 2, 2026
安全审计
安装于
codex7.3K
gemini-cli7.3K
opencode7.3K
github-copilot7.3K
cursor7.3K
kimi-cli7.3K
The Windows App Development CLI (winapp) is a command-line interface for managing Windows SDKs, MSIX packaging, generating app identity, manifests, certificates, and using build tools with any app framework. It bridges the gap between cross-platform development and Windows-native capabilities.
Use this skill when you need to:
winapp storewinget install Microsoft.WinAppCli --source wingetnpm install @microsoft/winappcli --save-devwinapp init)Initialize a directory with required assets (manifest, certificates, libraries) for building a modern Windows app. Supports SDK installation modes: stable, preview, experimental, or none.
winapp pack)Create MSIX packages from prepared directories with optional signing, certificate generation, and self-contained deployment bundling.
winapp create-debug-identity)Add temporary package identity to executables for debugging Windows APIs that require identity (notifications, Windows AI, shell integration) without full packaging.
winapp manifest)Generate AppxManifest.xml files and update image assets from source images, automatically creating all required sizes and aspect ratios. Supports manifest placeholders for dynamic content and qualified names in AppxManifest for flexible app identity definitions.
winapp cert)Generate development certificates and install them to the local machine store for signing packages.
winapp sign)Sign MSIX packages and executables with PFX certificates, with optional timestamp server support.
winapp tool)Run Windows SDK build tools with properly configured paths from any framework or build system.
winapp store)Run Microsoft Store Developer CLI commands directly from winapp, enabling store submission, package validation, and publishing workflows without leaving the CLI.
winapp create-external-catalog)Create external catalogs to streamline asset management for developers, separating catalog data from the main package.
# Initialize workspace with defaults
winapp init
# Note: init no longer auto-generates a certificate (v0.2.0+). Generate one explicitly:
winapp cert generate
# Build your application (framework-specific)
# ...
# Create signed MSIX package
winapp pack ./build-output --generate-cert --output MyApp.msix
# Add debug identity to executable for testing Windows APIs
winapp create-debug-identity ./bin/MyApp.exe
# Run your app - it now has package identity
./bin/MyApp.exe
# GitHub Actions example
- name: Setup winapp CLI
uses: microsoft/setup-WinAppCli@v1
- name: Initialize and Package
run: |
winapp init --no-prompt
winapp pack ./build-output --output MyApp.msix
# Install via npm
npm install @microsoft/winappcli --save-dev
# Initialize and add debug identity for Electron
npx winapp init
npx winapp node add-electron-debug-identity
# Package for distribution
npx winapp pack ./out --output MyElectronApp.msix
winapp init first - Always initialize your project before using other commands to ensure SDK setup and manifest are configured. Note: as of v0.2.0, winapp init no longer generates a development certificate automatically. Run winapp cert generate explicitly when you need to sign with a dev certificate.create-debug-identity after manifest changes - Package identity must be recreated whenever AppxManifest.xml is modified.--no-prompt for CI/CD - Prevents interactive prompts in automated pipelines by using default values.winapp restore for shared projects - Recreates the exact environment state defined in winapp.yaml across machines.winapp manifest update-assets with one logo to generate all required icon sizes.cd my-project
winapp init
# Creates: AppxManifest.xml, SDK configuration, winapp.yaml
# Note: .NET (csproj) projects skip winapp.yaml and configure NuGet packages in the .csproj directly
# Generate a dev signing certificate explicitly (no longer done by init)
winapp cert generate
winapp pack ./build-output --cert ./mycert.pfx --cert-password secret --output MyApp.msix
# Bundle Windows App SDK runtime with the package
winapp pack ./my-app --self-contained --generate-cert
# Update to latest stable SDKs
winapp update
# Or update to preview SDKs
winapp update --setup-sdks preview
create-debug-identity after any manifest changeswinapp init no longer auto-generates a certificate (v0.2.0+); run winapp cert generate explicitlywinapp.yaml; SDK packages are configured in the project file directly%userprofile%/.winapp/packages)Package identity unlocks access to powerful Windows APIs:
| API Category | Examples |
|---|---|
| Notifications | Interactive native notifications, notification management |
| Windows AI | On-device LLM, text/image AI APIs (Phi Silica, Windows ML) |
| Shell Integration | Explorer, Taskbar, Share sheet integration |
| Protocol Handlers | Custom URI schemes (yourapp://) |
| Device Access | Camera, microphone, location (with consent) |
| Background Tasks | Run when app is closed |
| File Associations | Open file types with your app |
| Issue | Solution |
|---|---|
| Certificate not trusted | Run winapp cert install <cert-path> to install to local machine store |
| Package identity not working | Run winapp create-debug-identity after any manifest changes |
| SDK not found | Run winapp restore or winapp update to ensure SDKs are installed |
| Signing fails | Verify certificate password and ensure cert is not expired |
Weekly Installs
7.4K
Repository
GitHub Stars
26.9K
First Seen
Feb 2, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykFail
Installed on
codex7.3K
gemini-cli7.3K
opencode7.3K
github-copilot7.3K
cursor7.3K
kimi-cli7.3K
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
102,200 周安装