| title | Installation |
|---|---|
| description | How to install and set up the Sentry CLI |
import PackageManagerCode from "../../components/PackageManagerCode.astro";
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 version
SENTRY_VERSION=0.19.0 curl https://cli.sentry.dev/install -fsS | bash
# Pin to nightly
SENTRY_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.
The install script accepts these flags (passed after --):
# Skip PATH modification (e.g., in CI where PATH is managed externally)
curl https://cli.sentry.dev/install -fsS | bash -s -- --no-modify-path
# Skip shell completion installation
curl https://cli.sentry.dev/install -fsS | bash -s -- --no-completions
# Skip agent skill installation (for Claude Code, Cursor, etc.)
curl https://cli.sentry.dev/install -fsS | bash -s -- --no-agent-skillsEnvironment variables:
| Variable | Description |
|---|---|
SENTRY_VERSION |
Pin version (e.g., 0.19.0) or channel (nightly) |
SENTRY_INSTALL_DIR |
Override binary install directory (default: ~/.sentry/bin) |
SENTRY_INIT |
Set to 1 to run sentry init after install |
{/* GENERATED:START platform-support */}
| OS | Architectures | Notes |
|---|---|---|
| macOS | x64, arm64 (Apple Silicon) | |
| Linux | x64, arm64 | glibc and musl (Alpine) |
| Windows | x64 | Via Git Bash, MSYS2, or WSL |
| {/* GENERATED:END platform-support */} |
brew install getsentry/tools/sentryInstall globally with your preferred package manager:
Or run directly without installing:
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.
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.
Verify your authentication status:
sentry auth statusTo remove stored credentials:
sentry auth logoutUsing 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.
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.
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