Skip to main content
Use auth for browser login and local credential management. For headless environments, set ATLANAI_TOKEN instead. No auth subcommand accepts positional arguments unless shown below.

Commands

login

Opens browser authentication and stores the resulting refresh credential in the operating system’s supported credential store. Usage
If ATLANAI_TOKEN is set, login stops because that environment credential would shadow the stored session.

status

Shows whether the CLI has a usable credential and where it came from. Usage
Returns exit code 4 when no usable credential exists.

logout

Removes the stored session and clears the credential held by the running daemon. Usage
An unreachable daemon falls back to local credential removal; a daemon that answers but refuses keeps the command from claiming sign-out succeeded.

token

Prints a stored bearer token for another local process. Usage
The command refuses to print ATLANAI_TOKEN from the environment.

Examples

Headless authentication:

Output and behavior

  • auth status prints state, token source, Gateway, and resolved identity. It never prints the credential.
  • auth token writes the token to stdout. Treat it as a secret and do not put it in logs, prompts, or source control.
  • ATLANAI_TOKEN accepts an API key or bearer token and takes precedence over stored OAuth credentials.
  • After changing ATLANAI_TOKEN, run atlanai daemon stop so the next hook starts the daemon with the new value.