Configuration
asc-cli supports multiple configuration methods for flexibility across different environments.
Configuration Priority
Settings are applied in this order (later overrides earlier):
- Config file (
~/.config/asc-cli/config.yaml) - Environment variables (
ASC_*) - Command-line options (
--issuer-id, etc.)
Authentication Configuration
Method 1: Interactive Login (Recommended)
asc auth login
Stores credentials in ~/.config/asc-cli/credentials.
Method 2: Environment Variables
export ASC_ISSUER_ID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
export ASC_KEY_ID="XXXXXXXXXX"
export ASC_PRIVATE_KEY_PATH="~/.config/asc-cli/AuthKey.p8"
Or provide key content directly:
export ASC_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----
MIGTAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBHkwdwIBAQQg...
-----END PRIVATE KEY-----"
Method 3: Config File
Create ~/.config/asc-cli/credentials:
[default]
issuer_id = xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
key_id = XXXXXXXXXX
private_key_path = ~/.config/asc-cli/AuthKey.p8
Method 4: Command-Line Options
asc --issuer-id XXX --key-id YYY --key-path ~/.asc/key.p8 apps list
Environment Variables Reference
Authentication
| Variable | Description | Example |
|---|---|---|
ASC_ISSUER_ID | App Store Connect Issuer ID | 12345678-1234-... |
ASC_KEY_ID | API Key ID | ABCD123456 |
ASC_PRIVATE_KEY_PATH | Path to .p8 file | ~/.asc/key.p8 |
ASC_PRIVATE_KEY | Key content (alternative) | -----BEGIN... |
Behavior
| Variable | Description | Default |
|---|---|---|
ASC_MOCK | Use mock server | false |
ASC_MOCK_URL | Mock server URL | http://localhost:8080 |
ASC_OUTPUT | Output format | table |
ASC_VERBOSE | Verbose logging | false |
ASC_DEBUG | Debug mode | false |
ASC_NO_COLOR | Disable colored output | false |
Paths
| Variable | Description | Default |
|---|---|---|
ASC_CONFIG_DIR | Config directory | ~/.config/asc-cli |
ASC_CACHE_DIR | Cache directory | ~/.cache/asc-cli |
Config File
Location
Default: ~/.config/asc-cli/config.yaml
Override with: ASC_CONFIG_DIR environment variable
Full Example
# ~/.config/asc-cli/config.yaml
# Default output format: table, json, yaml
output: table
# Enable colored output
color: true
# Verbose logging
verbose: false
# Debug mode (very verbose)
debug: false
# Default dry-run mode (safety first)
dry_run: false
# Mock server settings
mock:
enabled: false
url: http://localhost:8080
# Default app (used when --app not specified)
default_app: live.yooz.whisper
# Aliases for common operations
aliases:
sub: subscriptions
tf: testflight
Multiple Profiles
Creating Profiles
For multiple App Store Connect accounts, use profiles:
# ~/.config/asc-cli/credentials
[default]
issuer_id = xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
key_id = XXXXXXXXXX
private_key_path = ~/.config/asc-cli/keys/default.p8
[company]
issuer_id = yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy
key_id = YYYYYYYYYY
private_key_path = ~/.config/asc-cli/keys/company.p8
[personal]
issuer_id = zzzzzzzz-zzzz-zzzz-zzzz-zzzzzzzzzzzz
key_id = ZZZZZZZZZZ
private_key_path = ~/.config/asc-cli/keys/personal.p8
Using Profiles
# Use default profile
asc apps list
# Use specific profile
asc --profile company apps list
# Or via environment variable
ASC_PROFILE=company asc apps list
Switching Default Profile
asc auth use company
CI/CD Configuration
GitHub Actions
# .github/workflows/deploy.yml
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install asc-cli
run: pip install asc-cli
- name: Configure App Store Connect
env:
ASC_ISSUER_ID: ${{ secrets.ASC_ISSUER_ID }}
ASC_KEY_ID: ${{ secrets.ASC_KEY_ID }}
ASC_PRIVATE_KEY: ${{ secrets.ASC_PRIVATE_KEY }}
run: |
asc auth test
asc bulk apply subscriptions.yaml
GitLab CI
# .gitlab-ci.yml
deploy_subscriptions:
image: python:3.11
variables:
ASC_ISSUER_ID: $ASC_ISSUER_ID
ASC_KEY_ID: $ASC_KEY_ID
ASC_PRIVATE_KEY: $ASC_PRIVATE_KEY
script:
- pip install asc-cli
- asc auth test
- asc bulk apply subscriptions.yaml
CircleCI
# .circleci/config.yml
jobs:
deploy:
docker:
- image: python:3.11
steps:
- checkout
- run:
name: Install asc-cli
command: pip install asc-cli
- run:
name: Apply subscriptions
command: |
asc auth test
asc bulk apply subscriptions.yaml
Output Formats
Table (Default)
Human-readable tables:
asc apps list
Bundle ID Name SKU
live.yooz.whisper Yooz Whisper YOOZWHISPER
JSON
Machine-readable JSON:
asc apps list --output json
# or
ASC_OUTPUT=json asc apps list
[
{
"bundleId": "live.yooz.whisper",
"name": "Yooz Whisper",
"sku": "YOOZWHISPER"
}
]
YAML
YAML format:
asc apps list --output yaml
- bundleId: live.yooz.whisper
name: Yooz Whisper
sku: YOOZWHISPER
Quiet Mode
Minimal output for scripting:
asc apps list --quiet
live.yooz.whisper
Shell Completion
Bash
# Add to ~/.bashrc
eval "$(_ASC_COMPLETE=bash_source asc)"
Zsh
# Add to ~/.zshrc
eval "$(_ASC_COMPLETE=zsh_source asc)"
Fish
# Run once
_ASC_COMPLETE=fish_source asc > ~/.config/fish/completions/asc.fish
Troubleshooting Configuration
Check Current Configuration
asc config show
Shows all active configuration values and their sources.
Validate Configuration
asc config validate
Checks for common configuration issues.
Reset Configuration
# Remove all configuration
rm -rf ~/.config/asc-cli
# Re-run setup
asc auth login
Learn More
- Authentication - Detailed credential setup
- Quick Start - Get started in 5 minutes
- Command Reference - All available commands