Aider
What it does
Aider is an open-source CLI tool that turns any large language model into a pair-programmer for your git repository. You describe a change in natural language, and Aider parses the request, reads relevant files, proposes edits, applies them to your working tree, and commits the result with an auto-generated message. It supports multiple models -- closed-source (OpenAI, Anthropic, Google) and local (Ollama, vLLM) -- and handles single-file or multi-file edits. The tool uses a high-level "architect" mode for planning and a "editor" mode for implementation, and it can automatically add files to the context based on your request.
Under the hood, Aider works by treating each LLM session as a conversation over the full repository context. It uses a map of your project's structure (repo map) to help the model understand which files exist and where to make changes. Edits are applied as unified diffs, and the tool will retry if the model produces invalid syntax or fails to follow the instruction. All changes are staged and committed, making it easy to review or roll back.
Who it's for
Aider is for developers who live in the terminal and want AI assistance without leaving their existing workflow. It targets people who already use git religiously and prefer git diff over a visual diff viewer. It's well-suited for:
- Developers maintaining medium-to-large codebases who need to refactor, add features, or fix bugs across multiple files.
- Teams that want to keep AI interactions auditable via git history (every change is associated with a human prompt).
- Users of local models who want a private, air-gapped coding assistant.
- Anyone who dislikes switching to a web UI or IDE plugin and wants a vim/emacs/neovim-friendly interface.
What works
Aider's strongest feature is its git integration. Every session generates a clean commit chain: each AI modification is captured in a distinct commit with a meaningful message that includes the original prompt. This makes reviewing changes trivial -- you can cherry-pick, squash, or revert individual AI steps.
The tool handles common coding tasks reliably: adding functions, renaming symbols, writing test cases (pytest, Jest), generating documentation strings, and fixing syntactic errors. Its "architect" mode produces a plan before editing, which helps avoid misinterpretation on complex multi-file requests.
Support for local models via Ollama is mature. With a sufficiently large local model (e.g., 70B parameters), you can get adequate code generation without sending data to a third party. The tool also caches repository maps to speed up future sessions.
Performance is acceptable: model inference time dominates the latency, not Aider itself. For typical single-file edits, response time is comparable to direct API calls.
What breaks
Aider is not a magic bullet. Its biggest limitation is context management. Even with the repo map, large projects (100k+ lines) can overwhelm the model's context window. The tool truncates output intelligently, but you will lose nuance on sprawling codebases. This leads to hallucinations: the model may reference non-existent functions, use incorrect imports, or forget to update related files.
Vague or ambiguous prompts produce chaotic edits. If you say "optimize this function," the model will likely rewrite it without respecting your local conventions or performance constraints. The tool provides no sandboxing -- it directly modifies your working tree. A bad prompt can mess up multiple files before you notice. (Fortunately, git revert is still your safety net.)
Aider cannot execute or test code. It only generates text. So it will happily write tests that don't compile or introduce runtime errors. You must run linters, tests, and manual checks yourself. Multi-file changes that depend on cross-file logic are especially risky; the model may apply changes that are individually correct but collectively inconsistent.
Finally, pricing for API-based runs can still catch you off guard. A long conversation with GPT-4o or Claude Opus can cost several dollars per hour, even for small projects. The tool does not give a cost estimate before executing.
Pricing reality
Aider itself is completely free and open-source under the MIT license. You pay only for the LLM API tokens consumed. As of early 2026, typical per-million-token costs are:
- GPT-4o (OpenAI): $2.50 input, $10 output
- Claude Opus (Anthropic): $15 input, $75 output
- Gemini 1.5 Pro (Google): $1.25 input, $5 output
- Local models (Ollama with Llama 3.2 70B): $0 (but requires your own GPU hardware)
Honest comparison
*Cursor* is a full IDE with deep AI integration. It offers inline suggestions, multi-line refactoring, and chat context. Cursor is easier for newcomers and has better visual feedback. Aider wins on portability (works in any terminal) and git-first approach.
*GitHub Copilot Chat* (CLI version) provides inline completions and chat. It is less autonomous -- it does not commit changes or plan multi-file edits. Aider is better for tasks that require the model to reason across the whole project.
*Sweep AI* is a more agentic alternative: it can create pull requests, run tests, and fix CI failures. Sweep is less manual but also less predictable. Aider gives you more control and direct editing.
*src (Sourcegraph Cody)* offers codebase-aware chat in the terminal but generally acts as a Q&A tool, not an editor. Aider focuses on making actual changes.
When to use
Use Aider when you want AI to make surgical, trackable modifications to an existing project. It shines for:
- Adding small features or fixing bugs with clear specifications.
- Generating boilerplate code, test stubs, or documentation.
- Refactoring a module while preserving behavior (with manual review).
- Experimenting with local models in a private environment.
Aider is a honest, capable tool for the developer who values precision, auditability, and terminal-tethered workflows. Use it as a power-up, not a replacement for your own judgment.
Last verified: 2026-06-08 by kernel.