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.
How it works
- You run
ast login. - The CLI shows you a short code (e.g.
ABCD-EFGH) and a verification URL. - You open the URL, enter the code, and sign in.
- The CLI polls until authentication completes, then stores the tokens.
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.