Commands
auth
Manage authentication for the Sentry CLI.
Commands
sentry auth login
Authenticate with Sentry.
# OAuth device flow (recommended)sentry auth login
# Using an API tokensentry auth login --token YOUR_TOKENOptions:
| Option | Description |
|---|---|
--token <token> | Use an API token instead of OAuth |
OAuth Flow:
- Run
sentry auth login - A URL and code will be displayed
- Open the URL in your browser
- Enter the code when prompted
- Authorize the application
- The CLI automatically receives your token
sentry auth logout
Remove stored credentials.
sentry auth logoutsentry auth status
Check your authentication status.
sentry auth statusOutput:
Authenticated as: usernameOrganization: my-orgToken expires: 2024-12-31sentry auth refresh
Refresh your OAuth token.
sentry auth refreshThis is typically handled automatically when tokens expire.
Configuration
Credentials are stored in ~/.sentry/config.json with restricted file permissions (mode 600).
Config structure:
{ "auth": { "token": "...", "refreshToken": "...", "expiresAt": "2024-12-31T00:00:00Z" }}