An Emacs integration for Aider that brings AI pair programming, code edits and chat into Emacs workflows.
tninja/aider.el
An Emacs Lisp package that puts the Aider AI pair-programming tool inside Emacs, with transient menus, code-region refactoring and prompt files.
Open-source alternative to:Cursor
- Stars
- 684
- Forks
- 35
- Open issues
- 5
- Last commit
- last month
What is it?
aider.el is an Emacs package that provides a user interface for the Aider terminal AI coding tool, so developers can work with Aider without leaving Emacs. It runs an Aider session in a comint buffer tied to each git repository, and offers a transient menu for adding files, asking questions and requesting changes.
The package builds commands around the editing context: refactoring a selected region or the function under the cursor, implementing TODO comments in place, generating unit tests, and running a red-green-refactor TDD cycle. Prompts can be drafted in an Org-based prompt file with syntax highlighting, snippets and region-based sending to the session.
Installation works through MELPA, package-vc-install on Emacs 30+, straight.el, or Doom Emacs. Emacs 26.1 or later is required, along with Transient, Magit and markdown-mode, and Aider itself must be installed separately.
Key features
- 01Starts a git-repository-specific Aider session in an Emacs comint buffer.
- 02Refactors a selected region or the function under the cursor via a command.
- 03Implements TODO comments in place in the current context.
- 04Generates unit tests for the current function or file.
- 05Supports a TDD red-green-refactor command and asking questions about code.
- 06Provides an Org-based prompt file with syntax highlighting, snippets and region sending.
Use cases
- Emacs users who want Aider's AI pair programming without switching to a terminal.
- Refactoring a function or region in place with AI assistance.
- Drafting and reusing multi-line prompts for a large code change split into subtasks.
- Writing unit tests and running a TDD-style workflow from the editor.
Quick start
- 1
Install the aider CLI from the aider docs
- 2
Install aider.el in Emacs 30+ with package-vc-install
(package-vc-install '(aider :url "https://github.com/tninja/aider.el")) - 3
Add the use-package configuration to your init.el and set your model API key
Things to know
- Requires the separate aider CLI and a model API key, such as Anthropic, OpenAI or Gemini.
- Also needs Transient, Magit and Markdown-mode installed in Emacs.
Topics
FAQ
- What is aider.el?
- An Emacs Lisp package that puts the Aider AI pair-programming tool inside Emacs, with transient menus, code-region refactoring and prompt files. aider.el is an Emacs package that provides a user interface for the Aider terminal AI coding tool, so developers can work with Aider without leaving Emacs. It runs an Aider session in a comint buffer tied to each git repository, and offers a transient menu for adding files, asking questions and requesting changes.
- Is aider.el free to use? What license does it have?
- aider.el is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
- Is aider.el still maintained?
- Updated within 6 months. The last commit to aider.el was on Oct 4, 2026.
- What can I use aider.el for?
- Emacs users who want Aider's AI pair programming without switching to a terminal. Refactoring a function or region in place with AI assistance. Drafting and reusing multi-line prompts for a large code change split into subtasks. Writing unit tests and running a TDD-style workflow from the editor.
- How do I install aider.el?
- Install the aider CLI from the aider docs Install aider.el in Emacs 30+ with package-vc-install: (package-vc-install '(aider :url "https://github.com/tninja/aider.el")) Add the use-package configuration to your init.el and set your model API key
- Where can I get aider.el?
- The source code and installation instructions are on GitHub: https://github.com/tninja/aider.el
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
An Emacs Lisp plugin for chatting with GitHub Copilot, with code-aware prompts, buffer context, and an optional Claude CLI backend.
A personal set of TypeScript CLI tools for AI-assisted coding: terminal chat, in-file placeholder filling, one-shot code edits, and refactoring.
A modular in-buffer completion framework for GNU Emacs that shows code and text completion candidates while you type.
A minimalist vertical completion UI for Emacs that builds on the built-in completion system and works with its completion commands.
A PHP parser written in PHP that turns PHP source code into an abstract syntax tree for static analysis and code manipulation.