akili auth
Manage authentication credentials for the Akili CLI. Tokens are stored locally with restricted file permissions (0600) and are used for all subsequent API calls.
Commands
Section titled “Commands”akili auth login
Section titled “akili auth login”Store an access token for future CLI use. The token is saved to the local credentials file.
Flags:
| Flag | Short | Default | Description |
|---|---|---|---|
--token | Access token to store (required) |
Examples:
# Store a tokenakili auth login --token akt_eyJhbGciOiJSUzI1NiJ9...
# For CI/CD, prefer the environment variable instead:export AKILI_TOKEN="akt_eyJhbGciOiJSUzI1NiJ9..."akili auth logout
Section titled “akili auth logout”Remove stored credentials from the local filesystem.
Examples:
# Remove stored credentialsakili auth logout# Logged out. Stored credentials removed.akili auth status
Section titled “akili auth status”Show current authentication status by calling the API’s whoami endpoint. Displays the authenticated user’s identity, email, tenant, and roles.
Examples:
# Check auth statusakili auth status
# As JSONakili auth status --jsonIf not authenticated, displays a warning with instructions:
Not authenticated. Run `akili auth login --token <TOKEN>` or set AKILI_TOKEN.akili auth token
Section titled “akili auth token”Print the current access token to stdout. Useful for piping to other tools or scripts.
Examples:
# Print token to stdoutakili auth token
# Pipe to another toolcurl -H "Authorization: Bearer $(akili auth token)" https://api.akili.systems/health
# Copy to clipboard (macOS)akili auth token | pbcopyIf no token is available, exits with an error:
No token available. Run `akili auth login --token <TOKEN>` or set AKILI_TOKEN.