What Is Aider? Terminal AI Coding Tool

Photo: Daniil Komov / Pexels
Aider is an open-source, terminal-based AI pair programmer built by developer Paul Gauthier and released as a Python command-line tool under the Apache 2.0 license. It runs inside a git repository, edits your files directly based on plain-language instructions, and commits each change with a descriptive message so every edit is reviewable and reversible. As of mid-2026 the project has passed roughly 46,000 GitHub stars and several million PyPI installs, and it remains one of the few widely used AI coding tools that works with essentially any large language model rather than locking you into one vendor (Aider-AI/aider GitHub repository).
This guide explains what Aider actually does under the hood, how its repo map and architect mode work, how it stacks up against Claude Code, Cursor, and Cline, and when picking a terminal-first, model-agnostic tool makes more sense than an IDE fork.
What is Aider?
Aider is a command-line application you install with pip and run from inside a git repository. You point it at one or more files, describe the change you want in natural language, and Aider translates that request into a concrete code edit, shows you the diff, and — once accepted — records it as a git commit. It is built on the LiteLLM library, which is what lets a single Aider install talk to more than 100 different model providers through one consistent interface, from Anthropic and OpenAI to Google, DeepSeek, xAI, OpenRouter, and fully local models served through Ollama (Aider-AI/aider GitHub repository).
That design choice is the whole personality of the tool. Aider doesn't try to be an editor, an IDE, or a cloud platform. It tries to be the smallest possible layer between "I want this code changed" and "the change is a clean, committed diff I can review." Everything else — your editor, your test runner, your linter, your terminal multiplexer — stays exactly as it was.
Core characteristics, at a glance:
- CLI-native. It runs in your terminal window, alongside vim, emacs, VS Code, or nothing at all.
- Model-agnostic. Works with Claude, GPT, Gemini, DeepSeek, Mistral, and local models through any OpenAI-compatible endpoint.
- Open source. Python, Apache 2.0 licensed, developed openly on GitHub since 2023.
- Git-first. Every accepted edit becomes its own commit, and
/undoreverses the last one cleanly. - Pay-as-you-go. There's no subscription; you pay only for the LLM API tokens you consume.
How Aider actually works
Aider's usefulness comes down to four mechanisms working together: how it decides what edit format to ask the model for, how it gives the model awareness of a codebase too large to fit in context, how it commits changes, and how it lets you mix a smart, expensive model with a fast, cheap one on the same task.
Edit formats — matching the request to the model's strengths
Different LLMs are reliable at different kinds of structured output, so Aider doesn't force every model into the same editing protocol. Depending on the model you choose, Aider requests edits in one of several formats:
- Search-replace blocks (
diff/diff-fenced) — the model returns a block that looks like<<<<<<< SEARCH ... ======= ... >>>>>>> REPLACE, targeting an exact region of a file. This is the default for most capable chat models and keeps responses compact, since the model only returns the parts of a file that changed (Aider edit formats documentation). - Whole-file mode (
whole) — the simplest format: the model returns a complete, updated copy of the file. Aider reserves this for smaller files or weaker models that struggle to produce precise search-replace matches. - Unified diff mode (
udiff) — a standard unified-diff format for models capable enough to track line-level context accurately, which is more token-efficient than whole-file rewrites on larger files.
Think of this the way a good editor picks the right red-pen instructions for a given writer: a meticulous copyeditor gets precise "change this exact clause" notes, while someone earlier in their process gets asked to just hand in a clean rewrite of the paragraph. Aider is making the analogous judgment call about a model's reliability, not about a human's skill level.
The repo map — giving the model a floor plan instead of the whole building
The single most distinctive piece of Aider's architecture is the repo map. Aider parses every file in your repository using tree-sitter (a real parsing library, not a regex heuristic) to extract every function, class, and method signature into a dependency graph, where files are nodes and shared identifiers create edges between them (aider.chat, "Building a better repository map with tree sitter," 2023).
It then ranks that graph using PageRank — the same graph-centrality algorithm Google originally built to rank web pages by how many other important pages link to them. Files and identifiers that are referenced frequently by other parts of the codebase score higher; files you've explicitly added to the chat, or identifiers you've directly mentioned, get their edge weights multiplied up sharply so the map biases toward what's actually relevant to your current request (DeepWiki, "Repository Mapping System," Aider-AI/aider). Aider then fits as much of that ranked list as it can into a fixed token budget, using a tolerance window to squeeze in a near-optimal subset without blowing the context limit.
The analogy that makes this click: imagine handing a new contractor a fully detailed blueprint of an entire office building versus handing them a floor plan that highlights only the rooms connected to the one they're renovating, with the most load-bearing walls marked first. The second version is what actually helps someone make a safe, informed change without reading every wall in the building. That's what the repo map gives the LLM — awareness of code it isn't directly editing, compressed down to the parts most likely to matter, without spending your entire context window on files that are barely related.
Git integration — every edit is a commit
Every edit Aider makes and you accept becomes its own git commit, typically with an auto-generated, descriptive message like "Add input validation to parse_user_input." This has three practical effects. First, /undo is trivial and precise — it reverts exactly the last Aider commit, nothing more. Second, your project history stays legible: anyone doing git blame or git log sees a normal, readable sequence of changes, not one giant undifferentiated diff. Third, because Aider works through ordinary git commands, your existing workflow — branches, pull requests, bisecting a regression — keeps working exactly as it did before you introduced an AI tool into the loop.
Architect mode — splitting the thinking from the typing
Architect mode is Aider's answer to the tradeoff between reasoning quality and cost. It splits a single coding request across two different models: a stronger, typically more expensive architect model (examples in active use as of 2026 include GPT-5-class reasoning models, Claude Opus, and DeepSeek R1) analyzes the request and writes out a natural-language plan for the change, while a faster, cheaper editor model (Claude Sonnet or GPT-4o-class models are common pairings) turns that plan into an actual search-replace diff (DeepWiki, "Architect Mode," Aider-AI/aider).
This is the same reasoning behind why a senior engineer sketches the approach in a design doc and a more junior engineer implements the mechanical parts of it — you don't need the person doing the actual typing to be the most expensive reasoner in the room, you need the plan to be sound. Aider users report the architect-plus-editor pairing typically running 30 to 50 percent cheaper than running the reasoning model alone for both planning and typing, since the token-heavy diff generation shifts to the cheaper model.
Voice mode
Aider also ships with built-in voice input through Whisper transcription, letting you dictate a change request out loud while your eyes stay on the diff being generated. It's a small feature relative to the repo map or architect mode, but it matters for accessibility and for developers who find describing an intended change out loud clarifies their thinking better than typing it.
How Aider compares to other AI coding tools
The AI coding tool landscape has split into roughly two lineages: terminal-first agentic tools that live in your shell, and IDE forks or extensions that live inside an editor window. Aider, Claude Code, Cursor, Windsurf, and Cline are the tools developers compare most often, and each makes a different bet about where control should sit between you and the model.
| Tool | Type | Open source | License | Models | Workflow | Best for |
|---|---|---|---|---|---|---|
| Aider | Terminal CLI | Yes | Apache 2.0 | Any LLM (bring your own key) | Pair programmer; you review every diff | Terminal users who want model freedom |
| Claude Code | Terminal CLI | No | Proprietary | Claude models only | Agentic, long-horizon, fewer check-ins | Anthropic users running autonomous agents |
| Cursor | Forked VS Code IDE | No | Proprietary | Multiple, routed | Inline edits, chat, and agent mode | IDE users who want a polished editor |
| Windsurf | Forked VS Code IDE | No | Proprietary | Multiple | Cascade agent mode | IDE users who prefer Windsurf's agent design |
| Cline | VS Code extension | Yes | Apache 2.0 | Any LLM | Agentic, in-editor | VS Code users who want an open-source agent |
Table: How Aider compares to the other AI coding tools developers weigh it against most often, as of mid-2026.
The axis that actually separates these tools isn't "which one is smarter" — model quality is mostly a function of which underlying LLM you connect, and several of these tools can use the same models. The real distinction is how much control you keep between the model deciding something and that decision landing in your codebase.
Aider is deliberately pair-programmer-shaped: you're in the loop on essentially every diff, and the tool's entire design (edit formats, repo map, per-change commits) optimizes for making each individual change reviewable. Claude Code, by contrast, is built for longer autonomous runs — it can chain multiple tool calls, edit many files, and execute a multi-step plan with less checking in along the way, which is powerful but requires more trust that the agent won't wander off course. Cursor and Windsurf bet on deep editor integration: ghost-text completions, inline diffs, and a chat panel baked into a familiar VS Code-like interface, at the cost of being closed-source, single-vendor products. Cline is the closest open-source analog to Claude Code's agentic style, but running inside VS Code as an extension rather than in a terminal.
Is Aider better than Cursor?
It's different, not strictly better. Aider wins on openness, cost transparency, and freedom to pick any model. Cursor wins on IDE polish, inline completions, and a lower setup barrier. Many developers who work primarily in an IDE keep Cursor open for day-to-day editing and reach for Aider specifically for larger, structured refactors where they want a clean, per-commit history of exactly what an AI changed and why.
Can Aider use local models?
Yes. Because Aider routes every request through LiteLLM, it can point at any OpenAI-compatible endpoint, including self-hosted setups through Ollama, vLLM, or LM Studio, as well as hosted inference providers like Together AI. Capable open-weight coding models such as Qwen Coder and DeepSeek Coder work reasonably well in Aider's pair-programmer mode, though they generally trail frontier proprietary models on Aider's own polyglot benchmark.
Does Aider work without git?
Technically, yes — Aider can run in a plain directory that isn't a git repository. But doing so gives up /undo and the readable per-change commit history, which are two of the tool's biggest practical advantages. The documentation and most experienced users strongly recommend always running Aider inside a git repo.
How agentic is Aider compared to Claude Code?
Meaningfully less. Aider pauses for your review between edits and is built around small, reviewable changes rather than long unsupervised task chains. Claude Code is designed to run longer agentic loops — executing shell commands, editing many files in sequence, and self-correcting across a session — with less mandatory human intervention at each step. Neither approach is objectively "better"; they represent different bets about how much autonomy you want to hand over before a human looks at the result. See our explainer on how AI agents actually work for the general architecture both tools build on.
Benchmarks — what Aider's leaderboard actually measures
Aider maintains its own polyglot coding benchmark, a suite of 225 of Exercism's hardest coding exercises spread across six languages: C++, Go, Java, JavaScript, Python, and Rust. A model is given a task, must emit its changes in one of Aider's structured edit formats, and gets a single second attempt using the failing unit test output if its first pass doesn't pass the tests (aider.chat leaderboard).
What makes this benchmark distinct from something like HumanEval or SWE-bench is that it isolates a narrower, more practical skill: not "can this model write correct code from scratch in a vacuum," but "can this model correctly apply an edit to an existing file using a structured diff format, across a broad set of languages, not just Python." SWE-bench in particular has been criticized for its heavy Python bias, since it's sourced from real GitHub issues in Python-dominant open-source repositories; Aider's benchmark was deliberately built to spread evaluation across six languages instead of leaning on one.
As of the benchmark's July 2026 update, GPT-5 running at high reasoning effort leads with an 88.0% score across the 22 models evaluated, and DeepSeek V3.2 delivers the best score-per-dollar in the field at roughly $0.34 per million output tokens (aider.chat leaderboard). The leaderboard has moved 26 percentage points since the benchmark launched in December 2024, tracking the same broad capability jump you'd see across most coding-focused evaluations over that period. For more context on how to read benchmark claims like this one skeptically, see how AI benchmarks actually work.
When to choose Aider
Aider tends to be the right tool when several of these are true at once:
- You want open source software and full visibility into how your toolchain works, rather than a closed-source binary you have to trust blindly.
- You prefer working from the terminal over an IDE fork, or you already have an editor setup you don't want to replace.
- You want model freedom — the ability to switch between Claude, GPT, Gemini, DeepSeek, or a fully local model depending on cost, privacy, or capability needs for a given task.
- Cost transparency matters to you — you'd rather pay per token for exactly what you use than a flat monthly subscription that may or may not match your actual usage.
- Your codebase is small to medium sized, where the repo map's compressed view of the project fits cleanly within a reasonable context budget.
- You want a pair-programmer cadence, reviewing every diff before it lands, rather than handing off a multi-step task and checking back later.
Aider tends to be the wrong tool when:
- You want fully agentic, long-horizon runs where the tool chains many steps with minimal check-ins — Claude Code, Cline, or Cursor's agent mode are built more specifically for that.
- You want inline editor UX — ghost-text completions, ambient suggestions as you type — which is fundamentally an IDE-integration feature Aider doesn't attempt to replicate.
- You want zero setup. Aider requires a Python environment, an API key, and some comfort with the command line; Cursor is a single download with a friendlier onboarding path.
- You're working in an extremely large monorepo where even a well-ranked repo map struggles to surface the right context within a reasonable token budget.
Cost reality — what a working session actually costs
Aider itself is free; what you pay for is the underlying LLM's API usage. With a capable model like Claude Sonnet, a moderate day of coding — say twenty separate changes spread across ten files — typically lands somewhere in the $1 to $5 range in raw token cost, though this varies with file size, context length, and how much back-and-forth a task requires. Using a cheaper model as the architect-mode editor while keeping a stronger model for planning can cut that further, often by a factor of three to five, since the bulk of tokens in a coding session go toward emitting the actual diff rather than the reasoning that produces it.
Compare that to Cursor's flat monthly subscription: depending on your usage pattern, Aider can end up meaningfully cheaper for light or moderate use, or roughly comparable for heavy daily use, but the real difference isn't which number is smaller — it's that Aider's cost is transparent and directly tied to token consumption, while a subscription abstracts that away entirely. For teams tracking AI tooling spend closely, that transparency is often the deciding factor on its own, independent of which number happens to be lower in a given month.
Getting started — installation and first run
Aider's setup is intentionally minimal. From a terminal with Python installed:
pip install aider-install
aider-install
cd your-repo
export ANTHROPIC_API_KEY=sk-...
aider --model claude-sonnet-4-5
That's the entire setup process. Aider automatically detects that you're inside a git repository, prompts you for which files you want in the active chat context, and you're editing from your first message onward. Switching models mid-project is a single flag change — there's no reconfiguration beyond swapping the API key for whichever provider you're pointing at.
Common confusions about Aider
"Aider is just a chatbot that writes code for me to copy-paste." It isn't. Aider directly edits the files on disk and commits the change to git — there's no manual copy-paste step, and the diff you see is the exact change that lands, not a suggestion you have to reassemble by hand.
"Aider can't handle large codebases." It handles large codebases better than most tools that dump raw file contents into context, precisely because of the PageRank-ranked repo map, which is built to compress a big project down to its most relevant parts. But there's a real ceiling: extremely large monorepos with thousands of loosely related files can still overwhelm even a well-tuned token budget, and Aider works best when you scope which files are actively "in the chat" rather than relying purely on automatic context selection.
"Open source means it's less capable than proprietary tools like Cursor or Claude Code." Aider's capability ceiling is set almost entirely by which model you connect to it, not by the tool itself — point it at the same frontier model Cursor or Claude Code uses, and the underlying code-generation quality is comparable. The differences between these tools are mostly about workflow philosophy (how autonomous the tool is, how much UI it wraps around the model) rather than raw output quality.
"Architect mode is just using two models for no reason." The two-model split is a genuine cost and reliability optimization, not redundancy. A strong reasoning model plans the change in natural language; a fast, cheap model turns that plan into a precisely formatted diff. Separating "what should change" from "how do I write that as a valid search-replace block" measurably reduces failed edit attempts compared to asking one model to do both simultaneously under the same prompt.
The takeaway
Aider's core bet is that the best AI coding tool is the smallest possible layer between a plain-language request and a clean, reviewable git commit — not a new editor, not a cloud platform, just a CLI that respects the git workflow you already have. Its repo map turns tree-sitter parsing and PageRank into a practical way of giving a model useful codebase awareness without blowing the context window, and architect mode turns "use a smarter model" into a real cost lever rather than an all-or-nothing choice. For developers who want model freedom, cost transparency, and to stay in the loop on every diff, that combination is hard to replicate inside a closed-source IDE fork — even if those forks win on polish and onboarding ease.
FAQs
Q: Is Aider really better than Cursor? A: It's different, not strictly better. Aider wins on openness, cost transparency, and model freedom. Cursor wins on IDE polish and inline editor features like ghost-text completion. Many developers use both, choosing per task rather than picking one exclusively.
Q: Can Aider use local models? A: Yes. Aider routes requests through LiteLLM, so it works with any OpenAI-compatible endpoint, including Ollama, vLLM, LM Studio, or hosted providers like Together AI. Open-weight coding models such as Qwen Coder and DeepSeek Coder work reasonably well in pair-programmer mode, though they generally trail frontier proprietary models on Aider's own benchmark.
Q: Does Aider work without git?
A: Technically yes, but you lose /undo and the readable per-change commit history that make Aider easy to trust. It's strongly recommended to always run Aider inside a git repository.
Q: How agentic is Aider compared to Claude Code? A: Less. Aider pauses for your review between turns and is built around small, reviewable diffs. Claude Code runs longer autonomous task loops, executing tools and chaining steps with fewer check-ins along the way.
Q: Can I use Aider with a team? A: Yes. Aider itself is a per-developer tool, but since every change lands as a normal git commit, it doesn't require any shared infrastructure and doesn't disrupt an existing team git workflow.
Q: What model should I use with Aider? A: For top output quality, current frontier reasoning and coding models like GPT-5 or Claude Opus perform best on Aider's own benchmark. For cost-conscious use, pair a strong model as the architect with a cheaper model like Claude Sonnet or GPT-4o-class models as the editor. For fully local or offline use, open-weight models like Qwen Coder or DeepSeek Coder are the most common choices, with lower ceiling performance than frontier proprietary models.
Q: What license is Aider released under? A: Apache 2.0, an open-source license that includes an explicit patent grant. The project is developed openly on GitHub under Aider-AI/aider.
Q: How does Aider's repo map actually decide what code to show the model? A: It parses every file with tree-sitter to extract functions, classes, and their relationships into a dependency graph, then ranks that graph with PageRank so that frequently-referenced code and anything you've explicitly mentioned gets prioritized, fitting the highest-ranked slice into a fixed token budget.
Q: What is architect mode and why would I use it? A: Architect mode splits a coding task across two models — a strong model that plans the change in natural language, and a faster, cheaper model that converts that plan into an actual diff. It typically cuts cost by 30 to 50 percent compared to using the expensive model for both planning and typing, while often producing more reliable edits than either model working alone.
Q: What does Aider's own benchmark actually measure? A: It tests whether a model can correctly apply a structured code edit to 225 hard Exercism exercises spread across six programming languages, not whether it can write correct code from scratch. That distinction matters because it's closer to what an AI coding tool actually needs to do in daily use: modify existing files reliably, not generate isolated snippets.
Q: Is Aider free to use? A: The Aider software itself is free and open source. Your only ongoing cost is the API usage of whichever LLM provider you connect it to, which for moderate daily use with a capable model typically runs a few dollars per active coding day.
Sources
- Aider-AI/aider GitHub repository — official source, license, and star count
- Aider polyglot benchmark leaderboard — current model rankings and methodology
- Aider, "Building a better repository map with tree sitter," 2023 — original repo map design writeup
- Aider edit formats documentation — official documentation on diff, whole, and udiff formats
- DeepWiki, "Repository Mapping System," Aider-AI/aider — technical breakdown of PageRank-based ranking
- DeepWiki, "Architect Mode," Aider-AI/aider — architect/editor model split documentation
Read next:
Follow new articles
Add SciHub101 to your feed reader to see new science and technology stories.
About the Author
SciHub101 is an independent science and technology publication founded and edited by Buğra Sözeri, a software engineer and app developer based in Türkiye. AI tools assist with drafting and research. Source documentation in the existing archive is uneven, and articles are being reviewed and corrected. The Editorial Team byline identifies editorial responsibility; it does not certify specialist or independent human review. Where we compare products, anything built by our own team is labelled as such — see the editorial guidelines and About page for how corrections and disclosures work.
Related Articles

Claude Skills Explained — Anthropic's New Feature
Claude Skills are folder-based modules that extend Claude with scripts, instructions, and resources. Here's how they work and differ from MCP.

Llama 4 Explained — Meta's Open AI Models
Llama 4 is Meta's April 2025 open AI family — Scout, Maverick, and the shelved Behemoth — with native multimodal input and a 10M-token context window.

What Is Claude Code? Anthropic's AI Coding Tool
Claude Code is Anthropic's terminal-first agentic coding tool. Features, pricing, and how it compares to Cursor, Copilot, Aider, and Devin.

What Is Vibe Coding? AI-First Programming
Vibe coding is AI-first programming coined by Andrej Karpathy in 2025. What it means, tools, risks, and when it works versus when it breaks.

AI Coding Agents 2026 — Devin, Cursor Agent, Claude Code
AI coding agents in 2026 compared: Claude Code, Cursor, Devin, Copilot, Replit Agent, Cline, and Aider. Pricing, permissions, evidence, and failure points.

Claude Code vs Cursor vs Windsurf: 2026 Comparison
Claude Code, Cursor, and Windsurf (now Devin Desktop) compared on autonomy, editor features, pricing, and ownership changes, as of October 2026.