aider

Aider-AIApache-2.0更新放缓

在终端里跑 AI 结对编程,让大模型直接读写本地代码库、自动改文件并提交 git,省去在编辑器和聊天窗口间来回粘贴。

aider is AI pair programming in your terminal

v0.86.0发布于 2025-08-09 17:42 UTC50,047star +50 / 7 天5,152fork同步于 2026-11-10 11:19 UTC

怎么上手

由 README 提炼,执行前请确认
python -m pip install aider-install
aider-install
cd /to/your/project
aider --model sonnet --api-key anthropic=<key>
硬件要求按 README 说明

README 未说明显存或 GPU 要求;支持连接本地模型,但未列出具体硬件规格。

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

终端里的 AI 结对编程工具,让 LLM 直接读写你现有代码库并提交改动

在终端里跑 AI 结对编程,让大模型直接读写本地代码库、自动改文件并提交 git,省去在编辑器和聊天窗口间来回粘贴。

核心能力

  • 为整个代码库生成仓库地图,便于在大项目中定位
  • 自动用合理的提交信息把改动提交到 git,可 diff 和回滚
  • 每次改动后自动运行 lint 和测试并修复报错
  • 支持 100+ 编程语言和云端、本地多种 LLM
  • 可在 IDE 内用注释触发修改,也支持图片、网页和语音输入

容易踩的坑

