Authentication
Log in and manage credentials for the Astro AI CLI and API
Authentication links the CLI and API to your Astro AI account. You need it to push agents to the registry, access private deployments, and call protected endpoints. Sign in with ast login (an account is required). If you don’t have one, sign up.
Log in
Tokens are stored in the system keyring when available (macOS Keychain, Linux Secret Service, Windows Credential Manager). Otherwise they are stored in ~/.ast/credentials.json with restricted permissions.
CLI commands
Token lifecycle
- Access token: Short-lived (~1 hour), used for API requests.
- Refresh token: Long-lived; used to obtain new access tokens.
The CLI refreshes the access token automatically when it is close to expiry.
Next steps
After logging in you can switch between accounts. See Working with accounts.