Sentry Prevent CLI

Learn how to use the Sentry Prevent CLI to upload test results to Sentry.

For Python, install the Sentry Prevent CLI using pip install sentry-prevent-cli. You need to have Python3 as the default.

Copied
pip install sentry-prevent-cli

For binary platforms, use the following commands to download the latest version of the Sentry Prevent CLI.

Copied
curl -L https://github.com/getsentry/sentry-prevent-cli/releases/latest/download/sentry-prevent-cli-macos -o sentry-prevent-cli_macos
chmod +x sentry-prevent-cli_macos

To upload test results, use the following command:

Copied
sentry-prevent-cli upload --report-type test-results --token <PREVENT_TOKEN>

GitHub releases also includes the SHA for each asset. You can run

Copied
shasum -a 256 <filename>

or

Copied
sha256sum <filename>

and compare the checksum generated with that from GitHub releases.

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").