CodingOpen SourceFreeActiveMachine-verified· intermediate · ~10 min setup

Aider + Fable 5: Codebase-Wide Migrations from Your Terminal

Point Fable 5 at a repo and let Aider refactor across hundreds of files as real git commits you can undo.

by Shilpa Mitra· verified today· v1.0.0

Run this workflow

CI-verified, 4/4 fixtures passing.

Build this with your agent

One copy-paste hands Claude Code, Codex, or Cursor the full recipe, steps included, nothing to fetch.

Intended Use

A concrete, repo-wide change (a framework upgrade, an API migration) driven from the terminal. Aider maps the whole repo and commits each change. CI verifies the deterministic spine: a scaffolded git repo with an .aider.conf.yml that parses and pins model: anthropic/claude-fable-5, no key. The migration edits are the fenced model step.

Not for

  • The --model sonnet shortcut, that is a Sonnet alias; pass the full anthropic/claude-fable-5 id
  • Migrations touching auth or crypto code without expecting the Opus 4.8 cyber-classifier hand-off mid-run
  • Expecting CI to verify the edits; that is the fenced model step

The Stack

Tested Against

aider@latestclaude-fable-5

Side effects & data flow

Network
none, local only
Writes
./aiderepo/, ./checkaider.mjs
Credentials
none required

Prerequisites

  • Python (pip install aider-install, then aider-install)
  • A git repo to work in
  • An Anthropic API key for anthropic/claude-fable-5

Steps

  1. 1

    Install Aider and point it at Fable

    python -m pip install aider-install then aider-install. In your repo: aider --model anthropic/claude-fable-5 --api-key anthropic=$ANTHROPIC_API_KEY. Then drive it, e.g. /architect upgrade every Pydantic v1 model in this repo to v2 and fix call sites.

  2. 2

    What CI checks: the .aider.conf.yml pins Fable

    CI scaffolds a throwaway git repo, writes an .aider.conf.yml, and confirms it parses and pins model: anthropic/claude-fable-5 (the full id, not the sonnet alias). Deterministic, no key. The actual migration is fenced.

    git init -q aiderepo
    cat > aiderepo/.aider.conf.yml <<'EOF'
    model: anthropic/claude-fable-5
    EOF
    cat > checkaider.mjs <<'EOF'
    import { existsSync, readFileSync } from 'node:fs';
    const path = 'aiderepo/.aider.conf.yml';
    let ok = true;
    function check(label, cond){ console.log(label + ': ' + (cond ? 'yes' : 'NO')); if(!cond) ok=false; }
    check('git repo scaffolded', existsSync('aiderepo/.git'));
    const cfg = existsSync(path) ? readFileSync(path, 'utf8') : '';
    check('config has a model field', cfg.includes('model:'));
    check('model is anthropic/claude-fable-5', cfg.includes('model: anthropic/claude-fable-5'));
    if(!ok){ console.log('aider config check FAILED'); process.exit(1); }
    console.log('aider config check OK: pins model anthropic/claude-fable-5');
    EOF
    node checkaider.mjs
  3. 3

    Run the migration (the model step, not checked by CI)

    Aider drives Fable across the repo, committing each change. That runs the model and is non-deterministic, so CI never claims it. Review the git history; everything is undoable.

Eval, 4 fixtures

Last passed: verified today
  • repo-scaffoldedcontainstimeout 30s · max $0

    Expected: git repo scaffolded: yes

  • pins-fablecontainstimeout 30s · max $0

    Expected: model is anthropic/claude-fable-5: yes

  • check-okcontainstimeout 30s · max $0

    Expected: aider config check OK: pins model anthropic/claude-fable-5

  • clean-exitexit_codetimeout 30s · max $0

    Expected: 0

Results

~45.9k stars; the exact shape of Fable's Stripe story, a long, repo-wide migration that stays coherent across hundreds of edits.

Did this work for you?

Our CI checks the setup runs. You tell us if the whole thing worked. Tell us straight.

Liked this workflow?

Get new verified workflows in WebAfterAI, three issues a week (Tue, Thu, Sat).