
App Store Connect CLI
CLIasc 命令行:脚本化调用 App Store Connect API,管理构建、TestFlight、元数据、签名与提审,可在终端或 CI 自动化 iOS/macOS 发布,并附带配套 agent 技能包。需要 App Store Connect API 密钥。
App Store Connect CLI
A fast, lightweight, and scriptable CLI for the App Store Connect API. Automate iOS, macOS, tvOS, and visionOS release workflows from your terminal, IDE, or CI/CD pipeline.
Table of Contents
- asc skills
- Sponsors
- Quick Start
- Troubleshooting
- Privacy and telemetry
- Support
- Wall of Apps
- Common Workflows
- Commands and Reference
- Documentation
- Contributing
- License
asc skills
Agent Skills for automating asc workflows including builds, TestFlight, metadata sync, submissions, and signing:
https://github.com/rorkai/app-store-connect-cli-skills
Install them globally so they are available across projects:
asc install-skills
asc install-skills checks out reviewed commit
f52c4f04323bb2dfb21ca8be82e6494e9cd0b4d8 and copies its 25 skills directly
into the standard global agent-skills directory. It verifies the complete pack
and every installed file before succeeding, preserves unrelated skills and
unrelated lock entries, and pins the 25 ASC lock entries to the same reviewed
commit so external checks cannot update them from a mutable branch. It rolls
back the pack if any replacement fails. Only
git is required; the command does not execute Node.js, npx, an npm package,
or repository scripts.
git --version
asc install-skills
Quick Start
If you want to confirm the binary works before configuring authentication:
asc version
asc --help
1. Install
# Homebrew (recommended)
brew install asc
# Install script (macOS/Linux)
curl -fsSL https://asccli.sh/install | bash
# Windows (WinGet, once the package is accepted)
winget install asc
# Exact fallback when scripting
winget install --id Rorkai.ASC --exact
The WinGet package is tracked in
GitHub Discussion #1552.
Until it appears in winget search asc, Windows users can download the signed
release binaries directly from the
GitHub releases page.
For source builds and contributor setup, see CONTRIBUTING.md.
Released binaries are self-contained and do not require a Go installation;
source builds use the toolchain version declared by go.mod.
Releases built with Go 1.27 require macOS 13 Ventura or later. On older Macs,
retain an older compatible release or upgrade macOS before updating asc.
2. Authenticate
asc auth login \
--name "MyApp" \
--key-id "ABC123" \
--issuer-id "DEF456" \
--private-key /path/to/AuthKey.p8 \
--network
Individual API keys have no issuer ID. Omit --issuer-id and pass --key-type individual:
asc auth login \
--name "MyIndividualKey" \
--key-id "ABC123" \
--key-type individual \
--private-key /path/to/AuthKey.p8
Generate API keys at: https://appstoreconnect.apple.com/access/integrations/api
If you are running in CI, a headless shell, or a machine where keychain access is not available, use config-backed auth instead:
asc auth login \
--bypass-keychain \
--name "MyCIKey" \
--key-id "ABC123" \
--issuer-id "DEF456" \
--private-key /path/to/AuthKey.p8
3. Validate auth
asc auth status --validate
asc auth doctor
4. First command
asc apps list --output table
asc apps list --output json --pretty
Output defaults (TTY-aware)
asc chooses a default --output based on where stdout is connected:
- Interactive terminal (TTY):
table - Non-interactive output (pipes/files/CI):
json
You can still set a global preference:
export ASC_DEFAULT_OUTPUT=markdown
And explicit flags always win:
asc apps list --output json
Compatibility
Commands are supported as documented. Deprecation warnings identify the available migration path and the command's long-term replacement.
Troubleshooting
Homebrew
- Refresh Homebrew first:
brew update && brew upgrade asc - Check which binary you are running:
which asc - Confirm the installed version:
asc version - If Homebrew is behind the latest GitHub release, use the install script from
https://asccli.sh/install
WinGet
- Refresh WinGet sources first:
winget source update - Prefer the short install once available:
winget install asc - If the short name ever becomes ambiguous, use the package identifier:
winget install --id Rorkai.ASC --exact - Confirm the installed command resolves:
Get-Command ascandasc version
Authentication
- Validate the active profile:
asc auth status --validate - Run the auth health check:
asc auth doctor - If keychain access is blocked, retry with
ASC_BYPASS_KEYCHAIN=1or re-runasc auth login --bypass-keychain - Use
asc auth login --local --bypass-keychain ...when you want repo-local credentials in./.asc/config.json
Apple service health
- Check Apple's developer services without credentials:
asc system-status - Narrow unexpected API or upload failures:
asc system-status --service "App Store Connect" - Poll only when requested:
asc system-status --watch --poll-interval 30s - Use
--issues-onlyfor a concise incident view; summary counts still cover all matched services
Output
ascdefaults totablein an interactive terminal andjsonin pipes, files, and CI- Use an explicit format when scripting or sharing repro steps:
--output json,--output table, or--output markdown - Use
--prettywith JSON when you want readable output in terminals or bug reports - Set a personal default with
ASC_DEFAULT_OUTPUT, but remember--outputalways wins
Privacy and telemetry
asc sends pseudonymous command-level usage telemetry by default to help
maintainers understand which commands are used and where reliability work is
needed. Local events include a random installation ID, which lets events from
one installation be grouped over time; it is not derived from an Apple account
or machine identifier.
Telemetry includes the CLI version, operating system and architecture, registered command path, duration, runtime context, invocation source, a bounded outcome class, and the HTTP status when an API request fails. It may include a sanitized public flag name. It does not include raw arguments, stderr, error messages, flag values, response bodies, credentials, private keys, Apple account, team, or issuer IDs, app or bundle IDs, usernames, hostnames, repository names, or file paths.
Review or change telemetry at any time:
asc telemetry status
asc telemetry disable
asc telemetry reset-id
ASC_TELEMETRY_DISABLED=1 and DO_NOT_TRACK=1 also disable telemetry. See the
telemetry reference for the exact event payload,
runtime handling, collector endpoint, and all controls.
Support
- Use GitHub Discussions for install help, authentication setup, workflow advice, and "how do I...?" questions
- Use GitHub Issues for reproducible bugs and concrete feature requests
- See SUPPORT.md for the support policy and bug-report checklist
- Before filing an auth or API bug, retry with
ASC_BYPASS_KEYCHAIN=1; if it is safe to do so, include redacted output fromASC_DEBUG=api asc ...orasc --api-debug ...
Wall of Apps
Want to add yours?
asc apps wall submit --app "1234567890" --confirm
The command uses your authenticated gh session to fork the repo and open a pull request that updates docs/wall-of-apps.json.
It resolves the public App Store name, URL, and icon from the app ID automatically. For manual entries that are not on the public App Store yet, use --link with --name.
Use asc apps wall submit --dry-run to preview the fork, branch, and PR plan before creating anything.
Common Workflows
TestFlight feedback and crashes
asc testflight feedback list --app "123456789" --paginate
asc testflight crashes list --app "123456789" --sort -createdDate --limit 10
asc testflight crashes log --submission-id "SUBMISSION_ID"
Builds and distribution
asc builds upload --app "123456789" --ipa "/path/to/MyApp.ipa"
asc builds list --app "123456789" --output table
asc testflight groups list --app "123456789" --output table
For macOS TestFlight distribution, upload the exported .pkg first, then add
the processed build to a beta group:
asc builds upload --app "123456789" --pkg "./build/MyMacApp.pkg" --version "1.2.3" --build-number "42" --wait --output json
asc builds add-groups --app "123456789" --build-number "42" --version "1.2.3" --platform MAC_OS --group "Internal Testers"
--app is the App Store Connect app ID. If you use local Xcode build flags such
as --archive-path, also pass exactly one of --workspace or --project plus
--scheme; otherwise use a pre-exported .ipa or .pkg upload. Add
--submit --confirm to asc builds add-groups when distributing to an external
TestFlight group that needs beta app review submission.
Release (high-level App Store publish flow)
# Optional: preview the staging plan before submission
asc release stage --app "123456789" --version "1.2.3" --build-id "BUILD_ID" --copy-metadata-from "1.2.2" --dry-run
# Canonical upload + attach + submit command
asc publish appstore --app "123456789" --ipa "/path/to/MyApp.ipa" --version "1.2.3" --submit --confirm
# Wait for the App Review decision (exit 0 approved, 1 rejected, 7 still pending at --timeout)
asc status --app "123456789" --until review-done --timeout 2h
Lower-level submission lifecycle commands (for debugging or partial workflows):
# Canonical readiness check
asc validate --app "123456789" --version "1.2.3"
asc submit status --version-id "VERSION_ID"
asc submit cancel --version-id "VERSION_ID" --confirm
Readiness validation also warns when localized app names, subtitles,
descriptions, keywords, promotional text, or What's New copy still contains an
unmistakable template marker such as Lorem ipsum, TODO, TBD, or FIXME.
Lorem ipsum matches in any letter case. TODO, TBD, and FIXME match only
in uppercase because their lowercase spellings can be ordinary product wording.
The warning includes the locale, field, matched text, resource ID, and a
remediation step. It is advisory by default and becomes blocking only with
--strict:
asc validate --app "123456789" --version "1.2.3" --output json
asc validate --app "123456789" --version "1.2.3" --strict
Add the --deep mode when a release needs checks that Apple
exposes only through its signed-in web app:
asc web auth login --apple-id "user@example.com"
asc validate --app "123456789" --version "1.2.3" --deep
Deep validation reuses the file-backed cache without opening a login, Keychain,
password, or 2FA prompt. It checks App Privacy publication, relevant agreements,
and the first auto-renewable subscription attachment; availability and required
App Review fields still come from the public API. Paid-agreement relevance also
uses the app's current public price so an upfront-paid app isn't mistaken for a
free one. The private Apple endpoints can change without notice, so an
unavailable or changed response is unverified, not a false blocker. Add
--strict if CI must fail when a requested deep check can't be verified.
This lint intentionally does not judge platform names, roadmap language, or
beta/demo wording because those phrases can be legitimate product copy and
cannot be classified reliably offline. It also leaves shorter Lorem Ipsum
product wording and ordinary localized TODO copy without marker punctuation
unflagged; only template-like residue is reported.
Review status and blockers
asc review status --app "123456789"
asc review doctor --app "123456789"
Metadata and localization
asc localizations list --app "123456789" --type app-info
asc metadata init --dir "./metadata" --version "1.2.3" --locale "en-US"
# Fill in the values to apply and delete keys to leave unchanged; empty values are rejected.
asc metadata apply --app "123456789" --version "1.2.3" --dir "./metadata" --dry-run
asc metadata keywords audit --app "123456789" --version "1.2.3" --blocked-terms-file "./blocked-terms.txt"
asc apps info view --app "123456789" --output json --pretty
Use asc metadata keywords audit before sync or apply when you want an ASO-focused
review of live keyword metadata across locales. It reports duplicate phrases, repeated
terms across locales, overlap with localized app name or subtitle, byte-budget usage,
and optional blocked terms from repeated --blocked-term flags or a text file.
Screenshots and media
asc screenshots plan --app "123456789" --version "1.2.3" --review-output-dir "./screenshots/review"
asc screenshots apply --app "123456789" --version "1.2.3" --review-output-dir "./screenshots/review" --confirm
asc screenshots list --version-localization "VERSION_LOCALIZATION_ID"
asc video-previews list --version-localization "VERSION_LOCALIZATION_ID"
Uploading screenshots for a single locale:
asc apps list
asc versions list --app "APP_ID"
asc localizations list --version "VERSION_ID" --output json --locale "en-US" | jsonpp
asc screenshots upload --version-localization "VERSION_LOCALIZATION_ID" --path "./screenshots/en-US" --device-type "IPHONE_65" --replace --confirm --max-screenshots 10
VERSION_LOCALIZATION_ID is the App Store version localization resource ID
from data[].id, not the locale code from attributes.locale.
For local capture coverage across multiple devices, locales, appearances, and content fixtures, use a matrix plan. Targets must already be booted simulators; the command writes raw artifacts and an offline review report, without uploading to App Store Connect:
asc screenshots matrix --plan .asc/screenshots-matrix.json --max-concurrency 2 --output json --pretty
See docs/design/screenshots-matrix.md for the JSONC schema, isolated output layout, retry behavior, and review contract.
Signing and bundle IDs
asc bundle-ids capabilities list --bundle "BUNDLE_ID"
asc signing fetch --bundle-id com.example.app --profile-type IOS_APP_STORE --output .asc/signing
asc signing sync pull --repo git@github.com:team/signing.git --password-file ~/.config/asc/signing-sync-password --output-dir .asc/signing/pulled
signing fetch downloads public certificates and provisioning profiles. A
usable signing identity also needs the matching private key; signing sync
can verify that local identity and share it through an encrypted store (Git by
default). When the team has no active certificate, signing fetch --create-missing --create-missing-certificate creates the key, certificate,
profile, and .p12 in one pass. signing keychain installs and manages a
dedicated keychain, and xcode signing plan --profile maps downloaded profiles
onto Xcode targets; docs/CI_CD.md lists the fresh-runner
sequence. For multi-target release testing, signing reconcile plans exact
device/profile changes. signing run provides a temporary macOS keychain only
for single-target archives. Multi-target exports must import the identity into
a job-scoped keychain and install every reconciled profile for the job-exclusive
macOS user. See the
signing guide for setup, CI, rotation, security
boundaries, and troubleshooting.
Workflow automation
asc workflow validate --output json
asc workflow run --dry-run testflight_beta VERSION:1.2.3
Raw API requests
asc api GET /v1/apps --query limit=5
asc api GET /v1/apps/APP_ID/relationships/builds --paginate
asc api PATCH /v1/apps/APP_ID --confirm --body-file update.json
Verified local Xcode -> TestFlight workflow
See docs/WORKFLOWS.md for local compile validation with
asc xcode build and a copyable .asc/deployment.json, .asc/workflow.json,
and ExportOptions.plist that use asc builds next-build-number,
asc xcode inject, asc xcode archive, asc xcode export --timeout 10m, and
asc publish testflight --group ... --wait.
Add --submit --confirm when
distributing to an external TestFlight group that needs beta app review submission.
The asc xcode test command provides local unit/UI test execution
with structured results and preserved .xcresult bundles; see the same workflow
guide for an invocation.
asc workflow validate --output json
asc xcode inject --manifest .asc/deployment.json --set version=1.2.3 --set build_number=42 --dry-run --output json
asc xcode build --project App.xcodeproj --scheme App --destination 'platform=iOS Simulator,name=iPhone 17 Pro Max,OS=27.0' --no-code-signing --output json
asc workflow run --dry-run testflight_beta VERSION:1.2.3
asc workflow run testflight_beta VERSION:1.2.3
Replace the example Xcode destination with a simulator installed on the host.
Xcode Cloud workflows and build runs
# Trigger from a pull request
asc xcode-cloud run --workflow-id "WORKFLOW_ID" --pull-request-id "PR_ID"
# Rerun from an existing build run with a clean build
asc xcode-cloud run --source-run-id "BUILD_RUN_ID" --clean
# Fetch a single build run by ID
asc xcode-cloud build-runs view --id "BUILD_RUN_ID"
Apple Ads campaign management
Apple Ads uses separate OAuth credentials from App Store Connect:
asc ads auth login --name "Marketing" --client-id "SEARCHADS_CLIENT_ID" --team-id "SEARCHADS_TEAM_ID" --key-id "KEY_ID" --private-key ./ads-key.pem --ad-account "987654"
asc ads auth discover --output json
asc ads campaigns find --ad-account "987654" --file query.json --output json
asc ads reports apps campaigns --ad-account "987654" --file report.json --output json
See guides/apple-ads-playbooks.mdx for operator playbooks covering credential safety, org inspection, read-only smoke tests, reporting, raw API usage, and guarded mutations.
StoreKit server APIs
The App Store Server API and Retention Messaging use a dedicated In-App Purchase API key, separate from App Store Connect API credentials:
asc storekit auth login --name Production --key-id "KEY_ID" --issuer-id "ISSUER_ID" --private-key ./SubscriptionKey.p8 --bundle-id com.example.app
asc storekit auth doctor --environment sandbox --network
asc storekit transactions history --transaction-id "2000000000000001" --environment production --paginate
asc storekit subscriptions status --transaction-id "2000000000000001" --environment production --output table
asc storekit notifications history --start 2026-09-01 --end 2026-09-08 --only-failures --environment production
asc storekit retention-messaging messages list --environment sandbox --output json
JSON output prints Apple's response unmodified. --decode adds decoded JWS
payloads without verifying Apple's signature, so don't grant entitlements from
decoded output alone.
See docs/architecture/storekit-retention-messaging.md for the endpoint map, message and image requirements, environment variables, and the full sandbox verification sequence.
Commands and Reference
Use built-in help as the source of truth:
asc --help
asc <command> --help
asc <command> <subcommand> --help
Reference hierarchy:
asc --help: authoritative command and flag surfacedocs/COMMANDS.md: generated top-level taxonomy mapasc docs show workflows: curated workflow recipesasc docs show reference: repo-local quick reference template used byasc init
For full command families, flags, and discovery patterns, see:
Documentation
- docs/CI_CD.md - CI/CD integration guides (GitHub Actions, GitLab, Bitrise, CircleCI)
- commands/signing.mdx - signing identities, encrypted sync, CI, and release-testing profiles
- docs/COMMANDS.md - Command families and reference navigation
- docs/PARITY.md - Remaining parity areas and intentional non-goals
- docs/WORKFLOWS.md - Reusable workflow patterns, including local Xcode to TestFlight
- guides/apple-ads-playbooks.mdx - Apple Ads operator playbooks
- docs/architecture/storekit-retention-messaging.md - Retention Messaging setup and sandbox verification
- docs/API_NOTES.md - API quirks and behaviors
- docs/CONTRIBUTING.md - CLI development and testing notes
- docs/TESTING.md - Testing patterns and conventions
- docs/openapi/README.md - Offline OpenAPI snapshot + update flow
- CONTRIBUTING.md - Contribution guide
Acknowledgements
Local screenshot framing uses Koubou (pinned to 0.20.0) for deterministic device-frame rendering.
GitHub: https://github.com/bitomule/koubou
Simulator UI automation for screenshot capture and interactions uses AXe CLI. GitHub: https://github.com/cameroncooke/AXe
The keyword difficulty methodology used by asc optimize keywords score is adapted from semihcihan's App Store Optimization CLI (MIT licensed).
GitHub: https://github.com/semihcihan/App-Store-Optimization-CLI
Contributing
For portable Linux iOS builds and local IPA packaging with xtool and rcodesign, see the Linux iOS workflow. Native simulator execution still requires a Mac host; existing Xcode archive/export helpers retain their contracts.
Contributions are welcome. See CONTRIBUTING.md for details.
License
MIT License - see LICENSE for details.
This project is an independent, unofficial tool and is not affiliated with, endorsed by, or sponsored by Apple Inc. App Store Connect, TestFlight, Xcode Cloud, and Apple are trademarks of Apple Inc., registered in the U.S. and other countries.
相关资源

