# aider.el puts Aider pair programming inside Emacs

> aider.el is an Emacs Lisp package that drives the Aider command line tool from a transient menu, with one comint session per git repository. It suits Emacs users who want Aider's terminal workflow without leaving the editor, and the project is candid that most of its own code was written by Aider.

**tninja/aider.el** — AI assisted programming in Emacs with Aider

- Repository: https://github.com/tninja/aider.el
- Stars: 682 · Forks: 35
- Language: Emacs Lisp
- License: Apache-2.0
- Published: 2026-10-21 · Updated: 2026-10-21 · Language: en
- Canonical page: https://hysenlabs.com/projects/tninja-aider-el

## A terminal tool with an Emacs face, not a native editing assistant

The problem this package addresses is narrow and real. Aider is a command line pair programming tool, and the author of aider.el wanted the convenience of that tool for people who live in Emacs, including users who like the AI features of a graphical editor but do not want to leave their key bindings. The package therefore does not try to be an AI coding agent implemented in Lisp. It drives the Aider command line tool and gives it a menu, key bindings and file helpers from inside Emacs. The author states that most of the Elisp in the repository was itself generated by Aider or by aider.el, which is a neat bit of self reference but also an implicit statement about how much bespoke logic you are taking on. The stated goal is a stable daily productivity tool, and the author says features and functions are tested carefully before code merging.

## One comint session per git repository, keyed off the current file

The central command is aider-run-aider, and its behaviour is more specific than the name suggests. It creates a comint based Aider session that is scoped to a git repository, and repository identification is derived from the path of the file you are currently visiting. That has a useful consequence: several Aider sessions can run at the same time for different repositories, each with its own buffer. When the command is invoked with the universal argument, the session opens a prompt offering to change the contents of aider-args for that run only. There is also a directory-sensitive behaviour. If you run the command from a dired, an eshell or a shell buffer, it asks whether you want to add the --subtree-only flag, which limits the file set to that directory and is described as making things faster. The companion command aider-switch-to-buffer moves you back to the Aider buffer, and pressing ^ there toggles between opening the session in another window in the current frame or in a dedicated frame, which suits a multi monitor arrangement where code occupies one frame and the session another.

## aider-args is passed straight through to the CLI

Configuration is thin by design, and that is the right call for a wrapper. The variable aider-args is passed directly to the Aider CLI, so any option in the Aider options reference can be used without the package having to model it. The other half of the design is what happens when aider-args is empty, which is the default: the CLI then reads ~/.aider.conf.yml, so the command line tool and the Emacs package share one configuration file rather than keeping two copies of the same settings. The sample configuration in the documentation shows the model selection and key handling written out, including a comment noting that the personal config file can be used instead. The practical consequence is that you can drive Aider from Emacs during a session and then continue in a terminal with identical behaviour, which is the main reason to prefer this wrapper over building a private configuration path.

## Installing from MELPA and pointing it at a model

Emacs 26.1 or newer is required. The dependency libraries to install through your package manager are Transient, Magit and Markdown-mode, since the menu system and the prompt reading features depend on them. For the recommended MELPA route, the archive entry has to be added to package-archives after requiring package and before package-initialize, then the package is fetched with M-x package-refresh-contents and installed with M-x package-install for the aider package. The archive setup looks like this:

```elisp
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
(package-initialize)
```

After that, the package needs to be loaded and configured in your init file. The documentation's own snippet shows a Claude Sonnet model with architect auto acceptance disabled, the API key taken from a variable, and a global binding for the transient menu:

```elisp
  (use-package aider
    :config
    (setq aider-args '("--model" "sonnet" "--no-auto-accept-architect"))
    (setenv "ANTHROPIC_API_KEY" anthropic-api-key)
    (global-set-key (kbd "C-c a") 'aider-transient-menu))
```

The commented lines in that same snippet cover the OpenAI and Gemini models and the ~/.aider.conf.yml route. Aider itself has to be installed separately from its own documentation, and the package shells out to it.

## package-vc-install, Straight and Doom are three doors into the same package

The MELPA route is recommended, but three alternatives exist and they differ in what you have to maintain yourself. The built-in package-vc-install path works on Emacs 30 and newer and fetches the source directly from GitHub:

```elisp
(package-vc-install '(aider :url "https://github.com/tninja/aider.el"))
```

With that route you install the required packages such as Transient, Magit and helm yourself, and the configuration block is the same as for MELPA. Straight is the third option, where the repository is declared directly:

