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 versioncurl https://cli.sentry.dev/install -fsS | SENTRY_VERSION=0.42.2 bash
# Pin to nightlycurl 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.
Installer Flags
Section titled “Installer Flags”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 installationcurl https://cli.sentry.dev/install -fsS | bash -s -- --no-completions
# Skip AI agent skill installationcurl 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" bashSet SENTRY_INIT=1 to run sentry init right after installing, which prints the guide a coding agent follows to add Sentry to your project:
curl https://cli.sentry.dev/install -fsS | SENTRY_INIT=1 bashThe installer reports its own errors to Sentry. Set SENTRY_CLI_NO_TELEMETRY=1
to turn this off; the CLI honors the same variable.
Verify the Install Script
Section titled “Verify the Install Script”Each stable release attaches install and install.ps1 to its
GitHub release, and Sentry's
release registry lists their SHA-256 checksums. To check the script against the
registry before you run it:
curl -fsSL https://cli.sentry.dev/install -o installcurl -fsSL https://release-registry.services.sentry.io/apps/sentry/latest -o release.jsonexpected=$(jq -er '.files.install.checksums["sha256-hex"]' release.json)echo "$expected install" | sha256sum -c - && bash installOn macOS, use shasum -a 256 -c - instead of sha256sum -c -. During a release the
website can update before the registry does, so retry if the checksums differ
right after a new version ships.
Windows (PowerShell)
Section titled “Windows (PowerShell)”On Windows, install the latest stable release from PowerShell:
irm https://cli.sentry.dev/install.ps1 | iexThe PowerShell installer adds the install directory to your user PATH. It
reads the same SENTRY_VERSION, SENTRY_INSTALL_DIR, and SENTRY_INIT
environment variables as the install script. Set SENTRY_NO_MODIFY_PATH=1 to
leave PATH unchanged:
$env:SENTRY_VERSION = "0.42.2"; irm https://cli.sentry.dev/install.ps1 | iexIt installs stable releases only. To switch to nightly afterwards, run
sentry cli upgrade nightly.
Supported Platforms
Section titled “Supported Platforms”| OS | Architectures | Notes |
|---|---|---|
| macOS | x64, arm64 (Apple Silicon) | |
| Linux | x64, arm64 | Standalone binary requires glibc |
| Windows | x64 | Via PowerShell, Git Bash, MSYS2, or WSL |
On Alpine and other musl-based Linux systems, install Node.js and use
npm install -g sentry instead of the standalone installer.
Homebrew
Section titled “Homebrew”brew install getsentry/tools/sentryHomebrew installs shell completions but can't install agent skills into your home directory. Run sentry cli setup once to add them, and again after brew upgrade:
sentry cli setup --no-modify-path --no-completionsPackage Managers
Section titled “Package Managers”Install 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):
npm install -g sentrypnpm add -g sentryyarn global add sentrybun add -g sentryUnlike the install script, 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)”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.
API Token
Section titled “API Token”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.
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? 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.
Configuration
Section titled “Configuration”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.
Next Steps
Section titled “Next Steps”Once authenticated, you can start using the CLI:
- Initialize Sentry - Print the guide a coding agent follows to set up Sentry in your project
- 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