asc auth

Manage CLI authentication and API keys.

asc auth login

Authenticate with your API key.

Usagebash
# Interactive login (prompts for API key)
asc auth login
# Provide key directly
asc auth login --key asc_live_xxxxxxxxxx
# Use a specific profile
asc auth login --profile production --key asc_live_xxx

Options

OptionDescription
--key, -kAPI key to authenticate with
--profile, -pNamed profile for multiple accounts

asc auth logout

Remove stored credentials.

Usagebash
# Logout from default profile
asc auth logout
# Logout from specific profile
asc auth logout --profile production
# Logout from all profiles
asc auth logout --all

asc auth status

Check authentication status and API key validity.

Usagebash
asc auth status
# Output:
# ✓ Authenticated as: user@example.com
# ✓ API Key: asc_live_xxxx...7890
# ✓ Organization: Acme Inc
# ✓ Plan: Pro
# ✓ Key expires: Never

asc auth profiles

List and manage authentication profiles.

Usagebash
# List all profiles
asc auth profiles
# Output:
# NAME STATUS ORGANIZATION
# default active Acme Inc
# staging valid Acme Inc (Staging)
# production valid Acme Inc
# Switch active profile
asc auth profiles use production

Environment Variables

For CI/CD, use environment variables instead of stored credentials:

VariableDescription
ASC_API_KEYAPI key for authentication
ASC_PROFILEProfile name to use