需要自备 LLM 的 API key,或自行部署本地模型;安装分两步,先装 aider-install 再运行 aider-install 命令;不同模型要用对应的 --model 名称和 key 参数。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v0.86.0
  1. v0.86.0Aider v0.86.0最新正式版2025-08-09 · 2025-08-09 17:42 UTC
    • Added support for all GPT-5 models.

    • Added support for Grok-4 via xai/grok-4 and openrouter/x-ai/grok-4 model names.

    • Added support for gemini/gemini-2.5-flash-lite-preview-06-17 model, by Tamir Zahavi-Brunner.

    • /clear now prints “All chat history cleared.” so you know it worked, by Zexin Yuan.

    • /undo output now shows only the first line of each commit message, making it easier to read.

    • Added support for openrouter/moonshotai/kimi-k2 model, by Jack Harrington.

    • Display model announcements with no-arg /model command.

    • Fixed an issue where new settings for an existing model didn't replace the old ones, by Andrew Grigorev.

    • Fixed analytics to support the latest PostHog SDK event-capture API.

    • Bumped dependencies to pick up latest litellm==1.75.0.

    • Aider wrote 88% of the code in this release.

  2. v0.85.0Aider v0.85.02025-06-27 · 2025-06-27 23:47 UTC
    查看更新说明
    New Models
    • Added support for new Gemini models including gemini-2.5-pro, gemini-2.5-flash, and gemini-2.5-pro-preview-06-05 with thinking tokens support.
    • Updated model aliases: flash now points to gemini-2.5-flash and gemini now points to gemini-2.5-pro.
    • Support for Responses API models like o1-pro, o3-pro.
    • Added support for OpenAI o3-pro model across multiple providers.
    • Enhanced thinking tokens support: can now be disabled by setting to 0, and improved help text with examples.
    • Increased max tokens for Deepseek models to 65536 for better performance.
    • Updated pricing for o3.
    New Features & Enhancements
    • Added --add-gitignore-files flag to enable adding files listed in .gitignore to Aider's editing scope, by omarcinkonis.
    • Co-authored-by attribution is now enabled by default for commit messages.
    • Enhanced commit message generation to use system prompt prefixes, by Luke Reeves.
    • Added --commit-language option to specify the language for commit messages, by Kyosuke Takayama.
    • Skip expensive file tracking operations when --skip-sanity-check-repo is enabled for better performance, by Makar Ivashko.
    • Optimized chat history summarization performance, by jayeshthk.
    • Added custom PostHog analytics configuration options with --analytics-posthog-host and --analytics-posthog-project-api-key flags, by Vasil Markoukin.
    Repository Map
    • Added MATLAB language support for repository maps, by Matthew Tofano.
    • Added Clojure language support for repository maps, by Garrett Hopper.
    • Improved kebab-case identifier recognition in repository maps for better code analysis.
    Fixes & Small Improvements
    • Improved GitHub Copilot token handling with better validation and error messages, by Vincent Taverna and Sebastian Estrella.

    • Improved inline code rendering in Rich markdown output, by Vamsi Talupula.

    • Fixed Vertex AI model name prefixes in settings, by Wietse Venema.

    • Improved /read-only command to resolve literal paths correctly, by Matteo Landi.

    • Fixed encoding issues in git diff output and LLM history logging.

    • Fixed search block regex to accept optional closing tags when working with HTML content, by Mathis Beer.

    • Auto-create parent directories for chat history files to prevent startup errors, by contributor.

    • Ensure pip is available before package installation.

    • Aider wrote 21% of the code in this release.

  3. v0.84.0Aider v0.84.02025-05-30 · 2025-05-30 23:28 UTC
    查看更新说明

    Model support & provider updates

    • Added support for new Claude models including the Sonnet 4 and Opus 4 series (e.g., claude-sonnet-4-20250514, claude-opus-4-20250514) across various providers. The default sonnet and opus aliases were updated to these newer versions.
    • Added support for the vertex_ai/gemini-2.5-flash-preview-05-20 model.
    • Updated default OpenRouter models during onboarding to deepseek/deepseek-r1:free for the free tier and anthropic/claude-sonnet-4 for paid tiers.
    • Automatically refresh GitHub Copilot tokens when used as OpenAI API keys, by Lih Chen.

    Core functionality improvements

    • Fixed an issue where files explicitly added via the command line were not correctly ignored if listed in .gitignore.
    • Improved automatic commit messages by providing more context during their generation, by wangboxue.
    • Fixed OpenRouter token cost calculation for improved accuracy.

    Quality of life improvements

    • Improved OpenRouter model metadata handling by introducing a local cache, increasing reliability and performance.
    • Added shell tab completion for file path arguments (by saviour) and for --edit-format/--editor-edit-format options.
    • The /settings command now displays detailed metadata for active main, editor, and weak models.
    • Improved user language detection by correctly normalizing hyphenated language codes (e.g., en-US to en) and enhancing the validation of locale results.
    • Prevented aider from instructing the LLM to reply in 'C' or 'POSIX' when these are detected as the system locale.
    • Displayed a spinner with the model name when generating commit messages.
    • Bumped configargparse to 1.7.1 as 1.7 was pulled.
  4. v0.83.0Aider v0.83.02025-05-09 · 2025-05-09 22:46 UTC
    查看更新说明
    • Added support for gemini-2.5-pro-preview-05-06 models.
    • Added support for qwen3-235b models.
    • Added repo-map support for OCaml and OCaml interface files, by Andrey Popp.
    • Added a spinner animation while waiting for the LLM to start streaming its response.
    • Updated the spinner animation to a Knight Rider style.
    • Introduced --attribute-co-authored-by option to add co-author trailer to commit messages, by Andrew Grigorev.
    • Updated Gemini model aliases (e.g., gemini, gemini-2.5-pro) to point to the 05-06 preview versions.
    • Marked Gemini 2.5 Pro preview models as overeager by default.
    • Commit message prompt specifies the user's language.
    • Updated the default weak model for Gemini 2.5 Pro models to gemini/gemini-2.5-flash-preview-04-17.
    • Corrected gemini-2.5-pro-exp-03-25 model settings to reflect its lack of support for thinking_budget.
    • Ensured model-specific system prompt prefixes are placed on a new line before the main system prompt.
    • Added tracking of total tokens sent and received, now included in benchmark statistics.
    • Automatically fetch model parameters (context window, pricing) for OpenRouter models directly from their website, by Stefan Hladnik.
    • Enabled support for thinking_tokens and reasoning_effort parameters for OpenRouter models.
    • Improved cost calculation using litellm.completion_cost where available.
    • Added model settings for openrouter/google/gemini-2.5-pro-preview-03-25.
    • Added --disable-playwright flag to prevent Playwright installation prompts and usage, by Andrew Grigorev.
    • The aider scrape command-line tool will now use Playwright for web scraping if it is available, by Jon Keys.
    • Fixed linter command execution on Windows by adopting oslex for argument quoting, by Titusz Pan.
    • Improved cross-platform display of shell commands by using oslex for robust argument quoting, by Titusz Pan.
    • Improved /ask mode to instruct the LLM to elide unchanging code in its responses.
    • Ensured web scraping in the GUI also respects Playwright availability and the --disable-playwright flag.
    • Improved display of filenames in the prompt header using rich Text formatting.
    • Enabled reasoning_effort for Gemini 2.5 Flash models.
    • Added a --shell-completions argument to generate shell completion scripts (e.g., for bash, zsh).
    • Explicit --attribute-author or --attribute-committer flags now override the default behavior when --attribute-co-authored-by is used, allowing finer control over commit attribution, by Andrew Grigorev.
    • Fixed an issue where read-only status of files might not be preserved correctly by some commands (e.g. /drop after adding a read-only file).
    • The aider-args utility (or python -m aider.args) now defaults to printing a sample YAML configuration if no arguments are provided.
    • Displayed token count progress and the name of the file or identifier being processed during repo map updates.
    • Extended the waiting spinner to also show for non-streaming responses and further enhanced its animation with console width clipping, cursor hiding, and a more continuous appearance.
    • Dropped support for Python 3.9.
    • Aider wrote 55% of the code in this release.

    Full release notes: https://aider.chat/HISTORY.html

  5. v0.82.0Aider v0.82.02025-04-14 · 2025-04-14 23:29 UTC
    查看更新说明
    • Support for GPT 4.1, mini and nano.

    • Improved support for using architect mode with Gemini 2.5 Pro.

    • Add support for xai/grok-3-beta, xai/grok-3-mini-beta, openrouter/x-ai/grok-3-beta, openrouter/x-ai/grok-3-mini-beta, and openrouter/openrouter/optimus-alpha models.

    • Added support for grok-3-fast-beta and grok-3-mini-fast-beta models.

    • Added new patch edit format for OpenAI's GPT-4.1 model.

    • Added new editor-diff, editor-whole, and editor-diff-fenced edit formats.

    • Bugfix for automatically selecting the best edit format to use in architect mode.

    • Add alias "grok3" for xai/grok-3-beta.

    • Add alias "optimus" for openrouter/openrouter/optimus-alpha.

    • Fix URL extraction from error messages.

    • Allow adding files by full path even if a file with the same basename is already in the chat.

    • Fix quoting of values containing '#' in the sample aider.conf.yml.

    • Add support for Fireworks AI model 'deepseek-v3-0324', by Felix Lisczyk.

    • Aider wrote 92% of the code in this release.

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    Features

    Cloud and local LLMs

    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.

    Maps your codebase

    Aider makes a map of your entire codebase, which helps it work well in larger projects.

    100+ code languages

    Aider works with most popular programming languages: python, javascript, rust, ruby, go, cpp, php, html, css, and dozens more.

    Git integration

    Aider automatically commits changes with sensible commit messages. Use familiar git tools to easily diff, manage and undo AI changes.

    Use in your IDE

    Use aider from within your favorite IDE or editor. Ask for changes by adding comments to your code and aider will get to work.

    Images & web pages

    Add images and web pages to the chat to provide visual context, screenshots, reference docs, etc.

    Voice-to-code

    Speak with aider about your code! Request new features, test cases or bug fixes using your voice and let aider implement the changes.

    Linting & testing

    Automatically lint and test your code every time aider makes changes. Aider can fix problems detected by your linters and test suites.

    Copy/paste to web chat

    Work with any LLM via its web chat interface. Aider streamlines copy/pasting code context and edits back and forth with a browser.

    Getting Started

    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.

    More Information

    Documentation

    Community & Resources

    Kind Words From Users