Installation

Learn about the different methods available to install `sentry-cli`.

Depending on your platform, there are different methods available to install sentry-cli.

You can find the list of releases on the GitHub release page. We provide executables for Linux, OS X and Windows. It’s a single file download and upon receiving the file you can rename it to just sentry-cli or sentry-cli.exe to use it.

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:

Copied
curl -sL https://sentry.io/get-cli/ | sh

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:

Copied
curl -sL https://sentry.io/get-cli/ | SENTRY_CLI_VERSION="3.3.5" sh

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.

To verify it's installed correctly you can bring up the help:

Copied
sentry-cli --help

There is also the option to install sentry-cli via npm for specialized use cases. This, for instance, is useful for build servers. The package is called @sentry/cli and in the post installation it will download the appropriate release binary:

Copied
npm install @sentry/cli

You can then find it in the .bin folder:

Copied
./node_modules/.bin/sentry-cli --help

In case you want to install this with npm system wide with sudo you will need to pass --unsafe-perm to it:

Copied
sudo npm install -g @sentry/cli --unsafe-perm

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 "/<version>/sentry-cli-<dist>".

Copied
npm install @sentry/cli --sentrycli_cdnurl=https://mymirror.local/path

Or add property into your .npmrc file (https://docs.npmjs.com/files/npmrc)

Copied
sentrycli_cdnurl=https://mymirror.local/path

Another option is to use the environment variable SENTRYCLI_CDNURL.

Copied
SENTRYCLI_CDNURL=https://mymirror.local/path npm install @sentry/cli

Options listed below control how sentry-cli install script behaves, when installed through npm.

SENTRYCLI_CDNURL:

If set, the script will use given URL for fetching the binary. Defaults to https://downloads.sentry-cdn.com/sentry-cli.

SENTRYCLI_USE_LOCAL:

If set to 1, sentry-cli binary will be discovered from your $PATH and copied locally instead of being downloaded from external servers. It will still verify the version number, which has to match.

SENTRYCLI_SKIP_DOWNLOAD:

If set to 1, the script will skip downloading the binary completely.

SENTRYCLI_SKIP_CHECKSUM_VALIDATION:

If set to 1, the script will skip the checksum validation phase. You can manually verify the checksums by visiting Build Checksums page.

SENTRYCLI_NO_PROGRESS_BAR:

If set to 1, the script will not display download progress bars. This is a default behavior for CI environments.

SENTRYCLI_LOG_STREAM:

If set, the script will change where it writes its output. Possible values are stdout and stderr. Defaults to stdout.

If you are on OS X, you can install sentry-cli via homebrew:

Copied
brew install getsentry/tools/sentry-cli

If you are on Windows, you can install sentry-cli via Scoop:

Copied
> scoop install sentry-cli

For unsupported distributions and CI systems, we offer a Docker image that comes with sentry-cli preinstalled. It is recommended to use the latest tag, but you can also pin to a specific version. By default, the command runs inside the /work directory. Mount relevant project folders and build outputs there to allow sentry-cli to scan for resources:

Copied
docker pull getsentry/sentry-cli
docker run --rm -v $(pwd):/work getsentry/sentry-cli --help

You can use sentry-cli update and sentry-cli uninstall to update or uninstall the sentry-cli binary. These commands may be unavailable in certain situations, generally when sentry-cli has been installed by a tool like homebrew or yarn, either directly or as a dependency of another package. In those cases, the same tool will need to be used for updating and removal. If you find that sentry-cli update and sentry-cli uninstall aren't working and you don't know how the package was installed, running which sentry-cli will often provide a clue as to which tool to use.

When downloading an executable from a remote server, it's often a good practice to verify, that what has been downloaded, is in fact what we expect it to be. To make sure that this is the case, we can use checksum validation. A checksum is the value calculated from the contents of a file, in a form of hash, in our case SHA256, and it acts as the data integrity check, as it's always producing the same output, for a given input.

Below is the table of SHA256 checksums for all available build targets that our CLI supports. To calculate the hash of a downloaded file, you can use sha256sum utility, which is preinstalled in OSX and most Linux distributions.

Filename (v3.3.5)Integrity Checksum
sentry-cli-Darwin-arm64sha384-fd03e1efafb3a9fe8a5a1edb2462c39c277a40075d72ef9fe7574af5fdeb4352
sentry-cli-Darwin-universalsha384-92a8672a36a885124e0fa688d9f146520a237c9a6b8b780037d6817a0b81b263
sentry-cli-Darwin-x86_64sha384-906127f3f22c5fdbf5d04e456a2ba19220dde58b09a33287e7add3cc8e998df1
sentry-cli-Linux-aarch64sha384-a7ed9089f28466ee830219100f70b6f13e9a7a7d03d54f9840e9b84436468661
sentry-cli-Linux-armv7sha384-ab9ce8f6babb789d210298beaac7324a29f256ef8192654cd3a434e0312d2523
sentry-cli-Linux-i686sha384-40c892f02bea9049914ce058530a7a947a06b8ad1072c9c466978932e9077ecd
sentry-cli-Linux-x86_64sha384-81bda3da764c957cdc9ddc6d368f9a2e1e4a1e385b6272180a0373830acaecdb
sentry-cli-Windows-aarch64.exesha384-0f4df27353fe2f8d599422c4efab31de6979fb16a24bbb6af3d7e4cc108e9285
sentry-cli-Windows-i686.exesha384-655b357dd622acd5b9eaff824037b648ff1468f8a9a868fac5a89cfa45963494
sentry-cli-Windows-x86_64.exesha384-74f88d12c1909797bda612dcac07b2f25e7419d7c06404f3a0ca94747c03892d
sentry_cli-3.3.5-py3-none-macosx_10_15_x86_64.whlsha384-191eab0430bfc1ebc4b2f108b2df4684629af46a1aa5761d4d5033f4fe145c1e
sentry_cli-3.3.5-py3-none-macosx_11_0_arm64.whlsha384-46a092a9f6165a5a845c4eee333faa851c2d667a3a88f39b879df1f28c08fe26
sentry_cli-3.3.5-py3-none-macosx_11_0_universal2.whlsha384-30569350d96eb937de7013a988a065e7f911b3af5d6660b260d360806caf7590
sentry_cli-3.3.5-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.musllinux_1_2_aarch64.whlsha384-d5eb5de75019e0980b39f6056fef03dd66902444659e51a86123edb27152fcca
sentry_cli-3.3.5-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.musllinux_1_2_armv7l.whlsha384-157b379288e03bd6870ef76ad64406b3985ba65c9b88552cbd5d72b69b08c28b
sentry_cli-3.3.5-py3-none-manylinux_2_17_i686.manylinux2014_i686.musllinux_1_2_i686.whlsha384-b98105e18d02f41987de409c81c40026fd537010275c927b649bf7f4dbcd1274
sentry_cli-3.3.5-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.musllinux_1_2_x86_64.whlsha384-2e9fd88ab0b576f97e3e2eedbf84004ee12b4dd33df910dc99e3942fb3ed01d7
sentry_cli-3.3.5-py3-none-win32.whlsha384-19fa6f0a0bda51cdba42710d90cbbc8ff01012990f760050083d03f7c824662a
sentry_cli-3.3.5-py3-none-win_amd64.whlsha384-813546827618f06fd2da39c26887efb5c74d759b56a248fe1d80cec3ee75d32d
sentry_cli-3.3.5-py3-none-win_arm64.whlsha384-74e797a5fa1cd73d3769f17268ef9661280432b7e7a667e350e96d8577132420
sentry_cli-3.3.5.tar.gzsha384-fd52ba212c3473006ec329ad7298042d0a381c18361030953a5ffa77c40af3b7

If you would like to verify checksums for historic versions of the sentry-cli, please refer to our release registry directly, which can be found at https://release-registry.services.sentry.io/apps/sentry-cli/{version}. For example, https://release-registry.services.sentry.io/apps/sentry-cli/1.74.4.

Was this helpful?
Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").