# Aider — AI Pair Programming in Your Terminal > Chat with Claude or GPT to edit code in your local git repo. Aider understands your whole codebase, makes multi-file edits, and auto-commits changes. ## Install Save as a script file and run: ## Quick Use ```bash pip install aider-chat cd your-project aider --model claude-sonnet-4-20250514 ``` Start chatting. Aider edits your files and git-commits each change automatically. ## What is Aider? Aider is a terminal-based AI pair programmer. It maps your entire repo into context, lets you ask for changes in natural language, and applies multi-file edits directly to your working tree — with automatic git commits for easy review and undo. **Answer-Ready**: Aider is a CLI AI pair programmer that edits code across multiple files in your local git repo, supporting Claude, GPT-4o, and other models with automatic git commits. ## Core Features ### 1. Whole-Repo Context Aider builds a repo map so the AI understands your project structure: ```bash aider --model claude-sonnet-4-20250514 > /add src/api/*.py # Add specific files to context > refactor the auth middleware to use JWT ``` ### 2. Multi-File Edits One prompt can modify multiple files simultaneously: ``` > add a /health endpoint with tests # Aider edits: src/routes/health.py, tests/test_health.py, src/app.py ``` ### 3. Auto Git Commits Every change is committed with a descriptive message: ``` git log --oneline a3f2b1c Add /health endpoint with unit tests 9e1d4a7 Refactor auth middleware to use JWT tokens ``` ### 4. Model Flexibility ```bash aider --model gpt-4o # OpenAI aider --model claude-sonnet-4-20250514 # Anthropic aider --model deepseek/deepseek-chat # DeepSeek aider --model ollama/llama3 # Local via Ollama ``` ### 5. Architect Mode Use a strong model for planning, cheaper model for coding: ```bash aider --model claude-sonnet-4-20250514 --architect ``` ## Key Commands | Command | Action | |---------|--------| | `/add file` | Add file to context | | `/drop file` | Remove file from context | | `/diff` | Show pending changes | | `/undo` | Undo last AI edit | | `/run cmd` | Run a shell command | | `/test` | Run tests | ## FAQ **Q: How does it compare to Claude Code?** A: Aider focuses on chat-driven edits with auto-commits. Claude Code offers broader tool use (bash, web, MCP). They complement each other well. **Q: Does it support Claude?** A: Yes, Claude Sonnet and Opus are first-class supported models. **Q: Can it handle large repos?** A: Yes, the repo-map feature intelligently selects relevant context without exceeding token limits. ## Source & Thanks - GitHub: [Aider-AI/aider](https://github.com/Aider-AI/aider) (30k+ stars) - Docs: [aider.chat](https://aider.chat) - Author: Paul Gauthier ## 快速使用 ```bash pip install aider-chat cd your-project aider --model claude-sonnet-4-20250514 ``` 直接对话,Aider 编辑文件并自动 git commit。 ## 什么是 Aider? Aider 是终端 AI 结对编程工具。理解整个代码库,支持多文件编辑,自动 git 提交。 **一句话总结**:Aider 是 CLI AI 结对编程工具,在本地 git 仓库中跨多文件编辑代码,支持 Claude、GPT-4o 等模型。 ## 核心功能 ### 1. 全仓库上下文 构建仓库地图,AI 理解项目结构。 ### 2. 多文件编辑 一个提示同时修改多个文件。 ### 3. 自动 Git 提交 每次修改自动提交,方便回滚。 ### 4. 多模型支持 支持 Claude、GPT-4o、DeepSeek、Ollama 本地模型等。 ### 5. 架构师模式 强模型规划,弱模型编码,节省成本。 ## 常见问题 **Q: 和 Claude Code 比较?** A: Aider 专注对话驱动编辑+自动提交,Claude Code 提供更广泛的工具使用。两者互补。 **Q: 支持大仓库吗?** A: 支持,repo-map 智能选择相关上下文。 ## 来源与致谢 - GitHub: [Aider-AI/aider](https://github.com/Aider-AI/aider) (30k+ stars) --- Source: https://tokrepo.com/en/workflows/818852c3-4064-441e-a19f-d9c7cb0c7e89 Author: Script Depot