Emacs package for AI-assisted coding with Aider
Top 57.4% on sourcepulse
This Emacs Lisp package provides an AI-assisted programming interface for the terminal-based Aider tool, targeting Emacs users who prefer an integrated development environment. It aims to streamline AI pair programming workflows by offering features inspired by advanced AI code editors, enhancing productivity through AI-driven code generation, refactoring, testing, and code analysis directly within Emacs.
How It Works
aider.el
leverages Emacs's comint-mode
to interact with the Aider CLI. It provides a structured interface for sending code context and prompts to Aider, and for processing its responses. The package integrates AI capabilities with established software engineering practices like Test-Driven Development (TDD) and refactoring, drawing inspiration from seminal books in these fields. It also includes utilities for project planning, code review, and bootstrapping new files, all managed through Emacs keybindings and menus.
Quick Start & Requirements
package-install aider
(MELPA recommended) or package-vc-install
for Emacs 30+.Transient
, Magit
, and Markdown-mode
.aider-args
to specify AI models (e.g., "--model" "sonnet"
) and API keys via environment variables (e.g., ANTHROPIC_API_KEY
).Highlighted Details
magit-blame
for historical code analysis and diff review.aider-software-planning
.Maintenance & Community
The project is actively maintained by tninja
with contributions from a growing community. Discussions and support are available via GitHub issues.
Licensing & Compatibility
The project is licensed under the MIT License, allowing for commercial use and integration with closed-source projects.
Limitations & Caveats
The comint-mode
based interaction lacks direct file tracking, limiting some advanced AI comment features; aider-implement-todo
is provided as a workaround. The project warns about potential bugs in AI-generated code, emphasizing the need for verification and unit testing.
4 days ago
1 day