Skip to main content
Before using the Detail CLI, authenticate with your Detail account. The CLI supports a browser-based OAuth flow for local development and direct token entry via --token for CI/CD pipelines or headless environments. For local development, run detail auth login to open a browser window and complete the OAuth flow:
detail auth login
The CLI opens 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:
✓ Successfully authenticated!
Logged in as: [email protected]

Example commands:
  detail bugs list <owner>/<repo>
  detail bugs show <bug_id>
If your browser doesn’t open automatically, the CLI prints the full URL so you can paste it yourself.
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:
detail auth login --token dtl_live_YOUR_API_KEY
Tokens must start with dtl_. Generate one in the Detail dashboard under Settings → API Keys.
In CI pipelines, store the token in a secret and pass it via an environment variable to avoid hard-coding credentials:
detail auth login --token $DETAIL_API_KEY

Check authentication status

Verify that the CLI is authenticated and confirm which account is active:
detail auth status
# ✓ Authenticated
# Email: [email protected]
If the stored token is invalid or has been revoked, detail auth status tells you to re-run detail auth login.

Log out

Remove the stored token from your machine:
detail auth logout
# ✓ Logged out successfully
This clears the 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.
Do not commit config.toml to version control. Add ~/.config/detail-cli/ to your global .gitignore if you manage dotfiles in a public repository.

Authentication subcommands summary

CommandDescription
detail auth loginLog in via browser (PKCE OAuth) or --token
detail auth statusShow the currently authenticated account
detail auth logoutRemove stored credentials