Aider: what this AI coding assistant is and how it works with git

Aider is a command-line tool that edits your repository on request and commits every change. Here is how it works and what a session costs.

6 min · · агенты · development

If you searched "what is Aider", the short answer is: Aider is a terminal program where you describe a task in plain text and a language model edits the files in your repository. Every change lands in a git commit right away, so any step can be inspected and rolled back. Below is how it works, how it differs from agents like Claude Code, and what it costs when connected to an API gateway.

Aider AI: what the program actually does

The documentation describes the project as AI pair programming in your terminal. You run aider inside a git repository, name the files that may be changed, and type a request at the > prompt. Aider sends the model your request, the contents of those files and a "map" of the rest of the code, receives the edits and applies them on disk.

It is not an editor plugin or a cloud service: the program runs locally, and generation is done by whichever model you connect over an API. You decide which one. The documentation says Aider can talk to almost any LLM, including local ones, and lets you switch models mid-chat with /model.

How Aider works with git

Git integration is the main feature. According to the docs:

  • if you start Aider in a folder without a repository, it offers to create one;
  • after every edit it makes a commit with a descriptive message, by default in the Conventional Commits style;
  • if a file has your uncommitted changes, Aider first commits them separately so your edits stay apart from the machine's;
  • commits made by the tool get an (aider) marker appended to the author or committer name, so the history shows what the program did.

In-chat commands cover day-to-day control: /diff shows changes since your last message, /undo discards the last edit, /commit commits what you changed by hand, and /git runs any git command. Auto-commits can be turned off with --no-auto-commits, though the authors advise against it.

In practice, run Aider on a separate branch. If it goes wrong, /undo or git reset puts you back at the starting point.

The repository map and files in the chat

Files that Aider may change must be "added to the chat": pass them at launch or use /add. The documentation advises adding only the files the task needs. The more you add, the easier it is to confuse the model, and the more tokens you spend.

So that the model understands the rest of the code, Aider builds a repository map: a list of files with key classes and functions and their signatures. The map is sent with every request. If the model needs code from a file that is not in the chat, it can ask for it and Aider offers to add the file. The map budget is set with the --map-tokens flag (about 1,000 tokens by default), and Aider adjusts the map size to the state of the chat.

The map is input tokens on every request. Two consequences for the budget: a big map and many files make a session noticeably more expensive, and /drop helps free up context.

Chat modes

Aider has four modes:

ModeWhat it does
codeedits files according to your request (default)
askanswers questions about the code without changing anything
architectone model proposes a solution, a second turns it into file edits
helpanswers questions about Aider itself

The docs recommend bouncing between /ask and /code: discuss the plan with no changes first, then say "go ahead" in code mode. That is cheaper than fixing a bad edit. architect mode uses two models (the main one and --editor-model), so count the cost of both.

Installation

For Python 3.8 to 3.13 the documentation suggests:

bash
python -m pip install aider-install
aider-install

There are also one-line installers for macOS, Linux and Windows, and installation via uv. Check the install page on aider.chat for current commands, since they change.

Aider CLI with your own key: connecting to the gateway

Aider can work with any OpenAI-compatible endpoint. Per the docs, set OPENAI_API_BASE and OPENAI_API_KEY, and start the model name with the openai/ prefix. For Zukko it looks like this:

bash
export OPENAI_API_BASE=https://api.zukko.pro/v1
export OPENAI_API_KEY=fetch_your_key

cd /path/to/project
aider --model openai/gpt-6.1-sol --weak-model openai/deepseek-v4.1-flash

The address ends in /v1 because this is the OpenAI format. The --weak-model flag sets a cheap model for service tasks: according to the docs, it writes the commit messages. If Aider does not recognise a model it prints a warning about it. That is normal for models outside its built-in list, and the "Model warnings" page explains what it means. The current model list and prices are available at GET https://api.zukko.pro/v1/models or on the Models page in the dashboard. A step-by-step setup is in Aider: connecting to the gateway.

One limitation to know in advance. For Claude, the gateway applies the prompt cache discount only in the Anthropic format, while Aider in this setup calls /v1/chat/completions, so all Claude input is billed at the input price. For GPT models, cache reads are visible in both formats.

What a session costs: an example with the formula

Say a session has 20 requests, each with about 12,000 input tokens (map, files, history) and 800 output tokens. That is 240,000 input and 16,000 output tokens. Prices as of 18 October 2026, $ per 1M tokens:

ModelFormulaTotal
deepseek-v4.1-flash (0.013 / 0.038)0.24 × 0.013 + 0.016 × 0.038about $0.0037
gpt-6.1-sol (0.27 / 1.32)0.24 × 0.27 + 0.016 × 1.32about $0.086
claude-sonnet-5-5 (0.4 / 2)0.24 × 0.4 + 0.016 × 2$0.128

For comparison, at the official prices of gpt-6.1-sol (2 / 10) the same session would cost 0.24 × 2 + 0.016 × 10 = $0.64. The table is an example under stated assumptions, not a measurement: real spend depends on repository size and how many files are in the chat. Model lists and prices change, so rely on GET /v1/models.

When Aider fits and when it does not

Aider is a good choice when you care about a clean git history, control over which files the model sees, and freedom to pick a model. It is less convenient if you want an agent that explores the project by itself and works through long chains of steps without your involvement. For that, see the Claude Code vs Aider comparison. Nobody can tell you in advance which model will handle your tasks better, so try two or three on your own repository. Use price, context and the strength index from the model table as guidance.

To try it, create a key in the dashboard and put it in OPENAI_API_KEY. Top-ups start at $1; you can pay through SBP (the payment page adds 8.5% on top), cryptocurrency or MasterCard. The request format is described in the chat completions reference.

FAQ

Is Aider free?

The program itself is free and open source. You pay for the tokens of the model you choose, or only for your own hardware if you run a local model.

Will Aider change files behind my back?

It edits only files added to the chat and commits after every edit. Review with /diff and roll back with /undo. For safety, run it on a separate branch.

How is Aider different from Cursor or Claude Code?

Aider lives in the terminal and is built around git: edit, commit, roll back. Cursor is an editor, and Claude Code is an agent that explores the project and runs commands on its own. Which is more convenient depends on your habits and tasks.

Which model should I use with Aider?

Start with an inexpensive model such as deepseek-v4.1-flash for routine work and compare it with a stronger one on the same tasks. Do not rely on other people's ratings: run three to five of your own typical requests and compare the result and the cost.

zukko

Pay 25×
less

for Claude Code & ChatGPT

One fetch_* key and base URL api.zukko.pro — for Cursor, Claude Code, Codex, and any SDK.

Get API keyDocumentation

api.zukko.pro · fetch_*

What is Aider: an AI coding assistant for the terminal · Zukko