# Aider — AI Pair Programming in Your Terminal > Aider is the OG terminal AI pair programmer. Edits multiple files in one prompt, auto-commits each change. 36K+ stars, BYOK 100+ providers via LiteLLM. ## Install Copy the content below into your project: ## Quick Use 1. `python -m pip install aider-install && aider-install` 2. `export ANTHROPIC_API_KEY=sk-ant-...` (or any provider) 3. `cd` into any git repo and run `aider` — start typing what to change --- ## Intro Aider is the original terminal AI pair programmer — predates Cursor, Claude Code, and Codex CLI. Drop into any git repo, tell Aider what to change, it edits multiple files at once and auto-commits each change with a meaningful message. 36K+ stars, BYOK across 100+ providers via LiteLLM. Best for: developers who live in the terminal and want a minimal, model-agnostic agent. Works with: any git repo, any LLM (Claude / GPT / Gemini / DeepSeek / local Ollama). Setup time: under 1 minute. --- ### Install + first run ```bash # Install python -m pip install aider-install aider-install # Set your API key (Anthropic example — Aider supports 100+ providers) export ANTHROPIC_API_KEY=sk-ant-... # In any git repo cd ~/projects/myapp aider # Inside aider, just type > Add a /health endpoint to the FastAPI app that returns {"status": "ok"} ``` Aider edits the relevant files (auto-detected from your /add or repo map), runs your linter if configured, and commits with a generated message like `feat: add /health endpoint with status ok`. ### Multi-file edits ``` > /add main.py models.py tests/test_main.py > Refactor User to add a 'plan' field. Update the schema, the API, and write a test for the new field. ``` Aider edits all 3 files in one shot, runs `pytest`, commits. ### Pick a model ```bash # Claude (default) aider --model sonnet # OpenAI aider --model gpt-4o # DeepSeek aider --model deepseek/deepseek-coder # Local Ollama aider --model ollama/qwen2.5-coder:32b ``` Aider uses LiteLLM under the hood — any provider LiteLLM supports works. ### Architect / Editor split ```bash aider --model sonnet --editor-model haiku ``` Architect (smart, slow) plans the edit; Editor (fast, cheap) applies it. Saves 60-80% on tokens for large refactors. --- ### FAQ **Q: Is Aider free?** A: Yes — Aider itself is open-source under Apache-2.0. You bring your own LLM API key and pay for inference (Claude / GPT / Gemini / etc). Aider works with local Ollama models for fully-free use. **Q: How does Aider compare to Claude Code?** A: Aider is older, lighter, model-agnostic (any provider via LiteLLM). Claude Code is Anthropic-specific, with deeper integrations (subagents, slash commands, MCP). For 'I want a CLI agent that just works with my preferred model', Aider wins. For 'I want the full Anthropic agent platform', Claude Code wins. **Q: Does Aider auto-commit?** A: Yes — Aider's killer feature. Every edit becomes a separate git commit with a generated message. You can `git revert` any change individually. Disable with `--no-auto-commits` if you prefer. --- ## Source & Thanks > Built by [Paul Gauthier](https://github.com/paul-gauthier) and the Aider community. Licensed under Apache-2.0. > > [Aider-AI/aider](https://github.com/Aider-AI/aider) — ⭐ 36,000+ --- ## 快速使用 1. `python -m pip install aider-install && aider-install` 2. `export ANTHROPIC_API_KEY=sk-ant-...`(或任何 provider) 3. `cd` 进任何 git 仓库跑 `aider`,开始打字描述要改啥 --- ## 简介 Aider 是最早的终端 AI pair programmer —— 比 Cursor / Claude Code / Codex CLI 都早。进任何 git 仓库,告诉它改什么,它一次改多个文件,每次改动自动 commit 带有意义的 message。36000+ stars,通过 LiteLLM 支持 100+ provider 的 BYOK。适合主要在终端干活、想要轻量且模型无关的 agent 的开发者。兼容任何 git 仓库和任何 LLM(Claude / GPT / Gemini / DeepSeek / 本地 Ollama)。装机时间 1 分钟。 --- ### 装 + 第一次跑 ```bash # 装 python -m pip install aider-install aider-install # 设 API key(Anthropic 示例 —— Aider 支持 100+ provider) export ANTHROPIC_API_KEY=sk-ant-... # 在任何 git 仓库 cd ~/projects/myapp aider # 进 aider 之后直接打字 > Add a /health endpoint to the FastAPI app that returns {"status": "ok"} ``` Aider 会改相关文件(从 /add 或 repo map 自动识别),跑你配置的 linter,提交一个生成的 message 比如 `feat: add /health endpoint with status ok`。 ### 多文件编辑 ``` > /add main.py models.py tests/test_main.py > Refactor User to add a 'plan' field. Update the schema, the API, and write a test for the new field. ``` Aider 一次改 3 个文件,跑 `pytest`,commit。 ### 选模型 ```bash # Claude(默认) aider --model sonnet # OpenAI aider --model gpt-4o # DeepSeek aider --model deepseek/deepseek-coder # 本地 Ollama aider --model ollama/qwen2.5-coder:32b ``` Aider 底层用 LiteLLM —— LiteLLM 支持的任何 provider 都行。 ### Architect / Editor 双模式 ```bash aider --model sonnet --editor-model haiku ``` Architect(聪明慢)规划改动,Editor(快便宜)执行。大重构能省 60-80% 的 token。 --- ### FAQ **Q: Aider 免费吗?** A: 免费。Aider 本身 Apache-2.0 开源。你用自己的 LLM API key 付推理费(Claude / GPT / Gemini 等)。配本地 Ollama 模型可以完全免费用。 **Q: Aider 跟 Claude Code 比怎样?** A: Aider 更老、更轻、模型无关(通过 LiteLLM 支持任何 provider)。Claude Code 绑 Anthropic,集成更深(subagent、slash 命令、MCP)。「想要一个 CLI agent 直接配我喜欢的模型」选 Aider;「想要完整 Anthropic agent 平台」选 Claude Code。 **Q: Aider 自动 commit 吗?** A: 自动。这是它的杀手特性。每次编辑变成一个独立的 git commit,message 自动生成。每次改动都能 `git revert`。不想要可以加 `--no-auto-commits`。 --- ## 来源与感谢 > Built by [Paul Gauthier](https://github.com/paul-gauthier) and the Aider community. Licensed under Apache-2.0. > > [Aider-AI/aider](https://github.com/Aider-AI/aider) — ⭐ 36,000+ --- Source: https://tokrepo.com/en/workflows/aider-ai-pair-programming-in-your-terminal Author: Aider