Aider
Terminal-native AI pair programmer with automatic Git commits, tree-sitter repo maps, and support for any cloud or local model.终端原生的 AI 结对编程工具:自带 Tree-sitter 仓库索引、自动原子 Git 提交,支持任意云端与本地模型。
01 Friction Solved消除的小摩擦
GUI AI editors lock you into specific subscriptions and often leave large, messy uncommitted diffs across a repo. Aider runs right inside your terminal on top of Git—building a compact symbol map of your project, applying clean search/replace edits, auto-running linters/tests, and creating reversible commits for every change.图形化 AI IDE 往往绑定固定订阅,也容易一次改动十几个文件留下难以回滚的脏 diff。Aider 直接长在终端和 Git 之上:用精简的符号索引理解整库结构,精准应用补丁、自动跑测试,并把每一步改动写成可一键撤销的干净 Commit。
02 Best-Fit Scenarios最适合的使用场景
- Making disciplined, Git-tracked refactors over SSH, tmux, or Neovim without switching to a heavy Electron IDE.
- Pairing a strong reasoning model as "architect" with a fast, cheap or local model as "editor" to cut API costs.
- Reviewing and reverting AI edits cleanly via `/undo` or standard `git diff` / `git revert`.
- 在 SSH、tmux 或 Neovim 工作流里完成受 Git 严格追踪的重构,不必切换到笨重的 Electron 编辑器。
- 用 Architect 模式把“强推理模型出方案 + 便宜/本地模型改代码”拆开,大幅压低 API 花销。
- 每一轮修改都对应独立 Commit,不满意直接 `/undo` 或 `git revert` 秒级回滚。
03 Human & Agent Setup人类与 Agent 快速接入
# Install cleanly in an isolated tool environment via uv
uv tool install aider-chat
# Run with an OpenAI-compatible API or local Ollama model
aider --model ollama_chat/qwen2.5-coder:14b
# Or pair a reasoning architect with a fast editor model
aider --architect --model deepseek/deepseek-reasoner --editor-model deepseek/deepseek-chat
04 Reality Check & Trade-offs真实边界与局限
- Explicitly adding only the relevant files (`/add path/to/file`) yields far better edits and lower token costs than dumping an entire repository into context.
- Smaller local models (<14B) occasionally struggle with strict diff formats; switch `--edit-format whole` if you see frequent patch errors.
- Always work on a feature branch before letting any automated linter/test-fix loop run multiple commits.
- 用 `/add` 显式只加入当前任务相关的几个文件,修改准确率远高于把整库塞进上下文,也能省下大量 Token。
- 较小的本地模型(14B 以下)偶尔会写错 diff 补丁格式,遇到频繁应用失败时可切 `--edit-format whole`。
- 让它开启自动测试修复循环前,务必先切到独立功能分支,避免污染主分支历史。
05 Why VYAGENT Picked ItVYAGENT 选品评语
Proof that great AI developer tools do not need a proprietary editor wrapper. Git-first commits and model-agnostic routing make Aider timeless.证明了优秀的 AI 开发工具并不需要重造一个编辑器:以 Git 为核心、完全不绑定单一模型厂商,让 Aider 极其耐打。
06 Frequently Asked Questions常见问题 (FAQ)
Does Aider require a paid subscription?Aider 本身需要付费订阅吗?
No. Aider is Apache-2.0 open source. You only pay whatever API provider you choose—or $0 when using free tiers or local Ollama models.不需要。Aider 是 Apache-2.0 开源软件,费用完全取决于你接入的 API 厂商,接免费层或本地 Ollama 时费用为 0。
Can I turn off automatic Git commits?可以关闭自动 Git Commit 吗?
Yes. Pass --no-auto-commits on the command line or set auto-commits: false in .aider.conf.yml.可以。在命令行加 --no-auto-commits,或在 .aider.conf.yml 中将 auto-commits 设为 false 即可。