{"id":22352,"library":"sentry-prevent-cli","title":"Sentry Prevent CLI","description":"Command-line tool for running Sentry's source code analysis to prevent common issues before they reach production. Version 11.2.8, actively maintained with frequent releases.","status":"active","version":"11.2.8","language":"python","source_language":"en","source_url":"https://github.com/getsentry/sentry-prevent-cli","tags":["sentry","cli","code-analysis","prevent","linter"],"install":[{"cmd":"pip install sentry-prevent-cli","lang":"bash","label":"PyPI"}],"dependencies":[],"imports":[],"quickstart":{"code":"import os\nfrom sentry_prevent_cli import analyze\n\nrule = os.environ.get('SENTRY_PREVENT_RULE', 'default')\nresult = analyze(rule=rule)\nprint(result)","lang":"python","description":"Run a quick analysis using a specified rule."},"warnings":[{"fix":"Run 'pip install sentry-prevent-cli' in your active venv.","message":"The CLI must be installed globally or within an activated virtual environment; otherwise commands may not be found.","severity":"gotcha","affected_versions":"all"},{"fix":"Set required env vars or use --token flag.","message":"Environment variables like SENTRY_AUTH_TOKEN are required for certain commands; missing them produces cryptic errors.","severity":"gotcha","affected_versions":"all"},{"fix":"Upgrade to Python 3.9+.","message":"Python 3.8 support dropped as of version 11.0.0.","severity":"deprecated","affected_versions":">=11.0.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Install with pip and ensure your Python scripts directory is in PATH.","cause":"Package not installed or not in PATH.","error":"command not found: sentry-prevent"},{"fix":"Use the command-line tool instead of Python import.","cause":"Importing the package incorrectly; the package is a CLI, not a library.","error":"ModuleNotFoundError: No module named 'sentry_prevent_cli'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}