Skip to main content

Commands Overview

Reference for all asc-cli commands, patterns, and conventions.

Command Structure

All commands follow this pattern:

asc [global-options] <command> [subcommand] [arguments] [options]

Examples

# Simple command
asc apps list

# Command with argument
asc apps info live.yooz.whisper

# Command with options
asc subscriptions pricing set SUB_ID --price 2.99 --dry-run

# Global options
asc --output json apps list
asc --verbose subscriptions list APP_ID

Global Options

Available on all commands:

OptionShortDescription
--help-hShow help message
--version-VShow version
--output-oOutput format: table, json, yaml
--verbose-vEnable verbose output
--debugEnable debug mode
--quiet-qMinimal output
--no-colorDisable colored output
--dry-runPreview without applying changes
--profile-pUse specific credential profile

Command Groups

Authentication

CommandDescription
asc auth loginConfigure credentials
asc auth logoutRemove credentials
asc auth statusCheck auth status
asc auth testTest API connection

Apps

CommandDescription
asc apps listList all apps
asc apps infoGet app details

Subscriptions

CommandDescription
asc subscriptions listList subscriptions
asc subscriptions pricing listView pricing
asc subscriptions pricing setSet pricing
asc subscriptions offers listList offers
asc subscriptions offers createCreate offer
asc subscriptions offers deleteDelete offer

TestFlight

CommandDescription
asc testflight builds listList builds
asc testflight builds expireExpire build
asc testflight groups listList beta groups
asc testflight groups createCreate group
asc testflight testers listList testers
asc testflight testers addAdd tester
asc testflight testers removeRemove tester

Bulk Operations

CommandDescription
asc bulk initGenerate config template
asc bulk validateValidate config
asc bulk applyApply configuration
asc bulk schemaExport JSON schema

Mock Server

CommandDescription
asc mock startStart mock server
asc mock stopStop mock server
asc mock statusCheck mock server

Output Formats

Table (Default)

asc apps list
Bundle ID                    Name             SKU
live.yooz.whisper Yooz Whisper YOOZWHISPER
live.yooz.notes Yooz Notes YOOZNOTES

JSON

asc apps list --output json
[
{
"bundleId": "live.yooz.whisper",
"name": "Yooz Whisper",
"sku": "YOOZWHISPER",
"id": "1234567890"
}
]

YAML

asc apps list --output yaml
- bundleId: live.yooz.whisper
name: Yooz Whisper
sku: YOOZWHISPER
id: '1234567890'

Quiet Mode

asc apps list --quiet
live.yooz.whisper
live.yooz.notes

Exit Codes

CodeMeaning
0Success
1General error
2Invalid usage / bad arguments
3Authentication error
4API error (rate limit, server error)
5Resource not found
10Dry-run success (changes would be made)

Scripting Example

asc subscriptions pricing set SUB_ID --price 2.99 --dry-run
if [ $? -eq 10 ]; then
echo "Changes ready to apply"
asc subscriptions pricing set SUB_ID --price 2.99
fi

Dry-Run Mode

Most write operations support --dry-run:

# Preview pricing changes
asc subscriptions pricing set SUB_ID --price 2.99 --dry-run

# Preview bulk apply
asc bulk apply subscriptions.yaml --dry-run

Dry-run output shows what would happen without making changes:

DRY RUN - No changes will be made

Would set pricing for subscription: live.yooz.whisper.pro.monthly
USA: $2.99
GBR: £2.49
DEU: €2.99
...

175 territories would be updated

Verbose and Debug

Verbose Mode

Shows additional information:

asc -v subscriptions pricing set SUB_ID --price 2.99
Finding price point for $2.99...
Found price point: 60
Getting equalized prices...
175 territories to update
Creating price for USA... done
Creating price for GBR... done
...

Debug Mode

Shows API requests and responses:

asc --debug apps list
DEBUG: GET https://api.appstoreconnect.apple.com/v1/apps
DEBUG: Headers: Authorization: Bearer eyJ...
DEBUG: Response: 200 OK
DEBUG: Body: {"data": [...]}
...

Common Patterns

Piping and Filtering

# Get app IDs only
asc apps list --quiet | head -1

# Filter with jq
asc apps list --output json | jq '.[] | select(.name | contains("Whisper"))'

# Use in scripts
APP_ID=$(asc apps info live.yooz.whisper --output json | jq -r '.id')

Chaining Commands

# Set pricing then verify
asc subscriptions pricing set SUB_ID --price 2.99 && \
asc subscriptions pricing list SUB_ID

# Apply and test
asc bulk apply subscriptions.yaml && asc subscriptions list APP_ID

Environment-Based Behavior

# Production
asc bulk apply subscriptions.yaml

# Development (mock server)
ASC_MOCK=true asc bulk apply subscriptions.yaml

Error Messages

Common Errors

Authentication required:

Error: Not authenticated. Run 'asc auth login' first.

Invalid credentials:

Error: Invalid API credentials. Verify issuer ID, key ID, and private key.

Permission denied:

Error: Permission denied. Your API key role lacks access to this resource.
Required role: Admin or App Manager

Resource not found:

Error: App not found: com.example.app
Available apps: live.yooz.whisper, live.yooz.notes

Rate limited:

Error: Rate limited. Retry after 60 seconds.

Learn More