Synopsis
Description
operator auth manages OAuth tokens and API key credentials for LLM providers. Credentials are stored in ~/.operator/auth.json. When you log in, the config file (~/.operator/config.json) is also updated to reflect the new auth method and default model for that provider.
Supported providers
| Provider | Identifier | Auth method |
|---|---|---|
| OpenAI | openai | OAuth (browser or device code) |
| Anthropic | anthropic | API key (paste token) |
| Google Antigravity | google-antigravity or antigravity | Google OAuth (browser) |
Subcommands
operator auth login
Authenticate with a provider and store credentials locally.The provider to authenticate with. Required. Shorthand:
-p.
Accepted values: openai, anthropic, google-antigravity (alias: antigravity).Use the OAuth device code flow instead of opening a browser. Use this when running Operator in a headless or SSH environment where a browser cannot be launched.
- Credentials are written to
~/.operator/auth.json. - The matching model entry in
model_listhas itsauth_methodupdated. agents.defaults.model_nameis updated to the provider’s recommended default model.
operator auth logout
Remove stored credentials for a provider.The provider to log out from. Shorthand:
-p.
If omitted, credentials for all providers are removed.auth_method field in both model_list entries and the legacy providers block in config.json.
operator auth status
Display the current authentication state for all providers that have stored credentials.- Auth method (
oauthortoken) - Credential status (
active,needs refresh, orexpired) - Account ID (if available)
- Email address (Google Antigravity only)
- Google Cloud project ID (Antigravity only)
- Token expiry time (OAuth tokens only)
operator auth models
List available models for the authenticatedgoogle-antigravity provider.
operator auth models only works for the google-antigravity provider. For other providers, refer to your provider’s documentation or the model_list in config.json.Examples
Log in with OpenAI (browser flow):Credential storage
Credentials are stored at~/.operator/auth.json. The file contains access tokens, refresh tokens, expiry timestamps, and provider-specific metadata (project IDs, email addresses, account IDs).
Related commands
operator onboard— create the initial config before authenticatingoperator agent— start using the agent after logging inoperator status— check which provider API keys and OAuth sessions are active