sentry-cli is a command line utility designed to streamline interactions with Sentry, a powerful error monitoring and crash reporting platform. This tool enables developers to perform essential tasks such as uploading debug symbols, managing configurations, and integrating with CI/CD pipelines directly from the terminal.
Key Features:
Debug Symbol Upload: Simplifies the process of uploading debug symbols to Sentry for accurate stack trace analysis.
CI/CD Integration: Seamlessly integrates with your existing build processes to automate error monitoring setup.
Cross-Platform Support: Works on multiple operating systems, including Linux, macOS, and Windows, ensuring consistent functionality across environments.
Audience & Benefit:
Ideal for developers and DevOps professionals who work with Sentry, sentry-cli provides a fast and reliable way to manage Sentry configurations without relying on graphical user interfaces or external tools. By automating repetitive tasks, it helps improve workflow efficiency and ensures consistent error monitoring across projects. It can be installed via winget for easy setup.
This is a Sentry command line client for some generic tasks. Right now this is
primarily used to upload debug symbols to Sentry if you are not using the
Fastlane tools.
If you are on macOS or Linux, you can use the automated downloader which will fetch the latest release version for you and install it:
curl -sL https://sentry.io/get-cli/ | bash
We do, however, encourage you to pin the specific version of the CLI, so your builds are always reproducible.
To do that, you can use the exact same method, with an additional version specifier:
This will automatically download the correct version of sentry-cli for your operating system and install it. If necessary, it will prompt for your admin password for sudo. For a different installation location or for systems without sudo (like Windows), you can export INSTALL_DIR=/custom/installation/path before running this command.
By default, this package will download sentry-cli from the CDN managed by Fastly.
To use a custom CDN, set the npm config property sentrycli_cdnurl. The downloader will append
"//sentry-cli-".
There are a few environment variables that you can provide to control the npm installation:
SENTRYCLI_CDNURL= # Use alternative cdn url for downloading binary
SENTRYCLI_USE_LOCAL=1 # Use local instance of sentry-cli binary (looked up via $PATH environment)
SENTRYCLI_SKIP_DOWNLOAD=1 # Skip downloading binary entirely
SENTRYCLI_NO_PROGRESS_BAR=1 # Do not print the progress bar when downloading binary (default for non-TTY environments like CI)
SENTRYCLI_LOG_STREAM= # Changes where to redirect install script output
When using sentry-cli via JavaScript API or any 3rd party plugin that is consuming said API,
you can also use SENTRY_BINARY_PATH= alongside SENTRYCLI_SKIP_DOWNLOAD=1 to completely
control what binaries are downloaded and used throughout the whole process.
If you're installing the CLI with NPM from behind a proxy, the install script will
use either NPM's configured HTTPS proxy server or the value from your HTTPS_PROXY
environment variable.
Homebrew
A homebrew recipe is provided in the getsentry/tools tap:
brew install getsentry/tools/sentry-cli
Docker
As of version 1.25.0, there is an official Docker image that comes with
sentry-cli preinstalled. If you prefer a specific version, specify it as tag.
The latest development version is published under the edge tag. In production,
we recommend you to use the latest tag. To use it, run:
docker pull getsentry/sentry-cli
docker run --rm -v $(pwd):/work getsentry/sentry-cli --help
Starting version 2.8.0, in case you see "error: config value 'safe.directory' was not found;" message,
you also need to correctly set UID and GID of mounted volumes like so: