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:
| Option | Short | Description |
|---|---|---|
--help | -h | Show help message |
--version | -V | Show version |
--output | -o | Output format: table, json, yaml |
--verbose | -v | Enable verbose output |
--debug | Enable debug mode | |
--quiet | -q | Minimal output |
--no-color | Disable colored output | |
--dry-run | Preview without applying changes | |
--profile | -p | Use specific credential profile |
Command Groups
Authentication
| Command | Description |
|---|---|
asc auth login | Configure credentials |
asc auth logout | Remove credentials |
asc auth status | Check auth status |
asc auth test | Test API connection |
Apps
| Command | Description |
|---|---|
asc apps list | List all apps |
asc apps info | Get app details |
Subscriptions
| Command | Description |
|---|---|
asc subscriptions list | List subscriptions |
asc subscriptions pricing list | View pricing |
asc subscriptions pricing set | Set pricing |
asc subscriptions offers list | List offers |
asc subscriptions offers create | Create offer |
asc subscriptions offers delete | Delete offer |
TestFlight
| Command | Description |
|---|---|
asc testflight builds list | List builds |
asc testflight builds expire | Expire build |
asc testflight groups list | List beta groups |
asc testflight groups create | Create group |
asc testflight testers list | List testers |
asc testflight testers add | Add tester |
asc testflight testers remove | Remove tester |
Bulk Operations
| Command | Description |
|---|---|
asc bulk init | Generate config template |
asc bulk validate | Validate config |
asc bulk apply | Apply configuration |
asc bulk schema | Export JSON schema |
Mock Server
| Command | Description |
|---|---|
asc mock start | Start mock server |
asc mock stop | Stop mock server |
asc mock status | Check 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
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | General error |
| 2 | Invalid usage / bad arguments |
| 3 | Authentication error |
| 4 | API error (rate limit, server error) |
| 5 | Resource not found |
| 10 | Dry-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
- auth - Authentication commands
- apps - App management
- subscriptions - Subscription management
- pricing - Pricing operations
- offers - Introductory offers
- testflight - TestFlight management
- bulk - YAML bulk operations