msstore-cli by github/awesome-copilot
npx skills add https://github.com/github/awesome-copilot --skill msstore-cliMicrosoft Store Developer CLI (msstore) 是一个跨平台命令行界面,用于在 Microsoft Store 中发布和管理应用程序。它与 Partner Center API 集成,并支持多种应用程序类型的自动化发布工作流。
当你需要执行以下操作时,请使用此技能:
winget install "Microsoft Store Developer CLI"广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
在使用 msstore 之前,你需要创建一个具有 Partner Center 访问权限的 Azure AD 应用程序:
显示当前的凭据配置。
msstore info
选项:
| 选项 | 描述 |
|---|---|
-v, --verbose | 打印详细输出 |
配置或更新 Microsoft Store API 凭据。
msstore reconfigure [options]
选项:
| 选项 | 描述 |
|---|---|
-t, --tenantId | Azure AD 租户 ID |
-s, --sellerId | Partner Center 卖家 ID |
-c, --clientId | Azure AD 应用程序客户端 ID |
-cs, --clientSecret | 用于身份验证的客户端密钥 |
-ct, --certificateThumbprint | 证书指纹(客户端密钥的替代方案) |
-cfp, --certificateFilePath | 证书文件路径(客户端密钥的替代方案) |
-cp, --certificatePassword | 证书密码 |
--reset | 重置凭据,无需完全重新配置 |
示例:
# 使用客户端密钥配置
msstore reconfigure --tenantId $TENANT_ID --sellerId $SELLER_ID --clientId $CLIENT_ID --clientSecret $CLIENT_SECRET
# 使用证书配置
msstore reconfigure --tenantId $TENANT_ID --sellerId $SELLER_ID --clientId $CLIENT_ID --certificateFilePath ./cert.pfx --certificatePassword MyPassword
更改 Microsoft Store Developer CLI 的设置。
msstore settings [options]
选项:
| 选项 | 描述 |
|---|---|
-t, --enableTelemetry | 启用 (true) 或禁用 (false) 遥测 |
msstore settings setpdn <publisherDisplayName>
为 init 命令设置默认的发布者显示名称。
列出并检索应用程序信息。
msstore apps list
列出 Partner Center 账户中的所有应用程序。
msstore apps get <productId>
参数:
| 参数 | 描述 |
|---|---|
productId | Store 产品 ID (例如:9NBLGGH4R315) |
示例:
# 获取特定应用的详细信息
msstore apps get 9NBLGGH4R315
管理 Store 提交。
| 子命令 | 描述 |
|---|---|
status | 获取提交状态 |
get | 获取提交元数据和包信息 |
getListingAssets | 获取提交的列表资源 |
updateMetadata | 更新提交元数据 |
poll | 轮询提交状态直至完成 |
publish | 发布提交 |
delete | 删除提交 |
msstore submission status <productId>
msstore submission get <productId>
msstore submission updateMetadata <productId> <metadata>
其中 <metadata> 是包含更新后元数据的 JSON 字符串。由于 JSON 包含 shell 会解释的字符(引号、大括号等),你必须适当地引用和/或转义该值:
Bash/Zsh : 将 JSON 包裹在单引号中,以便 shell 按字面意思传递它。
msstore submission updateMetadata 9NBLGGH4R315 '{"description":"My updated app"}'
PowerShell : 使用单引号(或在双引号字符串内转义双引号)。
msstore submission updateMetadata 9NBLGGH4R315 '{"description":"My updated app"}'
cmd.exe : 使用反斜杠转义每个内部双引号。
msstore submission updateMetadata 9NBLGGH4R315 "{\"description\":\"My updated app\"}"
提示: 对于复杂或多行的元数据,可以将 JSON 保存到文件中并传递其内容,以避免引用问题:
msstore submission updateMetadata 9NBLGGH4R315 "$(cat metadata.json)"
选项:
| 选项 | 描述 |
|---|---|
-s, --skipInitialPolling | 跳过初始状态轮询 |
msstore submission publish <productId>
msstore submission poll <productId>
轮询直到提交状态变为 PUBLISHED 或 FAILED。
msstore submission delete <productId>
选项:
| 选项 | 描述 |
|---|---|
--no-confirm | 跳过确认提示 |
为 Microsoft Store 发布初始化项目。自动检测项目类型并配置 Store 身份。
msstore init <pathOrUrl> [options]
参数:
| 参数 | 描述 |
|---|---|
pathOrUrl | 项目目录路径或 PWA URL |
选项:
| 选项 | 描述 |
|---|---|
-n, --publisherDisplayName | 发布者显示名称 |
--package | 同时打包项目 |
--publish | 打包并发布(隐含 --package) |
-f, --flightId | 发布到特定航班 |
-prp, --packageRolloutPercentage | 渐进式推出百分比 (0-100) |
-a, --arch | 架构:x86, x64, arm64 |
-o, --output | 包的输出目录 |
-ver, --version | 构建时使用的版本 |
支持的项目类型:
示例:
# 初始化 WinUI 项目
msstore init ./my-winui-app
# 初始化 PWA
msstore init https://contoso.com --output ./pwa-package
# 初始化并发布
msstore init ./my-app --publish
为 Microsoft Store 提交打包应用程序。
msstore package <pathOrUrl> [options]
参数:
| 参数 | 描述 |
|---|---|
pathOrUrl | 项目目录路径或 PWA URL |
选项:
| 选项 | 描述 |
|---|---|
-o, --output | 包的输出目录 |
-a, --arch | 架构:x86, x64, arm64 |
-ver, --version | 包的版本 |
示例:
# 为默认架构打包
msstore package ./my-app
# 为多个架构打包
msstore package ./my-app --arch x64,arm64 --output ./packages
# 使用特定版本打包
msstore package ./my-app --version 1.2.3.0
将应用程序发布到 Microsoft Store。
msstore publish <pathOrUrl> [options]
参数:
| 参数 | 描述 |
|---|---|
pathOrUrl | 项目目录路径或 PWA URL |
选项:
| 选项 | 描述 |
|---|---|
-i, --inputFile | 现有 .msix 或 .msixupload 文件的路径 |
-id, --appId | 应用程序 ID (如果未初始化) |
-nc, --noCommit | 保持提交为草稿状态 |
-f, --flightId | 发布到特定航班 |
-prp, --packageRolloutPercentage | 渐进式推出百分比 (0-100) |
示例:
# 发布项目
msstore publish ./my-app
# 发布现有包
msstore publish ./my-app --inputFile ./packages/MyApp.msixupload
# 作为草稿发布
msstore publish ./my-app --noCommit
# 使用渐进式推出发布
msstore publish ./my-app --packageRolloutPercentage 10
管理软件包航班(Beta 测试组)。
| 子命令 | 描述 |
|---|---|
list | 列出应用的所有航班 |
get | 获取航班详情 |
delete | 删除航班 |
create | 创建新航班 |
submission | 管理航班提交 |
msstore flights list <productId>
msstore flights get <productId> <flightId>
msstore flights create <productId> <friendlyName> --group-ids <group-ids>
选项:
| 选项 | 描述 |
|---|---|
-g, --group-ids | 航班组 ID (逗号分隔) |
-r, --rank-higher-than | 要排名高于的航班 ID |
msstore flights delete <productId> <flightId>
# 获取航班提交
msstore flights submission get <productId> <flightId>
# 发布航班提交
msstore flights submission publish <productId> <flightId>
# 检查航班提交状态
msstore flights submission status <productId> <flightId>
# 轮询航班提交
msstore flights submission poll <productId> <flightId>
# 删除航班提交
msstore flights submission delete <productId> <flightId>
# 获取推出状态
msstore flights submission rollout get <productId> <flightId>
# 更新推出百分比
msstore flights submission rollout update <productId> <flightId> <percentage>
# 暂停推出
msstore flights submission rollout halt <productId> <flightId>
# 完成推出 (100%)
msstore flights submission rollout finalize <productId> <flightId>
# 1. 安装 CLI
winget install "Microsoft Store Developer CLI"
# 2. 配置凭据 (从 Partner Center 获取这些信息)
msstore reconfigure --tenantId $TENANT_ID --sellerId $SELLER_ID --clientId $CLIENT_ID --clientSecret $CLIENT_SECRET
# 3. 验证配置
msstore info
# 4. 列出你的应用以确认访问权限
msstore apps list
# 1. 导航到项目
cd my-winui-app
# 2. 为 Store 初始化 (创建/更新应用身份)
msstore init .
# 3. 打包应用程序
msstore package . --arch x64,arm64
# 4. 发布到 Store
msstore publish .
# 5. 检查提交状态
msstore submission status <productId>
# 1. 构建更新后的应用程序
dotnet publish -c Release
# 2. 打包并发布
msstore publish ./my-app
# 或者从现有包发布
msstore publish ./my-app --inputFile ./artifacts/MyApp.msixupload
# 1. 使用初始推出百分比发布
msstore publish ./my-app --packageRolloutPercentage 10
# 2. 监控并增加推出比例
msstore submission poll <productId>
# 3. (验证后) 完成至 100%
# 这通过 Partner Center 或提交更新完成
# 1. 首先在 Partner Center 中创建一个航班组
# 然后创建航班
msstore flights create <productId> "Beta Testers" --group-ids "group-id-1,group-id-2"
# 2. 发布到该航班
msstore publish ./my-app --flightId <flightId>
# 3. 检查航班提交状态
msstore flights submission status <productId> <flightId>
# 4. 测试完成后,发布到生产环境
msstore publish ./my-app
# GitHub Actions 示例
name: Publish to Store
on:
release:
types: [published]
jobs:
publish:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'
- name: Install msstore CLI
run: winget install "Microsoft Store Developer CLI" --accept-package-agreements --accept-source-agreements
- name: Configure Store credentials
run: |
msstore reconfigure --tenantId ${{ secrets.TENANT_ID }} --sellerId ${{ secrets.SELLER_ID }} --clientId ${{ secrets.CLIENT_ID }} --clientSecret ${{ secrets.CLIENT_SECRET }}
- name: Build application
run: dotnet publish -c Release
- name: Publish to Store
run: msstore publish ./src/MyApp
winapp CLI (v0.2.0+) 通过 winapp store 子命令与 msstore 集成:
# 这些命令是等效的:
msstore reconfigure --tenantId xxx --clientId xxx --clientSecret xxx
winapp store reconfigure --tenantId xxx --clientId xxx --clientSecret xxx
# 列出应用
msstore apps list
winapp store apps list
# 发布
msstore publish ./my-app
winapp store publish ./my-app
当你希望获得统一的 CLI 体验来处理打包和发布时,请使用 winapp store。
| 问题 | 解决方案 |
|---|---|
| 身份验证失败 | 使用 msstore info 验证凭据;重新运行 msstore reconfigure |
| 找不到应用 | 确保产品 ID 正确;运行 msstore apps list 进行验证 |
| 权限不足 | 检查 Partner Center 中的 Azure AD 应用角色 (需要经理或开发者) |
| 包验证失败 | 确保包满足 Store 要求;在 Partner Center 中查看详情 |
| 提交卡住 | 运行 msstore submission poll <productId> 检查状态 |
| 找不到航班 | 使用 msstore flights list <productId> 验证航班 ID |
| 推出百分比无效 | 值必须在 0 到 100 之间 |
| PWA 初始化失败 | 确保 URL 可公开访问并具有有效的 Web 应用清单 |
CLI 支持用于凭据的环境变量:
| 变量 | 描述 |
|---|---|
MSSTORE_TENANT_ID | Azure AD 租户 ID |
MSSTORE_SELLER_ID | Partner Center 卖家 ID |
MSSTORE_CLIENT_ID | Azure AD 应用程序客户端 ID |
MSSTORE_CLIENT_SECRET | 客户端密钥 |
每周安装量
5.7K
仓库
GitHub 星标数
26.7K
首次出现
2026年3月2日
安全审计
安装于
codex5.6K
gemini-cli5.6K
opencode5.6K
cursor5.6K
github-copilot5.6K
kimi-cli5.5K
The Microsoft Store Developer CLI (msstore) is a cross-platform command-line interface for publishing and managing applications in the Microsoft Store. It integrates with Partner Center APIs and supports automated publishing workflows for various application types.
Use this skill when you need to:
winget install "Microsoft Store Developer CLI"Before using msstore, you need to create an Azure AD application with Partner Center access:
Display the current credential configuration.
msstore info
Options:
| Option | Description |
|---|---|
-v, --verbose | Print verbose output |
Configure or update Microsoft Store API credentials.
msstore reconfigure [options]
Options:
| Option | Description |
|---|---|
-t, --tenantId | Azure AD Tenant ID |
-s, --sellerId | Partner Center Seller ID |
-c, --clientId | Azure AD Application Client ID |
-cs, --clientSecret | Client Secret for authentication |
-ct, --certificateThumbprint | Certificate thumbprint (alternative to client secret) |
-cfp, --certificateFilePath |
Examples:
# Configure with client secret
msstore reconfigure --tenantId $TENANT_ID --sellerId $SELLER_ID --clientId $CLIENT_ID --clientSecret $CLIENT_SECRET
# Configure with certificate
msstore reconfigure --tenantId $TENANT_ID --sellerId $SELLER_ID --clientId $CLIENT_ID --certificateFilePath ./cert.pfx --certificatePassword MyPassword
Change settings of the Microsoft Store Developer CLI.
msstore settings [options]
Options:
| Option | Description |
|---|---|
-t, --enableTelemetry | Enable (true) or disable (false) telemetry |
msstore settings setpdn <publisherDisplayName>
Sets the default Publisher Display Name for the init command.
List and retrieve application information.
msstore apps list
Lists all applications in your Partner Center account.
msstore apps get <productId>
Arguments:
| Argument | Description |
|---|---|
productId | The Store product ID (e.g., 9NBLGGH4R315) |
Example:
# Get details of a specific app
msstore apps get 9NBLGGH4R315
Manage Store submissions.
| Sub-Command | Description |
|---|---|
status | Get submission status |
get | Get submission metadata and package info |
getListingAssets | Get listing assets of a submission |
updateMetadata | Update submission metadata |
poll | Poll submission status until complete |
publish | Publish a submission |
msstore submission status <productId>
msstore submission get <productId>
msstore submission updateMetadata <productId> <metadata>
Where <metadata> is a JSON string with the updated metadata. Because JSON contains characters that shells interpret (quotes, braces, etc.), you must quote and/or escape the value appropriately:
Bash/Zsh : Wrap the JSON in single quotes so the shell passes it through literally.
msstore submission updateMetadata 9NBLGGH4R315 '{"description":"My updated app"}'
PowerShell : Use single quotes (or escape double quotes inside a double-quoted string).
msstore submission updateMetadata 9NBLGGH4R315 '{"description":"My updated app"}'
cmd.exe : Escape each inner double quote with a backslash.
msstore submission updateMetadata 9NBLGGH4R315 "{\"description\":\"My updated app\"}"
Tip: For complex or multi-line metadata, save the JSON to a file and pass its contents instead to avoid quoting issues:
msstore submission updateMetadata 9NBLGGH4R315 "$(cat metadata.json)"
Options:
| Option | Description |
|---|---|
-s, --skipInitialPolling | Skip initial status polling |
msstore submission publish <productId>
msstore submission poll <productId>
Polls until the submission status is PUBLISHED or FAILED.
msstore submission delete <productId>
Options:
| Option | Description |
|---|---|
--no-confirm | Skip confirmation prompt |
Initialize a project for Microsoft Store publishing. Automatically detects project type and configures Store identity.
msstore init <pathOrUrl> [options]
Arguments:
| Argument | Description |
|---|---|
pathOrUrl | Project directory path or PWA URL |
Options:
| Option | Description |
|---|---|
-n, --publisherDisplayName | Publisher Display Name |
--package | Also package the project |
--publish | Package and publish (implies --package) |
-f, --flightId | Publish to a specific flight |
-prp, --packageRolloutPercentage | Gradual rollout percentage (0-100) |
-a, --arch |
Supported Project Types:
Examples:
# Initialize WinUI project
msstore init ./my-winui-app
# Initialize PWA
msstore init https://contoso.com --output ./pwa-package
# Initialize and publish
msstore init ./my-app --publish
Package an application for Microsoft Store submission.
msstore package <pathOrUrl> [options]
Arguments:
| Argument | Description |
|---|---|
pathOrUrl | Project directory path or PWA URL |
Options:
| Option | Description |
|---|---|
-o, --output | Output directory for the package |
-a, --arch | Architecture(s): x86, x64, arm64 |
-ver, --version | Version for the package |
Examples:
# Package for default architecture
msstore package ./my-app
# Package for multiple architectures
msstore package ./my-app --arch x64,arm64 --output ./packages
# Package with specific version
msstore package ./my-app --version 1.2.3.0
Publish an application to the Microsoft Store.
msstore publish <pathOrUrl> [options]
Arguments:
| Argument | Description |
|---|---|
pathOrUrl | Project directory path or PWA URL |
Options:
| Option | Description |
|---|---|
-i, --inputFile | Path to existing .msix or .msixupload file |
-id, --appId | Application ID (if not initialized) |
-nc, --noCommit | Keep submission in draft state |
-f, --flightId | Publish to a specific flight |
-prp, --packageRolloutPercentage | Gradual rollout percentage (0-100) |
Examples:
# Publish project
msstore publish ./my-app
# Publish existing package
msstore publish ./my-app --inputFile ./packages/MyApp.msixupload
# Publish as draft
msstore publish ./my-app --noCommit
# Publish with gradual rollout
msstore publish ./my-app --packageRolloutPercentage 10
Manage package flights (beta testing groups).
| Sub-Command | Description |
|---|---|
list | List all flights for an app |
get | Get flight details |
delete | Delete a flight |
create | Create a new flight |
submission | Manage flight submissions |
msstore flights list <productId>
msstore flights get <productId> <flightId>
msstore flights create <productId> <friendlyName> --group-ids <group-ids>
Options:
| Option | Description |
|---|---|
-g, --group-ids | Flight group IDs (comma-separated) |
-r, --rank-higher-than | Flight ID to rank higher than |
msstore flights delete <productId> <flightId>
# Get flight submission
msstore flights submission get <productId> <flightId>
# Publish flight submission
msstore flights submission publish <productId> <flightId>
# Check flight submission status
msstore flights submission status <productId> <flightId>
# Poll flight submission
msstore flights submission poll <productId> <flightId>
# Delete flight submission
msstore flights submission delete <productId> <flightId>
# Get rollout status
msstore flights submission rollout get <productId> <flightId>
# Update rollout percentage
msstore flights submission rollout update <productId> <flightId> <percentage>
# Halt rollout
msstore flights submission rollout halt <productId> <flightId>
# Finalize rollout (100%)
msstore flights submission rollout finalize <productId> <flightId>
# 1. Install the CLI
winget install "Microsoft Store Developer CLI"
# 2. Configure credentials (get these from Partner Center)
msstore reconfigure --tenantId $TENANT_ID --sellerId $SELLER_ID --clientId $CLIENT_ID --clientSecret $CLIENT_SECRET
# 3. Verify configuration
msstore info
# 4. List your apps to confirm access
msstore apps list
# 1. Navigate to project
cd my-winui-app
# 2. Initialize for Store (creates/updates app identity)
msstore init .
# 3. Package the application
msstore package . --arch x64,arm64
# 4. Publish to Store
msstore publish .
# 5. Check submission status
msstore submission status <productId>
# 1. Build your updated application
dotnet publish -c Release
# 2. Package and publish
msstore publish ./my-app
# Or publish from existing package
msstore publish ./my-app --inputFile ./artifacts/MyApp.msixupload
# 1. Publish with initial rollout percentage
msstore publish ./my-app --packageRolloutPercentage 10
# 2. Monitor and increase rollout
msstore submission poll <productId>
# 3. (After validation) Finalize to 100%
# This completes via Partner Center or submission update
# 1. Create a flight group in Partner Center first
# Then create a flight
msstore flights create <productId> "Beta Testers" --group-ids "group-id-1,group-id-2"
# 2. Publish to the flight
msstore publish ./my-app --flightId <flightId>
# 3. Check flight submission status
msstore flights submission status <productId> <flightId>
# 4. After testing, publish to production
msstore publish ./my-app
# GitHub Actions example
name: Publish to Store
on:
release:
types: [published]
jobs:
publish:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'
- name: Install msstore CLI
run: winget install "Microsoft Store Developer CLI" --accept-package-agreements --accept-source-agreements
- name: Configure Store credentials
run: |
msstore reconfigure --tenantId ${{ secrets.TENANT_ID }} --sellerId ${{ secrets.SELLER_ID }} --clientId ${{ secrets.CLIENT_ID }} --clientSecret ${{ secrets.CLIENT_SECRET }}
- name: Build application
run: dotnet publish -c Release
- name: Publish to Store
run: msstore publish ./src/MyApp
The winapp CLI (v0.2.0+) integrates with msstore via the winapp store subcommand:
# These commands are equivalent:
msstore reconfigure --tenantId xxx --clientId xxx --clientSecret xxx
winapp store reconfigure --tenantId xxx --clientId xxx --clientSecret xxx
# List apps
msstore apps list
winapp store apps list
# Publish
msstore publish ./my-app
winapp store publish ./my-app
Use winapp store when you want a unified CLI experience for both packaging and publishing.
| Issue | Solution |
|---|---|
| Authentication failed | Verify credentials with msstore info; re-run msstore reconfigure |
| App not found | Ensure the product ID is correct; run msstore apps list to verify |
| Insufficient permissions | Check Azure AD app role in Partner Center (needs Manager or Developer) |
| Package validation failed | Ensure package meets Store requirements; check Partner Center for details |
| Submission stuck | Run msstore submission poll <productId> to check status |
| Flight not found | Verify flight ID with msstore flights list <productId> |
The CLI supports environment variables for credentials:
| Variable | Description |
|---|---|
MSSTORE_TENANT_ID | Azure AD Tenant ID |
MSSTORE_SELLER_ID | Partner Center Seller ID |
MSSTORE_CLIENT_ID | Azure AD Application Client ID |
MSSTORE_CLIENT_SECRET | Client Secret |
Weekly Installs
5.7K
Repository
GitHub Stars
26.7K
First Seen
Mar 2, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykFail
Installed on
codex5.6K
gemini-cli5.6K
opencode5.6K
cursor5.6K
github-copilot5.6K
kimi-cli5.5K
97,600 周安装
| Certificate file path (alternative to client secret) |
-cp, --certificatePassword | Certificate password |
--reset | Reset credentials without full reconfiguration |
delete | Delete a submission |
| Architecture(s): x86, x64, arm64 |
-o, --output | Output directory for packages |
-ver, --version | Version to use when building |
| Rollout percentage invalid | Value must be between 0 and 100 |
| Init fails for PWA | Ensure URL is publicly accessible and has valid web app manifest |