Model or dataset
MatthewZMD/aidermacs avatar
MatthewZMD/aidermacs

Aidermacs: Aider inside Emacs, with a Magit-style transient menu

AI Pair Programming in Emacs with Aider

929 stars79 forksEmacs LispApache-2.0

At a glance

What is it?
Aidermacs wraps the Aider CLI in Emacs Lisp, routing AI pair programming through a transient menu and an Ediff review step. It is for Emacs users who want Aider's model backends without leaving the editor.
Who is it for?
Adopt Aidermacs if you already live in Emacs, have Aider installed, and want a review step before AI edits land. Do not adopt it if you want a self-contained plugin that manages its own model credentials, or if you are not willing to install and update the Aider CLI separately.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 7 days ago.
What is it written in?
Mainly Emacs Lisp, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 15, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

The gap Aidermacs fills between Aider and Emacs

Aider is a terminal program. You run it, it reads your repository, proposes edits, and applies them. That workflow is fine until you are deep in an Emacs buffer and would rather not context-switch to a shell. Aidermacs exists for that specific moment. The README frames the target user directly: people who are "missing Cursor but prefer living in Emacs."

The package does not reimplement Aider. It drives it. Commands in the transient menu map onto Aider operations: adding files to the chat context, asking questions about code, requesting an architect-mode change, accepting proposed changes. The Emacs layer supplies the interface, the file selection, and the diff review. Aider supplies the model integration and the editing logic.

That division has consequences. Aidermacs is only as capable as the Aider version on your machine, and it is only as current as the CLI you installed. It is also not a general-purpose chat client for Emacs; the commands are organised around code actions, not freeform conversation, even though Chat/Ask mode exists as one of the four persistent modes.

How the transient menu maps to Aider operations

The main entry point is aidermacs-transient-menu, described in the README as similar to Magit's menu system. Opening it presents grouped keys rather than a single prompt. Core keys start or reset a session: a starts or opens a session with auto-detected project root, . starts in the current directory for monorepos, s resets, x exits. Persistent modes 1 through 4 select Code, Chat/Ask, Architect and Help.

File actions are where the Emacs integration earns its place. f adds a file, F adds the current file, w adds from the current window, m adds marked files from Dired, d adds files from a directory of the same type. Each of these can be prefixed with C-u to add the file as read-only. The README explains the distinction: editable files grant the AI permission to read and modify, while read-only files are context only. Session scratchpads (S) feed notes to the model as read-only, and G adds files outside the project or files listed in .gitignore, which Aider does not pick up automatically.

Code actions then operate on that context: c for a code change, e to question code, r for an architect change, p to question the symbol at point, g to accept proposed changes, i to implement a TODO, t to write a test, T to fix a test. The backend layer is split across aidermacs-backend-comint.el and aidermacs-backend-vterm.el, with aidermacs-backends.el selecting between them. Model handling lives in aidermacs-models.el, and aidermacs-default-model is the custom variable that picks the default, shown as "sonnet" in the README sample.

Installing Aidermacs from MELPA and running a first session

Three things must be present before the package is useful: Emacs 26.1 or newer, the Aider CLI (or the community fork Aider Community Experimentation), and Transient. The README points to MELPA and Non-GNU ELPA as the distribution channels, and notes that cloning manually is also possible.

The sample configuration below is the README's own. It binds the transient menu to C-c a, sets an API key through setenv, and chooses architect mode with the sonnet model as defaults. The README comments that an API key exported in .bashrc is picked up automatically by Aider, so setenv is only needed when you want to set it from Elisp.

