App Store Connect CLI (asc)

repository·main·Indexed 26 days ago

https://github.com/rorkai/app-store-connect-cli

A fast, lightweight, and scriptable tool designed to automate iOS, macOS, tvOS, and visionOS release workflows via the App Store Connect API. It provides capabilities for authenticating with API keys, uploading builds to TestFlight, publishing apps to the App Store, managing localized metadata and screenshots, and handling StoreKit Retention Messaging.

Tokens
116.9K
Snippets
405
Records
736
Agent score
89%

What's inside App Store Connect CLI

  1. Understand the Q2 2026 Architectural Rewrite Plan

    main

    The asc CLI is undergoing an incremental rewrite (April 1, 2026 – June 30, 2026) to replace its execution foundation. The goal is to move away from process-wide shared state (found in the monolithic shared package) toward an explicit runtime object that manages cross-cutting concerns like authentication, client creation, output resolution, and timeouts.

    Key Architectural Changes:

    • Runtime Object: A new internal/cli/runtime package will own CLI behavior.
    • Command Construction: Commands will be rebuilt to accept a *runtime.Runtime object instead of relying on global state.
    • Vertical Migration: Migration is organized by command families (e.g., status, submit, release) rather than individual helper functions.
  2. Understand Localization Types: Version vs App Info

    main

    The CLI distinguishes between two types of localization metadata:

    Version Localizations

    Metadata specific to a single app version:

    • What's New text
    • Description (if not using app-info)
    • Keywords (if not using app-info)
    • Support URL (if not using app-info)
    • Marketing URL
    • Promotional text
    • Screenshots
    • App previews

    App Info Localizations

    Metadata shared across all versions of the app:

    • App description
    • Keywords
    • Support URL
    • Privacy policy URL
    • Subtitle
  3. App Store Connect API 4.4.1 Coverage Ledger

    main
    This document serves as a technical ledger verifying that the App Store Connect CLI provides production-ready support for all behaviors introduced or changed in the App Store Connect API version 4.4.1. It tracks the implementation status of new paths, operations, and schemas to ensure the CLI maintains parity with Apple's official OpenAPI specification without altering the semantics of existing stable commands.
  4. Manage App Store discoverability tags with `app-tags`

    main

    The app-tags command group allows you to inspect and manage Apple-generated App Store discoverability tags attached to an app. These tags help users understand an app's qualities and appear in search results and product pages.

    Each tag resource includes:

    • name: The label returned by App Store Connect.
    • visibleInAppStore: Whether the tag is currently visible in the storefront.
    • territories: The storefront territories linked to that tag.

    Use the list command to discover tag IDs, then use view, territories, or update to manage specific tags.

  5. Manage app metadata with `asc metadata`

    main
    The metadata command allows you to manage App Store Connect metadata using a deterministic file-based workflow. You can pull existing metadata into local JSON files, edit them, and push the changes back to App Store Connect. This enables version control, code reviews, and CI/CD integration for app metadata.
  6. Understand the Q2 2026 Runtime Migration Plan

    main

    The App Store Connect CLI is undergoing an incremental rewrite (Q2 2026) to move from a monolithic shared package architecture to a domain-driven runtime architecture. This migration aims to reduce global state, split large files like internal/asc/client_options.go into resource-specific files, and move all root command families to a runtime-backed construction model.

    Key Architectural Changes:

    • From: A monolithic shared package handling auth, client construction, and output.
    • To: A distributed structure including internal/cli/runtime, internal/cli/shared/auth, internal/cli/shared/output, etc.
    • Client Organization: Moving away from umbrella files toward resource-specific files (e.g., client_options_builds.go).
  7. Locate the offline App Store Connect OpenAPI spec

    main

    The docs/openapi/ directory contains offline snapshots of the App Store Connect OpenAPI specification. This is useful for agents or environments without internet access.

    • latest.json: The complete OpenAPI specification snapshot.
    • paths.txt: A generated index of all available paths and methods for quick existence checks.
  8. Explore related App Store Connect CLI commands

    main

    The insights command is part of a suite of tools for managing App Store Connect data. For different data types, use the following related commands:

    • Analytics: Use this to download raw analytics and sales reports.
    • Finance: Use this for financial reports and payment data.
    • Subscriptions: Use this to manage subscription products and pricing.
  9. Authenticate for StoreKit Retention Messaging

    main

    StoreKit Retention Messaging uses a separate authentication mechanism from standard App Store Connect requests. You must use an In-App Purchase API key. You can store a named profile in the keychain using asc storekit auth login or use environment variables for CI/CD or local development.

    Environment Variables:

    • ASC_STOREKIT_KEY_ID
    • ASC_STOREKIT_ISSUER_ID
    • ASC_STOREKIT_PRIVATE_KEY_PATH
    • ASC_STOREKIT_PRIVATE_KEY
    • ASC_STOREKIT_PRIVATE_KEY_B64
    • ASC_STOREKIT_BUNDLE_ID
    • ASC_STOREKIT_ENVIRONMENT
    • ASC_STOREKIT_PROFILE
    • ASC_STOREKIT_STRICT_AUTH
    • ASC_STOREKIT_BYPASS_KEYCHAIN
    asc storekit auth login \
      --name Production \
      --key-id "$KEY_ID" \
      --issuer-id "$ISSUER_ID" \
      --private-key ./SubscriptionKey.p8 \
      --bundle-id com.example.app
  10. Best Practices for Workflow Automation

    main

    When automating tasks with the App Store Connect CLI, follow these best practices:

    • Validation: Always run asc workflow validate after editing a workflow file.
    • Security: Never hardcode secrets or sensitive IDs. Use environment variables instead.
    • Testing: Use the --dry-run flag to preview execution without making changes.
    • Error Handling: Define error hooks to perform cleanup operations if a step fails.
    • Modularity: Keep workflows focused and break complex logic into composable sub-workflows. Use private workflows for common logic.
    • Version Control: Store your .asc/workflow.json in git.
    • Documentation: Use descriptive names and document required KEY:VALUE parameters in the workflow descriptions.
  11. Publish to the App Store

    main

    The standard workflow for publishing involves validating the version and then submitting it.

    1. Validate: asc validate --app "<APP_ID>" --version "<VERSION>".
    2. Publish: asc publish appstore --app "<APP_ID>" --ipa "<PATH_TO_IPA>" --version "<VERSION>" --submit --confirm.

    After submission, use asc submit status or asc submit cancel to manage the lifecycle.

    asc publish appstore --app "123456789" --ipa "./MyApp.ipa" --version "1.2.3" --submit --confirm