You need Python 3.12 or newer, git, and an API key from Anthropic or OpenRouter. Culprit is developed on macOS and meant for Linux CI runners too; Windows hasn't been tested.
Install#
pip install culprit-cliCulprit brings its own copy of uv, which it uses to install your agent at each commit, so there's nothing else to install.
For an isolated install that keeps Culprit out of your project's environment, use
uv tool install culprit-cli or pipx install culprit-cli. To try a command without installing,
prefix it with uvx culprit-cli, as in uvx culprit-cli init.
Lost? culprit help lists the commands in the order you use them, and culprit help <command> shows a
command's options.
Your first bisect#
Your agent's repo needs an eval module and a suite first. Prepare your agent covers what they look like.
-
Set up the repo. Saves your key and writes
culprit.toml. Seeculprit init.Terminalculprit init -
Find the commit. Give it a ref that was good and one that is bad. It prints a run ID. See
culprit run.Terminalculprit run --good v1.0 --bad HEAD --budget-usd 3 -
Find the lines and fix them, using that run ID. See
culprit localiseandculprit fix.Terminalculprit localise 77f60c9fccf8 culprit fix 77f60c9fccf8 -
Read the report. See
culprit report.Terminalculprit report 77f60c9fccf8
Upgrade or uninstall#
pip install -U culprit-cli
pip uninstall culprit-cliWith uv or pipx, use uv tool upgrade / uv tool uninstall or pipx upgrade / pipx uninstall.
Uninstalling leaves your saved keys and each repo's .culprit/ folder and culprit.toml in place.
Where Culprit keeps things lists them. The
changelog says what each version changed.
Next#
- CI and pull requests: run the check on every pull request.
- How bisect works: why Culprit can trust noisy evals.