DocsCliFix

quell fix

Interactive mode: for each survived mutant, Quell generates a test, verifies it kills the mutant, shows you the result, and asks for confirmation before writing.

Usage

quell fix [OPTIONS]

Options

OptionDefaultDescription
--tool, -tmutmutSource tool: mutmut or stryker
--root, -r.Project root directory
--llmNoneLLM provider for UNKNOWN operators: anthropic, openai, ollama
--idNoneFix a specific mutant by ID instead of all

Examples

# Fix all survived mutants interactively
quell fix

# Fix a single mutant
quell fix --id 14

# Fix with LLM fallback for UNKNOWN operators
quell fix --llm anthropic

# Fix Stryker mutants
quell fix --tool stryker

# Fix with local Ollama model
quell fix --llm ollama

Interactive session

[1/5] BOUNDARY_SHIFT  calculator.py:20
  Original:  if amount > 0:
  Mutated:   if amount >= 0:

  Generated test:
  ─────────────────────────────────────────────────────────────
  def test_kill_mutant_14_boundary_shift():
      """Kills mutant 14: BOUNDARY_SHIFT at calculator.py:20"""
      result = calculate_discount(amount=0)
      assert result == 0  # exactly 0 must not receive discount
  ─────────────────────────────────────────────────────────────

  ✓ Original suite passes  (0.42s)
  ✓ Mutant killed by test  (0.38s)

  Write to tests/test_calculator.py? [y/N/s(skip)/q(quit)]:

Prompt options

KeyAction
yWrite test to file
nSkip this mutant (same as s)
sSkip this mutant
qQuit and stop processing

What happens when you press y

  1. The test function is appended to the test file using libcst (formatting preserved)
  2. The test file is backed up to .quell/backups/ before writing
  3. The action is recorded in .quell/audit.jsonl

LLM fallback

If an operator is UNKNOWN and no --llm flag is provided, Quell will skip that mutant with a notice. Pass --llm anthropic (or openai / ollama) to enable generation for unknown operators.

export ANTHROPIC_API_KEY=sk-ant-...
quell fix --llm anthropic

For fully automated fixing without prompts, use quell auto.