--token for CI/CD pipelines or headless environments.
Browser-based login (recommended)
For local development, rundetail auth login to open a browser window and complete the OAuth flow:
https://app.detail.dev/cli-auth in your default browser. After you approve access, the CLI automatically receives a token and saves it to ~/.config/detail-cli/config.toml. You’ll see a confirmation message:
The browser flow uses PKCE (RFC 7636) for security. No client secret is transmitted — the CLI binds a local callback listener to receive the authorization code.
Token-based login
For CI/CD pipelines or environments without a browser, pass an API token directly using--token:
dtl_. Generate one in the Detail dashboard under Settings → API Keys.
Check authentication status
Verify that the CLI is authenticated and confirm which account is active:detail auth status tells you to re-run detail auth login.
Log out
Remove the stored token from your machine:api_token field from ~/.config/detail-cli/config.toml. It does not revoke the token in the Detail dashboard — do that in Settings → API Keys if needed.
Token storage
The CLI stores your token in~/.config/detail-cli/config.toml (Linux and macOS) or %LOCALAPPDATA%\detail-cli\config.toml (Windows). The file is created with permissions that restrict access to your user account.
Authentication subcommands summary
| Command | Description |
|---|---|
detail auth login | Log in via browser (PKCE OAuth) or --token |
detail auth status | Show the currently authenticated account |
detail auth logout | Remove stored credentials |