```elisp
  (use-package aider
    :straight (:host github :repo "tninja/aider.el")
    :config
    ;; rest of configs
    )
```

For Doom Emacs the recipe goes in doom/packages.el:

```elisp
(package! aider :recipe (:host github :repo "tninja/aider.el" ))
```

and the configuration goes in doom/config.el, with the Doom menu module required explicitly:

```elisp
(use-package aider
  :config
  (setq aider-args '("--model" "sonnet"))
  (require 'aider-doom))
```

The Doom prefix is ~A~, so [SPC] A p a opens the Aider buffer, [SPC] A f f adds the current file and [SPC] A p s resets the session. The author is direct about the preference order here, recommending the transient menu over the Doom menu because the transient menu is the one used daily and therefore better maintained, and inviting contributions to the Doom menu.

## What the file layout reveals about the feature surface

The repository is a package rather than a single file, and the module names describe the intended use. aider-core.el holds the shared machinery, aider-code-read.el and aider-code-change.el cover the read and change oriented workflows, aider-discussion.el handles conversational prompts, aider-file.el deals with adding files, and aider-prompt-mode.el relates to the prompt files that sit at the repository root as prompts_1.txt, prompts_2.txt and prompts_3.md. There is also aider-agile.el, aider-legacy-code.el for working with existing code, aider-bootstrap.el, plus separate modules for the Doom and Helm integrations. The examples directory holds a README.org and two sample projects, battleship and connect4, which is a reasonable way to try the workflow without pointing it at production code. The documentation also links a FAQ and a future work section, and a recent change history file, so the project keeps a running record rather than only a readme.

## Where aider.el stops, and where the documentation goes quiet

Several limits are worth stating plainly before you install it. It is a front end to a command line program, so the Aider CLI has to be installed and reachable, and whatever Aider does not support is not reachable through the menu either. The comint buffer is the interface, which means the workflow inherits terminal style interaction rather than giving you a structured in-editor view of proposed edits, and the session is tied to a git repository derived from the current file, so working outside a repository is an awkward case rather than a supported one. The Helm integration is optional and needs its own require, and the Doom menu is described as the less maintained of the two menus. The documentation also does not cover how to update the package when a new tag appears, does not describe a rollback path, and does not explain how the prompt files at the repository root are loaded or in what order they are presented. A separate Chinese translation of the readme exists for users who want it.

## Conclusion

aider.el is a reasonable choice for an Emacs user who already runs Aider in a terminal and wants the session, the file list and the prompts inside the editor, especially if you work across several repositories at once. It is the wrong tool if you want an in-editor diff review experience, since the package hands control to a comint buffer running the CLI rather than rendering edits in a dedicated view, and it is not a route to a fully self-contained Emacs AI assistant. Before adopting it, check that your Emacs is 26.1 or newer, that the Aider CLI is on your path, and that you are comfortable writing a model and API key into your init file. The last push was on 2026-10-04 and the newest tagged release is v0.13.2 from 2025-11-25.

## FAQ

### What does aider.el do in Emacs?

It provides an interface to the Aider command line tool inside Emacs, including a transient menu, one comint session per git repository, and commands for adding files and switching back to the session buffer.

### How do I install aider.el in Emacs?

Emacs 26.1 or newer is required, along with Transient, Magit and Markdown-mode. The recommended route is MELPA with M-x package-install, or package-vc-install on Emacs 30 and newer, which fetches the package from the tninja/aider.el repository.

### How does aider.el choose which Aider model to use?

Through the aider-args variable, whose contents are passed straight to the Aider CLI. If aider-args is left empty, which is the default, the CLI reads ~/.aider.conf.yml instead so that the terminal tool and the Emacs package share one configuration.

### Can I run several Aider sessions in one Emacs?

Yes. The session is scoped to the git repository derived from the current file path, so multiple sessions can run simultaneously for different repositories, each in its own buffer.

### Is Helm required to use aider.el?

No. Helm support is optional and adds fuzzy searching to command history prompts. If you installed the package through MELPA or package-install, you enable it by requiring aider-helm in your configuration.

## Sources

- [Issues](https://github.com/tninja/aider.el/issues)
- [License: Apache-2.0](https://github.com/tninja/aider.el/blob/bootstrap_file/LICENSE)
- [README](https://github.com/tninja/aider.el/blob/bootstrap_file/README.md)
- [Releases](https://github.com/tninja/aider.el/releases)
- [tninja/aider.el on GitHub](https://github.com/tninja/aider.el)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/tninja-aider-el
