tninja/aider.el
AI assisted programming in Emacs with Aider
What it is
aider.el is an Emacs package that provides a user interface for Aider, a popular terminal-based AI pair-programming tool. It brings AI-assisted coding (similar to Cursor) into the Emacs editor.
Core idea
It acts as a lightweight wrapper around the Aider command-line tool. Instead of leaving Emacs to use Aider in a terminal, you can run and control Aider sessions directly inside Emacs, with menus, keybindings, and buffer management.
Key features
- Session management: Starts Aider sessions tied to specific Git repositories, allowing multiple simultaneous sessions for different projects.
- Context control: Easily add files to the AI's context—the current file, files marked in a file manager (dired), or entire modules/directories.
- Coding workflows:
- Implement TODO comments in code.
- Refactor code using techniques from Martin Fowler's book.
- Generate unit tests for functions or files.
- Ask questions about selected code or functions.
- Pull and review code diffs (from staged files, branches, or commits).
- Prompt organization: A dedicated "prompt file" per repository where you can write, organize, and send multi-line prompts to the AI session.
- Agile support: Includes tools for TDD (test-driven development), refactoring, and handling legacy code.
- Integration: Works with Magit (Git interface), Flycheck (error checking), and Helm (fuzzy search).
How it works
- It requires the Aider CLI to be installed separately.
- Configuration is passed directly to the Aider CLI, so it shares the same settings and model options (e.g., Claude, GPT) as the terminal version.
- It uses a "transient" menu (triggered by a keybinding like
C-c a) to show all available commands. - It supports various AI models, including local ones via LiteLLM.
Requirements
- Emacs 26.1 or newer.
- The
aiderCLI installed. - Emacs packages:
transient,magit, andmarkdown-mode. - An API key for an AI model (e.g., Anthropic or OpenAI).
In short, it's a productivity tool that makes AI pair-programming a first-class citizen inside Emacs, with a focus on code review, refactoring, and structured workflows.
Related
- Project
- Project
- Project
- Project