emacs-lisp
(use-package aidermacs
  :bind (("C-c a" . aidermacs-transient-menu))
  :config
  (setenv "ANTHROPIC_API_KEY" "sk-...")
  :custom
  (aidermacs-default-chat-mode 'architect)
  (aidermacs-default-model "sonnet"))

After evaluating that, open a project and invoke the menu. The README gives two options: M-x aidermacs-transient-menu, or the bound key.

emacs-lisp
(global-set-key (kbd "C-c a") 'aidermacs-transient-menu)

With the menu open, press a to start or open a session at the auto-detected project root, or . to start in the current directory when working inside a monorepo. Then add files with F for the current file or m for marked Dired files, and issue a code action such as c for a change. According to the README, changes are reviewed through built-in Ediff integration, and g accepts the proposed changes. Spacemacs users have a separate path: add aidermacs to dotspacemacs-additional-packages with the same :variables block, then bind the leader key in dotspacemacs/user-config.

Ediff review, auto-commits and the commands that can surprise you

The review step is the strongest argument for this design. AI-generated edits arrive as diffs you inspect before accepting, rather than as text that silently replaces your buffer. That matters most in a codebase where you cannot hold the whole change in your head.

Two menu entries are conditional, and the README is explicit about the condition: ^ shows the last commit and u undoes the last commit, both "if auto-commits enabled." If you have not enabled auto-commits in Aider, those keys have nothing to act on. That is a real limitation of the interface, not a bug, but it is the kind of thing you discover by pressing the key.

The larger failure mode is environmental. Aidermacs depends on an external CLI that must be installed, on PATH, and configured with working credentials. If Aider cannot authenticate in the shell environment Emacs inherits, the Emacs side will not fix it. The README's own advice about setting keys in .bashrc exists precisely because credential discovery happens on the Aider side. There is also a backend split between comint and vterm; terminal emulation differences are a known source of friction in Emacs, and the repository ships two backend files rather than one, which tells you the choice is not purely cosmetic.

A third constraint: files in .gitignore are not automatically included in Aider's context. The G command exists to add them explicitly. If you expect the tool to see a generated file or a local config, it will not until you add it.

Aidermacs versus calling the Aider CLI directly

The honest alternative is not another Emacs package. It is running Aider in a terminal, or in a shell buffer such as vterm or eat. That approach gives you the full Aider command set immediately, including anything the Emacs wrapper has not surfaced, and it removes a layer that can lag behind upstream releases.

The difference in approach is where file selection and review happen. In a terminal, you type /add and /drop commands and read diffs in the same scrollback. In Aidermacs, file selection is bound to Emacs primitives: the current window, the current file, marked Dired entries, a directory of the same type. Review goes through Ediff. If your working style is already Dired-centric, that is a genuine gain, because you never retype a path. If you mostly work in one or two files and prefer a REPL-like flow, the terminal is faster to start and has fewer moving parts.

A second alternative worth naming is a general Emacs LLM client used alongside Aider rather than instead of it. The README's community quotes mention gptel and mcp.el in the same breath as Aidermacs, and one quoted user describes running local LLMs with ellama. Those tools handle chat and tool use; Aidermacs handles the Aider-specific edit-and-review loop. They are complementary, not substitutes, and the README treats them that way.

Maintenance, release cadence and the Apache-2.0 licence

The repository is not archived, and the last push was on 2026-09-08. Releases v1.11, v1.12 and v1.13 all landed on 2026-08-29, which suggests a burst of tagging rather than a steady drip. The README notes that the author sees new commits on package upgrades, and one quoted user says the same. For an Emacs package distributed through MELPA and Non-GNU ELPA, that cadence is normal and low-risk: you update through package.el and read the changelog if something breaks.

The real upgrade cost sits outside the package. Aidermacs tracks Aider, and Aider's own releases change model names, flags and behaviour. The README's quick start already accounts for a fork, Aider Community Experimentation, which means the dependency surface is not a single upstream. When Aider changes, Aidermacs has to follow, and your configuration may need adjusting even if the Emacs Lisp did not change.

The licence is Apache-2.0, stated in the repository's LICENSE file and shown in the README badge. That is a permissive licence with an explicit patent grant and a requirement to preserve notices. It is compatible with commercial use, but if you redistribute a modified version you need to carry the licence and state changes. This is a description of the licence text, not legal advice; check the LICENSE file and your own obligations.

Editorial conclusion

Adopt Aidermacs if you already live in Emacs, have Aider installed, and want a review step before AI edits land. Do not adopt it if you want a self-contained plugin that manages its own model credentials, or if you are not willing to install and update the Aider CLI separately. Before committing, verify that Aider runs standalone in the same shell Emacs inherits, that your API keys are exported in .bashrc or set via setenv, and that the backend choice in aidermacs-backends.el suits your terminal setup.

Frequently asked questions

What is the difference between Aider and Aidermacs?

Aider is the underlying AI pair programming CLI that reads your repository and proposes edits. Aidermacs is an Emacs package that drives that CLI through a transient menu, adding Emacs-native file selection and Ediff review of the proposed changes.

What do I need installed before using Aidermacs in Emacs?

The README lists Emacs 26.1 or newer, the Aider CLI (or its community fork Aider Community Experimentation), and Transient. The package itself is available from MELPA and Non-GNU ELPA, or by cloning the repository.

How do I add a file as read-only so the AI cannot edit it?

Every add-file command in the transient menu can be prefixed with C-u to add the file as read-only. Read-only files are given to the AI as context but are not modified.

Why does Aidermacs not see files that are in .gitignore?

Aider does not automatically include gitignored files in its context, as the README states. The Add File to Session command, bound to G, exists to include files outside the current project or files in .gitignore.

Does Aidermacs support local models and multiple providers?

The README lists intelligent model selection with multiple backends as a key feature, and the sample configuration sets an ANTHROPIC_API_KEY while commenting on an OpenRouter key. Model defaults are set with aidermacs-default-model, shown as "sonnet" in the README example.

Official sources

  1. Issues
  2. License: Apache-2.0
  3. MatthewZMD/aidermacs on GitHub
  4. README
  5. Releases
Community notes

Community notes