asc:App Store Connect 命令行工具
用命令行和 CI 自动化 iOS 应用的构建上传、TestFlight 分发、提审与签名等 App Store Connect 流程。
- 浏览
- 4
- 访问
- 0
- 下载
- 0
- 版本
- v6.3.0
- 平台
- Windows、macOS、Linux
详细介绍
项目简介
asc 是一个用 Go 编写的轻量、快速、可脚本化的 App Store Connect API 命令行工具。它面向 iOS、macOS、tvOS、visionOS 开发者,让你在终端、IDE 或 CI/CD 流水线中自动化发布相关的各类操作,而不必手动在网页后台逐项点击。
主要功能
- 认证管理:通过 API Key 登录、查看状态并进行健康检查(
asc auth status --validate、asc auth doctor),支持 Team Key 与 Individual Key,也支持在 CI 中绕过钥匙串(keychain)使用配置文件认证。 - 构建上传与分发:上传
.ipa/.pkg,列出构建,管理 TestFlight 测试组并把构建加入分组。 - TestFlight 反馈:列出用户反馈与崩溃记录,查看崩溃日志。
- 提审与发布:预览发布计划(
asc release stage --dry-run),一条命令完成上传、关联与提交(asc publish appstore),再用asc status等待审核结果。 - 应用与版本管理:
asc apps list列出应用,asc validate做提审前检查,asc submit status/asc submit cancel管理提交生命周期。 - 输出格式可控:在交互终端默认输出
table,在管道、文件和 CI 中默认输出json,也可用--output json|table|markdown显式指定,配合--pretty获得易读结果,或设置环境变量ASC_DEFAULT_OUTPUT。 - 系统状态查询:
asc system-status无需凭据即可查看 Apple 开发者服务状态。 - Agent Skills:
asc install-skills可把一套asc工作流技能安装到全局 agent-skills 目录,仅依赖git。
安装与使用
通过 Homebrew 安装(推荐):
brew install asc
macOS / Linux 也可用安装脚本:
curl -fsSL https://asccli.sh/install | bash
Windows 可通过 WinGet 安装(是否已收录以 winget search asc 为准),也可以直接从 GitHub Releases 下载二进制;发布的二进制是自包含的,无需安装 Go。
安装后先确认可用:
asc version
asc --help
然后登录认证(API Key 在 App Store Connect 的 Integrations 页面生成):
asc auth login \
--name "MyApp" \
--key-id "ABC123" \
--issuer-id "DEF456" \
--private-key /path/to/AuthKey.p8
Individual Key 没有 issuer ID,改为传 --key-type individual 并省略 --issuer-id。在 CI 或无法访问钥匙串的机器上,加 --bypass-keychain。
第一条命令示例:
asc apps list --output table
上传构建并分发到 TestFlight 分组:
asc builds upload --app "123456789" --ipa "/path/to/MyApp.ipa"
asc builds add-groups --app "123456789" --build-number "42" --version "1.2.3" --platform MAC_OS --group "Internal Testers"
一条命令完成 App Store 提审:
asc publish appstore --app "123456789" --ipa "/path/to/MyApp.ipa" --version "1.2.3" --submit --confirm
注意事项
--app参数填的是 App Store Connect 中的应用 ID,不是 bundle ID。- 使用本地 Xcode 构建参数(如
--archive-path)时,需要同时给出--workspace或--project之一并配合--scheme;否则请直接上传已导出的.ipa或.pkg。 - 向需要 Beta 审核的外部 TestFlight 分组分发时,在
asc builds add-groups上加--submit --confirm。 - 用 Go 1.27 构建的发行版要求 macOS 13 Ventura 或更高版本,旧系统需保留旧版本或先升级系统。
- 工具默认发送匿名的命令级使用遥测,可用
asc telemetry disable、ASC_TELEMETRY_DISABLED=1或DO_NOT_TRACK=1关闭。 - 遇到认证问题可尝试
ASC_BYPASS_KEYCHAIN=1,或用ASC_DEBUG=api asc ...输出调试信息(注意脱敏)。 - 项目以 MIT 许可证开源。
本作品整理自 GitHub 开源项目 rorkai/App-Store-Connect-CLI,原作者 @rorkai,许可证 MIT。中文介绍由 AI 根据项目 README 整理,以原仓库为准。
更新记录
- v6.3.0当前版本
## What's Changed * apps wall: add EverDay - Weekly Planner by @krsnasgr in https://github.com/rorkai/App-Store-Connect-CLI/pull/3259 * fix(auth): accept private keys flattened by a secret store by @rudrankriyam in https://github.com/rorkai/App-Store-Connect-CLI/pull/3260 * fix(versions): read the version back after an ambiguous release failure by @rudrankriyam in https://github.com/rorkai/App-Store-Connect-CLI/pull/3261 * fix(certificates): match serial numbers across leading zeros by @rudrankriyam in https://github.com/rorkai/App-Store-Connect-CLI/pull/3262 * feat(storekit): filter transaction history by ownership type by @rudrankriyam in https://github.com/rorkai/App-Store-Connect-CLI/pull/3263 * feat(certificates): warn about the expiring Developer ID authority by @rudrankriyam in https://github.com/rorkai/App-Store-Connect-CLI/pull/3264 * feat(validate): report version media delivery state per locale by @rudrankriyam in https://github.com/rorkai/App-Store-Connect-CLI/pull/3265 * f
- v6.2.0
支持 Enterprise Program API:客户端可指定企业计划 API,并新增企业计划 API 密钥认证;Web 端可管理 Business 协议更新;修复 Developer Portal 相关问题并升级多项依赖。
- v6.1.0
价格 PPP 变更支持按地区过滤,区分协议提醒与待处理协议,校验首个内购审核附件,对字面量 plist bundle 版本给出警告,并在应用墙上新增两款应用。
评论