Skip to content
GitLab

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.

Store an access token for future CLI use. The token is saved to the local credentials file.

Flags:

FlagShortDefaultDescription
--tokenAccess token to store (required)

Examples:

Terminal window
# Store a token
akili auth login --token akt_eyJhbGciOiJSUzI1NiJ9...
# For CI/CD, prefer the environment variable instead:
export AKILI_TOKEN="akt_eyJhbGciOiJSUzI1NiJ9..."

Remove stored credentials from the local filesystem.

Examples:

Terminal window
# Remove stored credentials
akili auth logout
# Logged out. Stored credentials removed.

Show current authentication status by calling the API’s whoami endpoint. Displays the authenticated user’s identity, email, tenant, and roles.

Examples:

Terminal window
# Check auth status
akili auth status
# As JSON
akili auth status --json

If not authenticated, displays a warning with instructions:

Not authenticated. Run `akili auth login --token <TOKEN>` or set AKILI_TOKEN.

Print the current access token to stdout. Useful for piping to other tools or scripts.

Examples:

Terminal window
# Print token to stdout
akili auth token
# Pipe to another tool
curl -H "Authorization: Bearer $(akili auth token)" https://api.akili.systems/health
# Copy to clipboard (macOS)
akili auth token | pbcopy

If no token is available, exits with an error:

No token available. Run `akili auth login --token <TOKEN>` or set AKILI_TOKEN.