Skip to content
Docs GitHub

Installation

Install the latest stable release:

Terminal window
curl https://cli.sentry.dev/install -fsS | bash

Install the nightly build (built from main, updated on every commit):

Terminal window
curl https://cli.sentry.dev/install -fsS | bash -s -- --version nightly

You can also use the SENTRY_VERSION environment variable to pin a version, which is especially useful in CI/CD pipelines and Dockerfiles:

Terminal window
# 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 | bash

The --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 supports the following platforms and architectures:

OSArchitecturesNotes
macOSx64, arm64 (Apple Silicon)
Linuxx64, arm64glibc and musl (Alpine)
Windowsx64Via Git Bash, MSYS2, or WSL

On Alpine Linux (musl), the installer downloads the -musl binary variant and may install libstdc++ / libgcc if running as root.

You can override the install directory with SENTRY_INSTALL_DIR:

Terminal window
SENTRY_INSTALL_DIR=/opt/bin curl https://cli.sentry.dev/install -fsS | bash
Terminal window
brew install getsentry/tools/sentry

Install globally with your preferred package manager:

npm install -g sentry

Or run directly without installing:

npx sentry --help

The easiest way to authenticate is via OAuth device flow:

Terminal window
sentry auth login

You'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:

Terminal window
sentry auth login --token YOUR_SENTRY_API_TOKEN

You can create API tokens in your Sentry account settings.

Verify your authentication status:

Terminal window
sentry auth status

To remove stored credentials:

Terminal window
sentry auth logout

Using a self-hosted Sentry instance? Set SENTRY_URL to point at it:

Terminal window
SENTRY_URL=https://sentry.example.com sentry auth login

See 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: