What Is Aider?Aider 是什么?
Aider is an open-source AI pair programming tool that runs as a command-line program in your terminal. It was created by Paul Gauthier (previously CTO of Groupon and co-founder of Inktomi) in 2023, and is released under the Apache 2.0 license. Instead of an autonomous agent, Aider deliberately follows a pair-programming philosophy: it makes one change, waits for your feedback, then proceeds — treating you as a collaborator, not a passive approver.Aider 是一款完全运行在终端里的开源 AI 结对编程工具,由 Paul Gauthier(前 Groupon CTO、Inktomi 联合创始人)于 2023 年创建,Apache 2.0 许可证。它不追求全自动智能体,而是刻意走结对编程路线:改一处、等你过目、再继续——把人当搭档,而不是当审批按钮。
Its signature move is being git-native: you point Aider at your repository, describe the change in plain language, and Aider edits the files directly, then automatically commits each change to git with a descriptive, AI-generated message. Everything the AI touched is diffable, reviewable, and reversible with familiar git tools — and /undo discards the last change in one command.它的招牌是 Git 原生:指着仓库告诉它要改什么,Aider 直接改你的文件,然后每处改动自动提交到 git,还带 AI 生成的提交信息。AI 动过的每一行都能 diff、能 review、能回滚——/undo 一句命令撤销上一次改动。
Aider is model-agnostic: it connects to 100+ LLM providers through the LiteLLM routing library — Claude, GPT/o-series, DeepSeek, Gemini, and local models via Ollama. You bring your own API key and pay the provider directly; the tool itself is free. Confirm current model support on aider.chat.Aider 不绑定任何模型:通过 LiteLLM 路由接 100+ 家 LLM——Claude、GPT/o 系列、DeepSeek、Gemini,以及 Ollama 本地模型。自己带 API key,账单直接付给模型厂商;工具本身免费。最新模型支持情况以 aider.chat 为准。
Aider's moat was never the model — it was the workflow. Treating git as the state machine for AI edits is the single sanest idea in AI coding: every change is a commit, every commit has a message, and nothing the AI does can hide from git log. That design still holds up in 2026, when terminal agents (Claude Code, OpenCode) have crowded the space with flashier autonomy. But honesty first: Aider's release cadence stalled in 2026 while competitors shipped weekly, and 1,700+ open issues is a real maintenance signal. My read: for a solo developer or small team that lives in the terminal, wants BYOK pricing and local-model privacy, and prefers a collaborator over an autopilot, Aider remains the best deal in AI coding. Just go in with eyes open — check the repo's pulse before you build a pipeline on it.
Aider 的护城河从来不是模型,而是工作流。把 git 当作 AI 编辑的状态机,是 AI 编程里最靠谱的想法:每次改动都是一次提交,每次提交都有信息,AI 干的每一件事都躲不过 git log。2026 年这个设计依然成立——即便 Claude Code、OpenCode 等终端智能体已经把赛道挤得很热闹。但实话实说:Aider 2026 年的发布节奏停了下来,对手们却在周更,1700+ 的 open issue 也是个真实的维护信号。我的判断:对泡在终端里、想要 BYOK 成本和本地模型隐私、更喜欢「搭档」而不是「自动驾驶」的个人开发者和小团队来说,Aider 依然是 AI 编程里最划算的选择。只是要睁大眼睛——在上面搭流水线之前,先去看看仓库的脉搏。
— 中国吧 AI Tools Hub Editorial Team
Who Should Use Aider?谁适合使用Aider?
✓ Good Fit For适合以下场景
- Developers who live in the terminal (tmux/SSH sessions) and want AI without leaving the shell泡在终端里(tmux/SSH 会话)不想切出 shell 的开发者
- Teams wanting model choice freedom and local-model privacy (Ollama, air-gapped setups)想要模型自由选择、本地模型隐私(Ollama、离线环境)的团队
- Codebases where AI edits must be reviewable and reversible via git要求 AI 改动可审查、可回滚(走 git)的代码库
✕ Not Ideal For不适合以下场景
- Developers who want inline autocomplete and visual diffs inside an IDE — use Continue or Cline instead想要 IDE 内联补全和可视化 diff——用 Continue 或 Cline 更合适
- Non-technical users who need a one-click setup with zero configuration需要开箱即用、零配置的非技术用户
Getting Started with AiderAider 快速开始
1. Install Aider (recommended via pipx) and set your model API key安装 Aider(推荐用 pipx),并设置你的模型 API key
$ python -m pip install aider-install && aider-install
$ export ANTHROPIC_API_KEY=sk-... # or OpenAI / DeepSeek / Gemini key
2. Start a session in your git repo, pointing Aider at the files you want to change在你的 git 仓库里启动会话,指给它要改的文件
$ cd your-repo && aider src/main.py src/utils.py
3. Describe the change in plain language — Aider edits, lints, and commits it用大白话描述改动——Aider 会编辑、跑 lint、然后提交
/undo 一条命令撤销。Key Features核心功能
-
Git-Native WorkflowGit 原生工作流 — Every change is automatically committed with an AI-generated message; diff, review, and revert AI edits with the git commands you already know.每次改动自动提交并生成提交信息;用你熟悉的 git 命令 diff、审查、回滚 AI 的改动。
-
100+ Models, Your Choice100+ 模型任选 — Claude, GPT/o-series, DeepSeek, Gemini and more via LiteLLM routing — plus local models through Ollama. Bring your own key, pay the provider directly.通过 LiteLLM 路由接入 Claude、GPT/o 系列、DeepSeek、Gemini 等,并支持 Ollama 本地模型。自带 key,账单直接付给模型厂商。
-
Repo Map for Large Codebases大仓库的 Repo Map — A tree-sitter-based index ranks the most relevant functions and classes with a PageRank-style algorithm, so only the right context goes to the model.基于 tree-sitter 的索引,用类 PageRank 算法挑出最相关的函数和类——只把对的上下文喂给模型。
-
One-Command Undo一条命令撤销 — /undo discards the last AI change instantly; nothing the AI does can escape your version control.
/undo立刻丢弃上一次 AI 改动;AI 干的一切都逃不过你的版本控制。 -
Lint & Test Auto-FixLint 与测试自动修复 — Aider runs your linters and test suites after each change and fixes what it detects — plus voice-to-code, image/web context, and editor integration via code comments.每次改动后自动跑 lint 和测试并修复发现的问题,还支持语音写代码、图片/网页上下文,以及通过代码注释与编辑器联动。
Pros & Cons优缺点
✓ Good Fit For适合以下场景
- Free and open source (Apache 2.0) — the tool itself costs $0 forever免费开源(Apache 2.0),工具本身永远 0 成本
- Git-first safety: auto-commits and /undo make AI edits transparent and reversiblegit 优先的安全感:自动提交 + /undo 让 AI 改动透明可回滚
- No vendor lock-in: any model, including free local models via Ollama不绑定厂商:任意模型,Ollama 本地模型免费
- Terminal-native: no IDE, no account, no GUI context-switching纯终端:不用 IDE、不用账号、不用切窗口
✕ Not Ideal For不适合以下场景
- Release cadence slowed in 2026 (0.86.x line; last observed commits ~May 2026)2026 年发布节奏放缓(停留在 0.86.x,最后一次提交约 5 月)
- No inline autocomplete — it edits files on request, not as you type没有输入时实时补全——它是按需改文件,不是敲代码时提示
- Terminal-only interface — developers who want a visual IDE workflow should look at Continue or Cursor纯命令行界面——想要可视化 IDE 工作流的看 Continue 或 Cursor
Use Cases应用场景
Popular ways people use Aider.人们使用Aider的常见场景:
🔧 Multi-File Refactoring多文件重构
Point Aider at several files, describe the refactor in one sentence, and review the git diff — one of the strongest open-source options for cross-file edits.把几个文件指给它,一句话描述重构意图,然后看 git diff——跨文件编辑最强的开源方案之一。
🧪 Bug Fixing in Terminal Sessions终端会话里的修 bug
Drop into a tmux/SSH session, paste the failing test output, and let Aider edit and commit the fix without touching an IDE.钻进 tmux/SSH 会话,贴上失败的测试输出,让它改完提交,全程不用开 IDE。
🔒 Private / Air-Gapped Development私密/离线环境开发
Point it at Ollama for local inference — code never leaves your machine, and sensitive codebases stay behind the firewall.接上 Ollama 本地推理——代码不出机器,敏感代码库留在防火墙后面。
📦 Legacy Codebase Onboarding接手祖传代码库
The repo map surfaces relevant functions and classes, so Aider can answer questions and make changes in codebases you've never seen before.repo map 能挑出相关的函数和类,没见过的代码库也能问它、让它改。
Similar AI Tools相似 AI 工具
If Aider doesn't fit your needs, here are other popular AI tools you might consider:如果Aider不符合你的需求,可以看看这些热门 AI 工具:
Frequently Asked Questions常见问题
/undo 随时回滚,AI 的改动永远可审查、可撤销。Claude Code 更自主但也更贵;Aider 是更轻、模型任选、纯终端的替代。