这是一个基于开源项目 Aider 的二次开发版本:保留 Aider 作为“可用的 AI 编程工具链”(模型接入、编辑循环、git/测试/命令体系等),同时引入 Doc‑First 工作流,用结构化文档替代“冗长对话历史”来驱动 AI 的上下文与定位。
本仓库当前定位:非常早期的实验版本。如果你遇到任何问题、行为不符合预期、或者有更好的想法,欢迎提 Issue/留言反馈。
默认不把聊天记录当作主要记忆来源,而是把“记忆”拆成三层、用仓库内的文档/文件来承载:
- 长期记忆(Project Overview):稳定的架构概览与关键不变量
- 文件:
PROJECT_OVERVIEW.md
- 文件:
- 短期记忆(Feature Requirements):当前功能的工程要求与验收标准
- 形式:一功能一份需求文档(可随任务切换)
- 瞬间记忆(Working Set):当前正在编辑/即将编辑的文件内容与最小相关片段
- 形式:工作集文件 + 少量依赖
这三层的目标是让 AI 在不同规模项目上“可控、可复现、可维护”:记忆不靠聊天堆积,而靠可追踪的工程文档沉淀。
仓库根目录的 AI_ARCH.md 是 Doc‑First 导航入口:
当 AI 需要理解或修改代码时,应当从根文档开始逐级下钻到子目录的 AI_ARCH.md,直到定位到目标文件/入口点。
这种“文档树定位”强调:
- 默认不全仓库搜索
- 只有在文档指向范围内,才做最小必要的有限搜索作为兜底
- 改完代码必须同步更新相关文档,保证“文档与工程一致”
你可以从这里开始了解文档树:
- 根导航:AI_ARCH.md
- 长期概述:PROJECT_OVERVIEW.md
- 规范交接稿:要求.md
为了让 Doc‑First 在实际工程里可用,本项目提供两类能力:
- Doc Index:构建/增量更新/搜索文档片段(索引默认落盘到
DAP/doc_index.json)- 代码位置:aider/doc_index.py
- DocSync:代码修改后,生成并应用对
AI_ARCH.md文档树的更新草稿(交互命令/docsync)- 代码位置:aider/docsync.py
- 本 fork 把项目内的
.aider*命名迁移为DAP*:- 运行时状态目录:
DAP/(替代.aider/) - tags cache:
DAP.tags.cache.v*(替代.aider.tags.cache.v*) - 常用配置/历史:
DAP.conf.yml、DAPignore、DAP.chat.history.md、DAP.input.history等
- 运行时状态目录:
- 启动时会自动把旧的
.aider*重命名迁移到DAP*(如果新文件不存在)- 迁移逻辑:aider/dap_paths.py
- Python:3.10 ~ 3.12(见
pyproject.toml的requires-python) - Git:建议安装(用于 repo 功能与差异管理)
- 基础运行依赖:见
requirements.txt(通过pyproject.toml动态注入) - 可选依赖:
desktop:桌面端运行(PySide6,见requirements/requirements-desktop.txt)desktop-build:桌面端打包(PyInstaller,见requirements/requirements-desktop-build.txt)
DAP/:运行时本地状态目录(例如文档索引、DocSync 草稿等),默认应当忽略DAP.conf.yml:本地配置文件(替代上游.aider.conf.yml)DAPignore:本地忽略规则文件(替代上游.aiderignore)
在仓库根目录执行:
python -m pip install -U pip
python -m pip install -e .aider --help安装桌面依赖(PySide6):
python -m pip install -e ".[desktop]"启动桌面端:
python aider_desktop_app.py安装打包依赖(PyInstaller)并构建:
python -m pip install -e ".[desktop,desktop-build]"
python tools\build_desktop_exe.py --name DAP --out-dir dist产物默认输出到:dist\DAP.exe
- 这是早期实验版:欢迎反馈 bug、建议、以及对“Doc‑First 工作流”的改进想法
- 如果你要在上游 Aider 的基础上继续演进,也欢迎把可复用的改进回馈社区
- 本项目基于上游 Aider 二次开发:https://github.com/Aider-AI/aider
- 许可证:Apache License 2.0(见 LICENSE.txt)
- 说明:本仓库包含对上游代码的修改与新增功能,但并非上游官方版本;上游作者不为本 fork 的行为或结果背书。
Aider lets you pair program with LLMs to start a new project or build on your existing codebase.
Aider works best with Claude 3.7 Sonnet, DeepSeek R1 & Chat V3, OpenAI o1, o3-mini & GPT-4o, but can connect to almost any LLM, including local models.
Aider makes a map of your entire codebase, which helps it work well in larger projects.
Aider works with most popular programming languages: python, javascript, rust, ruby, go, cpp, php, html, css, and dozens more.
Aider automatically commits changes with sensible commit messages. Use familiar git tools to easily diff, manage and undo AI changes.
Use aider from within your favorite IDE or editor. Ask for changes by adding comments to your code and aider will get to work.
Add images and web pages to the chat to provide visual context, screenshots, reference docs, etc.
Speak with aider about your code! Request new features, test cases or bug fixes using your voice and let aider implement the changes.
Automatically lint and test your code every time aider makes changes. Aider can fix problems detected by your linters and test suites.
Work with any LLM via its web chat interface. Aider streamlines copy/pasting code context and edits back and forth with a browser.
python -m pip install aider-install
aider-install
# Change directory into your codebase
cd /to/your/project
# DeepSeek
aider --model deepseek --api-key deepseek=<key>
# Claude 3.7 Sonnet
aider --model sonnet --api-key anthropic=<key>
# o3-mini
aider --model o3-mini --api-key openai=<key>See the installation instructions and usage documentation for more details.
- Installation Guide
- Usage Guide
- Tutorial Videos
- Connecting to LLMs
- Configuration Options
- Troubleshooting
- FAQ
- "My life has changed... Aider... It's going to rock your world." — Eric S. Raymond on X
- "The best free open source AI coding assistant." — IndyDevDan on YouTube
- "The best AI coding assistant so far." — Matthew Berman on YouTube
- "Aider ... has easily quadrupled my coding productivity." — SOLAR_FIELDS on Hacker News
- "It's a cool workflow... Aider's ergonomics are perfect for me." — qup on Hacker News
- "It's really like having your senior developer live right in your Git repo - truly amazing!" — rappster on GitHub
- "What an amazing tool. It's incredible." — valyagolev on GitHub
- "Aider is such an astounding thing!" — cgrothaus on GitHub
- "It was WAY faster than I would be getting off the ground and making the first few working versions." — Daniel Feldman on X
- "THANK YOU for Aider! It really feels like a glimpse into the future of coding." — derwiki on Hacker News
- "It's just amazing. It is freeing me to do things I felt were out my comfort zone before." — Dougie on Discord
- "This project is stellar." — funkytaco on GitHub
- "Amazing project, definitely the best AI coding assistant I've used." — joshuavial on GitHub
- "I absolutely love using Aider ... It makes software development feel so much lighter as an experience." — principalideal0 on Discord
- "I have been recovering from ... surgeries ... aider ... has allowed me to continue productivity." — codeninja on Reddit
- "I am an aider addict. I'm getting so much more work done, but in less time." — dandandan on Discord
- "Aider... blows everything else out of the water hands down, there's no competition whatsoever." — SystemSculpt on Discord
- "Aider is amazing, coupled with Sonnet 3.5 it's quite mind blowing." — Josh Dingus on Discord
- "Hands down, this is the best AI coding assistant tool so far." — IndyDevDan on YouTube
- "[Aider] changed my daily coding workflows. It's mind-blowing how ...(it)... can change your life." — maledorak on Discord
- "Best agent for actual dev work in existing codebases." — Nick Dobos on X
- "One of my favorite pieces of software. Blazing trails on new paradigms!" — Chris Wall on X
- "Aider has been revolutionary for me and my work." — Starry Hope on X
- "Try aider! One of the best ways to vibe code." — Chris Wall on X
- "Freaking love Aider." — hztar on Hacker News
- "Aider is hands down the best. And it's free and opensource." — AriyaSavakaLurker on Reddit
- "Aider is also my best friend." — jzn21 on Reddit
- "Try Aider, it's worth it." — jorgejhms on Reddit
- "I like aider :)" — Chenwei Cui on X
- "Aider is the precision tool of LLM code gen... Minimal, thoughtful and capable of surgical changes ... while keeping the developer in control." — Reilly Sweetland on X
- "Cannot believe aider vibe coded a 650 LOC feature across service and cli today in 1 shot." - autopoietist on Discord
- "Oh no the secret is out! Yes, Aider is the best coding tool around. I highly, highly recommend it to anyone." — Joshua D Vander Hook on X
- "thanks to aider, i have started and finished three personal projects within the last two days" — joseph stalzyn on X
- "Been using aider as my daily driver for over a year ... I absolutely love the tool, like beyond words." — koleok on Discord
- "Aider ... is the tool to benchmark against." — BeetleB on Hacker News
- "aider is really cool" — kache on X