Tool Combos

Aider + Claude API: pair programming in your terminal with a git commit for every change

Aider runs in your terminal, reads the files you add to the chat, edits them and commits every change to git with a message. Because each edit is a separate commit, you can review or undo it like any other change. Paired with the Claude API, you pay per use instead of a monthly subscription.

By AI RightFitChecked Official sources listed below

At a glance

What you getCode edits in your own repo, each saved as a git commit
Typical costFree, open-source tool + Claude API tokens per request
Skill levelIntermediate (comfortable with git and a terminal)
Runs onYour computer, calling the Claude API

What you get

Aider is a chat in your terminal that can change your code. You add the files it should work on, describe the change, and it edits them directly. Its git integration is the part that makes it practical: every edit becomes a commit with a descriptive message, and if you already had uncommitted changes in a file it is about to edit, it commits those first so your work and its work stay separate.

Typed /undo in the chat, the last Aider change is discarded. That makes it reasonable to try an idea, look at the result and throw it away without untangling anything by hand.

What it costs

Our Aider record lists it as free. You pay for the model. With the Claude API, the price list shows Claude Sonnet 5.5 at $2 per million input tokens and $10 per million output tokens.

Example: a day of small edits (USD, our estimate)
AssumptionAmount
Context sent per request (your files plus Aider's map of the repo)About 20,000 input tokens
Reply with the editAbout 2,000 output tokens
Cost per request on Sonnet 5.520,000 x $2/M + 2,000 x $10/M = $0.06
30 requests in a working dayAbout $1.80

The biggest lever is how many files you add. Adding a whole folder sends all of it on every request; adding the two files that matter keeps each request small. Aider's docs also warn that Anthropic's rate limits can be low on new accounts.

Set it up

From Aider's documentation for Anthropic models:

python -m pip install aider-install
aider-install

Set your Claude API key (create one in the Claude Console). On Windows, open a new terminal after setx:

setx ANTHROPIC_API_KEY your-key-here        # Windows
export ANTHROPIC_API_KEY=your-key-here      # macOS / Linux

Then start it inside your project:

cd path/to/your/project
aider --list-models anthropic/
aider --model <a model name from that list>

Aider's docs still name an older Claude model as the default, so choose a current one from the list rather than relying on the default.

A first job to try

Start a fresh branch so nothing lands on your main branch by accident, then add one file and ask for one change:

git switch -c try-aider
aider src/utils.py
> Add input validation to parse_date so it raises ValueError on an empty string.
> Add a test for it in tests/test_utils.py

Run your tests, read the commit with git show, and type /undo if you do not like it. After a few rounds you will know how much context it needs and how precise your requests have to be.

Habits that keep it safe

  • Work on a branch and review commits before merging, exactly as you would a colleague's.
  • Keep secrets out of the files you add; everything you add is sent to the model provider.
  • Leave git integration on. Aider's docs say turning it off with --no-git is only for people with their own backups.
  • Watch your usage in the Claude Console for the first week so a large file added by mistake does not surprise you.

Sources

Related records: Aider pricing record · Claude pricing record

Setup steps and facts come from the official documentation linked on each page, checked on the date shown. We have not tested every combination on every computer; cost examples are illustrative.

Editorial policy · Report a mistake