Installation
Installation
Section titled “Installation”Install Script
Section titled “Install Script”Install the latest stable release:
curl https://cli.sentry.dev/install -fsS | bashInstall the nightly build (built from main, updated on every commit):
curl https://cli.sentry.dev/install -fsS | bash -s -- --version nightlyYou can also use the SENTRY_VERSION environment variable to pin a version,
which is especially useful in CI/CD pipelines and Dockerfiles:
# Pin to a specific stable versionSENTRY_VERSION=0.19.0 curl https://cli.sentry.dev/install -fsS | bash
# Pin to nightlySENTRY_VERSION=nightly curl https://cli.sentry.dev/install -fsS | bashThe --version flag takes precedence over SENTRY_VERSION if both are set.
The chosen channel is persisted so that sentry cli upgrade automatically
tracks the same channel on future updates.
Homebrew
Section titled “Homebrew”brew install getsentry/tools/sentryPackage Managers
Section titled “Package 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
Section titled “Authentication”OAuth Device Flow (Recommended)
Section titled “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
Section titled “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
Section titled “Check Auth Status”Verify your authentication status:
sentry auth statusLogout
Section titled “Logout”To remove stored credentials:
sentry auth logoutSelf-Hosted Sentry
Section titled “Self-Hosted Sentry”Using a self-hosted Sentry instance? Set SENTRY_URL to point at it:
SENTRY_URL=https://sentry.example.com sentry auth loginSee the Self-Hosted guide for full setup details.
Configuration
Section titled “Configuration”Credentials are stored in a SQLite database at ~/.sentry/ with restricted file permissions (mode 600) for security. See Configuration for environment variables and customization options.
Next Steps
Section titled “Next Steps”Once authenticated, you can start using the CLI:
- Initialize Sentry - Set up Sentry in your project with the guided wizard
- 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