Getting Started
Installation
Installation
Install Script
Install the Sentry CLI using the install script:
curl https://cli.sentry.dev/install -fsS | bashPackage Managers
Install globally with your preferred package manager:
npm install -g sentry pnpm add -g sentry yarn global add sentry bun add -g sentry Or run directly without installing:
npx sentry --help pnpm dlx sentry --help yarn dlx sentry --help bunx sentry --help Authentication
OAuth Device Flow (Recommended)
The easiest way to authenticate is via OAuth device flow:
sentry auth loginYou’ll be given a URL and a code to enter. Once you authorize the application in your browser, the CLI will automatically receive your token.
API Token
Alternatively, you can use an API token directly:
sentry auth login --token YOUR_SENTRY_API_TOKENYou can create API tokens in your Sentry account settings.
Check Auth Status
Verify your authentication status:
sentry auth statusLogout
To remove stored credentials:
sentry auth logoutConfiguration
Credentials are stored in ~/.sentry/config.json with restricted file permissions (mode 600) for security.
Next Steps
Once authenticated, you can start using the CLI:
- Organization commands - List and view organizations
- Project commands - Manage projects
- Issue commands - Track and manage issues
- Event commands - Inspect events
- API commands - Direct API access
- Agentic Usage - Enable AI coding agents to use the CLI