| 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
curl https://cli.sentry.dev/install -fsS | SENTRY_VERSION=0.42.2 bash
# Pin to nightly
curl https://cli.sentry.dev/install -fsS | SENTRY_VERSION=nightly 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 additional flags to customize behavior:
# Skip shell config modifications (~/.zshrc, ~/.bashrc, etc.)
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 AI agent skill installation
curl https://cli.sentry.dev/install -fsS | bash -s -- --no-agent-skillsYou can also set SENTRY_INSTALL_DIR to override the binary installation directory:
curl https://cli.sentry.dev/install -fsS | SENTRY_INSTALL_DIR="$HOME/.local/bin" bash{/* GENERATED:START platform-support */}
| OS | Architectures | Notes |
|---|---|---|
| macOS | x64, arm64 (Apple Silicon) | |
| Linux | x64, arm64 | Standalone binary requires glibc |
| Windows | x64 | Via Git Bash, MSYS2, or WSL |
{/* GENERATED:END platform-support */}
On Alpine and other musl-based Linux systems, install Node.js and use
npm install -g sentry instead of the standalone installer.
brew install getsentry/tools/sentryInstall globally with your preferred package manager (the npm packages require Node.js 20+; on 22.15+ the built-in node:sqlite is used, on 20–22.14 a bundled WASM fallback is used transparently):
Unlike 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:
On a fresh installation, the install script starts OAuth login automatically when running in an interactive terminal with no detected AI agent or existing credentials. Upgrades and non-interactive installations skip this first-login step.
The easiest way to authenticate is via OAuth device flow:
sentry authYou'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 ($XDG_CONFIG_HOME/sentry/, defaulting to
~/.config/sentry/, overridable with SENTRY_CONFIG_DIR) across runs to keep
automatic refresh working.
Alternatively, you can use an API token directly:
sentry auth --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.
Verify your authentication status:
sentry auth statusTo remove stored credentials:
sentry auth logoutUsing a self-hosted Sentry instance? Create a public OAuth application and pass its client ID and instance URL when you log in:
SENTRY_CLIENT_ID=your-client-id sentry auth login --url https://sentry.example.comSee the Self-Hosted guide for full setup details.
Credentials are stored in a SQLite database under $XDG_CONFIG_HOME/sentry/ (defaulting to ~/.config/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