Mutation Testing CLI, Designed for AI Agents
Actively maintained. Last release 2 days ago, commits in 20 of the last 26 weeks. A safe choice.
pip install hoiminhoimin
hoimin is a mutation testing CLI for Python, designed for AI agents to improve tests locally within explicit resource budgets. It makes small changes to copies of your source and runs your tests to find behavior they do not check.
An agent investigates selected survivors, adds tests grounded in the intended behavior, and verifies the improvement. Humans provide specification decisions and review changes. Mutation scores are diagnostic observations; equivalent mutants and specification-permitted changes make them unsuitable as a standalone quality target. hoimin targets local work and provides no mutation-score or regression CI gate. A completed run exits successfully even when mutants survive; inspect the JSONL events to choose the next test improvement. For repository documentation, start with the user guide or development guide.
See the product principles. See also the documentation for installation, the agent workflow, resource limits, and command references.
Install
uv tool install --python 3.14 hoimin
Wheels support Python 3.14 and 3.15 and support macOS Apple Silicon, Linux x86_64 (glibc), and Windows x86_64.
Use --python 3.15 to install with Python 3.15.
Python 3.15 lazy imports and unpacking in comprehensions are supported. Import-dependent mutations are conservative when lazy binding identity cannot be established.
Run uv tool update-shell if hoimin is not on PATH, then open a new shell.
Quick start
From your project directory, use a Python environment with passing tests and their dependencies installed.
Choose the OS memory policy first, then replace src/calc.py with an existing file:
hoimin run --root . --file src/calc.py -- python -m pytest -q
Everything after -- is your project's test command.
hoimin runs it once as a baseline, then for each selected mutation. Have your agent investigate a small batch of survivors for missing assertions or test cases; a survivor alone does not establish a test defect.
macOS and Linux without delegated cgroups require before ; macOS memory is not capped. See the .