Package: sentry-cli
Official Sentry Command Line InterfaceThis 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.Downloads can be found underReleasesDocumentation can be foundhereInstallationIf you are on OS X 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/ | bashWe 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:curl -sL https://sentry.io/get-cli/ | SENTRY_CLI_VERSION=2.0.4 bashThis will automatically download the correct version ofsentry-clifor your operating system and install it. If necessary, it will prompt for your admin password forsudo. For a different installation location or for systems withoutsudo(like Windows), you canexport INSTALL_DIR=/custom/installation/pathbefore running this command.If you are usingsentry-clion Windows environments,Microsoft Visual C++ Redistributableis required.To verify it’s installed correctly you can bring up the help:sentry-cli --helppipNew in 2.14.3:sentry-clican also be installed usingpip:pipinstallsentry-cliNodeAdditionally, you can also install this binary via npm:npm install @sentry/cliWhen installing globally, make sure to have setcorrect permissions on the global node_modules directory.
If this is not possible in your environment or still produces an EACCESS error,
install as root:sudo npm install -g @sentry/cli --unsafe-permBy default, this package will download sentry-cli from the CDN managed byFastly.
To use a custom CDN, set the npm config propertysentrycli_cdnurl. The downloader will append"/<version>/sentry-cli-<dist>".npminstall@sentry/cli--sentrycli_cdnurl=https://mymirror.local/pathOr add property into your.npmrcfile (https://www.npmjs.org/doc/files/npmrc.html)sentrycli_cdnurl=https://mymirror.local/pathThere are a few environment variables that you can provide to control the npm installation:SENTRYCLI_CDNURL=<url> # 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=<stdout|stderr> # Changes where to redirect install script outputWhen usingsentry-clivia JavaScript API or any 3rd party plugin that is consuming said API,
you can also useSENTRY_BINARY_PATH=<path>alongsideSENTRYCLI_SKIP_DOWNLOAD=1to 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 yourHTTPS_PROXYenvironment variable.HomebrewA homebrew recipe is provided in thegetsentry/toolstap:brew install getsentry/tools/sentry-cliDockerAs of version1.25.0, there is an official Docker image that comes withsentry-clipreinstalled. If you prefer a specific version, specify it as tag.
The latest development version is published under theedgetag. In production,
we recommend you to use thelatesttag. To use it, run:dockerpullgetsentry/sentry-cli
dockerrun--rm-v$(pwd):/workgetsentry/sentry-cli--helpStarting version2.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:dockerrun--rm-u"$(id-u):$(id-g)"-v$(pwd):/workgetsentry/sentry-cli--helpThis is required due to security issue in oldergitimplementations. Seeherefor more details.UpdateTo update sentry-cli to the latest version run:sentry-cliupdateCompilingIn case you want to compile this yourself, you need to install at minimum the
following dependencies:Rust stable and CargoMake, CMake and a C compilerUse cargo to compile:$ cargo buildAlso, there is a Dockerfile that builds an Alpine-based Docker image withsentry-cliin the PATH. To build and use it, run:dockerbuild-tsentry-cli.
dockerrun--rm-v$(pwd):/worksentry-cli--help