Skip to main content

A command-line interface for the App Store Connect API

Project description

appstore-cli

A command-line interface for the App Store Connect API. Manage apps, builds, TestFlight, certificates, provisioning profiles, App Store submissions, and 190+ other resources — all from your terminal.

Commands are auto-generated from Apple's OpenAPI spec via a compact manifest, so when Apple ships new API endpoints, a single python3 generate_manifest.py brings them into the CLI.

Quick start

pip install appstore-cli
appstore auth setup          # walks you through Key ID, Issuer ID, .p8 path
appstore apps list           # verify it works

Requirements

Installation

From PyPI (recommended):

pip install appstore-cli

Or with pipx for an isolated install:

pipx install appstore-cli

From source:

git clone https://github.com/ohmguru/AppStoreConnectCLI.git
cd AppStoreConnectCLI
pip install .

Authentication

appstore needs three values to authenticate: Key ID, Issuer ID, and the path to your .p8 private key.

Interactive setup (recommended):

appstore auth setup

Prompts for each value and saves them to ~/.config/appstore/default.env (chmod 600).

Environment variables (override any profile):

export ASC_KEY_ID=...
export ASC_ISSUER_ID=...
export ASC_KEY_PATH=...

Multiple profiles

If you work across multiple teams or accounts, create named profiles:

appstore auth setup                  # default profile
appstore auth setup --profile work   # additional profile
appstore auth setup --profile client # another one

appstore auth list                   # show all profiles
appstore auth use work               # switch active profile
appstore auth status                 # show active profile details
appstore auth reset --profile client # remove a profile

Use --profile on any command for a one-off override without switching:

appstore --profile work apps list

Profiles are stored as individual files in ~/.config/appstore/:

~/.config/appstore/
  active          # contains name of active profile
  default.env     # default profile credentials
  work.env        # work profile credentials

Usage

appstore [--json] [--profile NAME] <resource> <command> [options]

Apps & Builds

appstore apps list
appstore apps list --filter-bundle-id com.example.MyApp
appstore apps get APP_ID

appstore builds list --include app --sort -uploadedDate
appstore builds list --filter-app APP_ID --include app
appstore builds get BUILD_ID

Certificates, Profiles & Devices

appstore certificates list --filter-certificate-type IOS_DISTRIBUTION --sort displayName
appstore certificates create --csr-content "$(cat req.csr)" --certificate-type IOS_DISTRIBUTION
appstore certificates delete CERT_ID

appstore profiles list --filter-profile-type IOS_APP_STORE
appstore devices list --filter-platform IOS
appstore devices create --name "iPhone" --platform IOS --udid UDID_HERE

appstore bundle-ids list --filter-platform IOS
appstore bundle-ids create --name "MyApp" --platform IOS --identifier com.example.MyApp

TestFlight

appstore beta-groups list --include app
appstore beta-groups create --name "Testers" --app-id APP_ID
appstore beta-groups add-build GROUP_ID BUILD_ID
appstore beta-groups remove-build GROUP_ID BUILD_ID

appstore beta-testers list --filter-email user@example.com
appstore beta-testers create --email user@example.com --first-name Jane --last-name Doe \
    --beta-groups-id GROUP_ID

appstore beta-app-review-submissions create --build-id BUILD_ID

App Store Submissions

appstore app-store-versions create --version-string 1.2.0 --platform IOS --app-id APP_ID
appstore app-store-versions set-build VERSION_ID BUILD_ID

appstore review-submissions create --platform IOS --app-id APP_ID
appstore review-submissions get SUBMISSION_ID

More resources

There are 198 resource groups in total. Run appstore --help to see them all, or appstore <resource> --help for available subcommands.

appstore users list
appstore in-app-purchases list
appstore subscriptions get SUB_ID
appstore customer-reviews list

Common options

Every list command supports:

Option Description
--limit N Max results per page (default 200)
--all Auto-paginate through all results
--sort FIELD Sort by field (prefix with - for descending)
--filter-FIELD VALUE Filter results (available filters vary by resource)
--include TYPE Sideload related resources into the response

Add --json before any subcommand for raw JSON:API output:

appstore --json builds list --limit 5

Use --help on any command to see all available options:

appstore certificates list --help

How it works

openapi.oas.json  ──▶  generate_manifest.py  ──▶  manifest.json  ──▶  appstore (generic engine)
   (Apple spec)            (one-time gen)          (198 resources)       (CLI commands)
  1. generate_manifest.py parses Apple's OpenAPI spec and extracts a compact manifest of every resource: paths, operations, filters, sort fields, create/update schemas, and display attributes.
  2. manifest.json is the generated output — bundled inside the appstore_cli package so the CLI works without the 6 MB OpenAPI spec at runtime.
  3. appstore loads the manifest at startup and dynamically registers Click command groups for each resource. The only hand-written command is auth (credential management).

Updating when Apple releases a new API version

  1. Download the latest OpenAPI spec
  2. Place openapi.oas.json in the project root
  3. Regenerate:
python3 generate_manifest.py
  1. Commit the updated appstore_cli/manifest.json

Customizing commands

To override any generic command with a hand-written one, add a Click group with the same name in cli.py before register_generic_commands() is called. The engine skips any name that's already registered.

Project structure

appstore_cli/
  __init__.py           Package init
  cli.py                CLI entry point
  manifest.json         Generated resource definitions (198 resources)
generate_manifest.py    OpenAPI → manifest generator
pyproject.toml          Package metadata and dependencies

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

appstore_cli-0.1.0.tar.gz (28.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

appstore_cli-0.1.0-py3-none-any.whl (26.4 kB view details)

Uploaded Python 3

File details

Details for the file appstore_cli-0.1.0.tar.gz.

File metadata

  • Download URL: appstore_cli-0.1.0.tar.gz
  • Upload date:
  • Size: 28.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for appstore_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d5b1fc6bf6351f65d01566f3077213dd0fb8f733812dec6adba960dbdcc399f7
MD5 89bedb665ffb5c631e0c9f0a02a9d4dc
BLAKE2b-256 70552ece2313bf54942810b77163162b666f1b6cb33ed7c92d98c709335cfbd7

See more details on using hashes here.

File details

Details for the file appstore_cli-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: appstore_cli-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 26.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for appstore_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 816ed93eafc1a10e91c41f23ff1ce67316dcfa87aaf48f2788bd71823d3c5300
MD5 8a42cd4e7f299c7bcb4a039679b178c5
BLAKE2b-256 e8a1a3cd4a688cf35efca788048962029cb9eafe4a6e85ce2e67af7aeb0b48a6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page