fastlane
CLIiOS 与 Android 发布自动化工具:用 lane 编排构建、签名证书管理、截图生成与上架 App Store / Google Play,agent 可直接调用项目里现成的 lane。
fastlane/fastlane42.2k
xcbeautify
CLI把冗长的 xcodebuild 与 swift test 输出整理成简洁的编译错误、警告和测试结果,减少 agent 需要读取的日志;可生成 JUnit 报告并适配 GitHub Actions 等 CI,支持 macOS 与 Linux。
cpisciotta/xcbeautify1.6k
Maestro
CLI用 YAML 编写 Android、iOS 与 Web 应用的端到端 UI 测试;CLI 内置 MCP 服务器(maestro mcp),编码 agent 可在模拟器上点击、断言并生成测试。需 Java 17+。
mobile-dev-inc/Maestro16.1k
agent-device
CLICallstack 出品,让编码 agent 通过无障碍快照操作并验证 iOS、Android、鸿蒙与桌面应用:点击、填表、截图、日志与性能采样,内置 MCP 服务器。需 Node.js 22.12+。
callstack/agent-device5k
Expo Skills
SkillExpo 官方技能合集:覆盖 Expo Router 导航、原生风格界面、动画、原生模块与 SDK 升级,以及 EAS 构建提审、OTA 更新与 CI 工作流。EAS 相关技能会用到 Expo 的付费服务。
expo/skills2.9k
Apple Design
Skill以 Apple 人机界面指南为依据(内置从 developer.apple.com 抓取的 123 页原文)审查移动端与桌面应用的界面设计,从无障碍、平台惯例等五个角度逐项引用条款给出意见,同时指出模板化、缺少个性的地方。可审截图、设计稿、Figma 导出或界面代码,适用于 SwiftUI、UIKit、Flutter、React Native、Tauri、Electron。
dickwu/apple-design-skill1.5k