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.
Supported Platforms
Section titled “Supported Platforms”| OS | Architectures | Notes |
|---|---|---|
| macOS | x64, arm64 (Apple Silicon) | |
| Linux | x64, arm64 | glibc and musl (Alpine) |
| Windows | x64 | Via Git Bash, MSYS2, or WSL |
Homebrew
Section titled “Homebrew”brew install getsentry/tools/sentryPackage Managers
Section titled “Package Managers”Install globally with your preferred package manager (the npm/pnpm/yarn packages require Node.js 22.15+):
npm install -g sentrypnpm add -g sentryyarn global add sentrybun add -g sentryUnlike the install script and Homebrew, package manager installs don't set up shell completions or agent skills. Run sentry cli setup once to enable them:
sentry cli setupOr run directly without installing:
npx sentry --helppnpm dlx sentry --helpyarn dlx sentry --helpbunx sentry --helpAuthentication
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 stores the OAuth credentials. When the server provides
a refresh token, the CLI refreshes the access token automatically. Persist the
Sentry CLI configuration directory (~/.sentry/ by default, overridable with
SENTRY_CONFIG_DIR) across runs to keep automatic refresh working.
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.
API tokens are also useful for ephemeral CI jobs and sandboxes that cannot persist the CLI configuration directory.
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