Emacs AI 2026: gptel vs Copilot.el vs Aidermacs
Published: November 21, 2026 ยท Updated: November 21, 2026 ยท 6 min read
Licenses, GitHub star counts and install requirements read from the three project repositories on November 21, 2026
Emacs does not ship with an AI assistant. Unlike Cursor or VS Code, there is no vendor bundle to enable: the AI layer comes from community packages, and each package solves a different half of the problem. One gives you a chat client, one gives you inline completions, and one gives you an agent that edits files.
Short answer: install gptel for chat, rewriting and tool use across any buffer; add Copilot.el if you want ghost-text completion and Next Edit Suggestions; choose Aidermacs if you want Aider's multi-file agent with an Ediff review step. All three packages are free to install. You pay only for the model behind them.
What are the three ways to add AI to Emacs?
They are not three versions of the same tool. gptel is an LLM client that works in any buffer, Copilot.el is an inline-completion plugin tied to GitHub Copilot, and Aidermacs is an Emacs front end for Aider. The table below compares the package itself, not the model bill:
| Package | License | Stars | What it adds | Model access |
|---|---|---|---|---|
| gptel | GPL-3.0 | 3.6k | Chat, rewrite, tools, MCP | 25+ providers or local |
| Copilot.el | MIT | 2.3k | Ghost text, chat, NES | GitHub Copilot |
| Aidermacs | Apache-2.0 | 936 | Aider agent, Ediff review | Models Aider supports |
Sources: the gptel, Copilot.el and Aidermacs repositories, read November 21, 2026. Star counts are GitHub's rounded display and change daily.
gptel: one chat client for every buffer
gptel is the broadest of the three. It puts an LLM behind a command that works in any buffer, so you can ask about a function while point is inside it, rewrite a region in place, or open a dedicated chat buffer and keep several conversations. Responses arrive as Markdown or Org markup, and sessions can be saved as normal files and resumed later.
The part that matters for 2026 is tool use. gptel can equip a model with Emacs-side tools, and it supports the Model Context Protocol through mcp.el. That means the same client can read project files, call a search tool or query an external service without a separate agent framework. It also handles images and documents, and it can display reasoning content when the provider returns it.
Backend choice is the reason people pick gptel over a vendor plugin. The README lists OpenAI, Anthropic, Gemini, Groq, Mistral, DeepSeek, OpenRouter, xAI, Together, Cerebras, Bedrock and more, plus local options: Ollama, llama.cpp, Llamafile, GPT4All and a local Open WebUI instance. You can switch providers without changing your editing workflow.
Install
M-x package-install RET gptel RETThen run M-x gptel-send. By default gptel looks for the API key through auth-source; you can also set gptel-api-key to a function that returns it. It needs Transient 0.7.8 or newer.
The trade-off: gptel is a chat and rewrite layer, not a tab-completion engine. It will not paint ghost text at point while you type. If that is the feature you want, gptel alone will feel incomplete.
Copilot.el: ghost text and Next Edit Suggestions
Copilot.el is an unofficial Emacs plugin for GitHub Copilot. It provides inline completions as ghost text, an interactive chat interface, and Next Edit Suggestions, all through the official @github/copilot-language-server. That language-server detail matters: the plugin is unofficial, but the completion engine is the same one GitHub ships to other editors.
It is the closest Emacs equivalent to the Copilot experience in VS Code: suggestions appear inline, Tab accepts them, and you can cycle through alternatives. Because it authenticates through GitHub Copilot, you need an active Copilot entitlement. The completion cap on your plan still applies, so Copilot Free's 2,000 completions a month is the ceiling unless you upgrade to Pro at $10/mo.
What it does not do is act as a general chat client for any model. You are inside GitHub's model catalog and GitHub's billing, not pointing it at Ollama or your own OpenRouter key. If vendor lock-in is the thing you are avoiding, this is the wrong package.
Aidermacs: Aider's agent inside Emacs
Aidermacs wraps Aider, the open-source pair programmer, in an Emacs transient menu. It requires Emacs 26.1 or newer and a working Aider installation; the package itself is on MELPA and NonGNU ELPA. The menu exposes Code, Chat/Ask, Architect and Help modes, file add/drop actions, test writing, debug commands and session history.
The feature that separates it from a plain terminal wrapper is Ediff integration. When Aider proposes a change, Aidermacs can open the diff for review before it lands, which is the missing safety step in a lot of agent tooling. You still get Aider's repo map and multi-file editing, but the accept/reject decision happens in an Emacs buffer rather than a scrolling terminal.
The cost model is Aider's cost model: the package is free, the model is not. Aider supports OpenAI, Anthropic, DeepSeek, OpenRouter and local models, so a local Ollama setup can run at $0 in API fees, while a hosted frontier model bills per token. The LLM API calculator is the place to price a session mix before committing.
Which one should you install?
Start from the feature you are missing, not from the star count:
- You want to ask questions, rewrite prose and call tools from any buffer: gptel. It is the only one of the three that treats the whole editor as its surface.
- You want inline completion while typing: Copilot.el. gptel will not fill that gap, and Aidermacs is too heavyweight for single-line suggestions.
- You want an agent to edit several files and show you a diff before accepting: Aidermacs. It is the closest thing to running Aider without leaving Emacs.
- You want the smallest total setup: gptel plus Copilot.el. They do different jobs and do not conflict; gptel handles chat, Copilot.el handles completion.
For a broader comparison that includes VS Code, Cursor, Zed and Neovim, see best AI code editors in 2026. If your workflow is terminal-first rather than Emacs-first, the AI terminal tools guide covers Warp, Aider and GPT Engineer.
What do the three packages cost?
| Package | Package cost | Model cost | Cheapest working setup |
|---|---|---|---|
| gptel | $0 | Provider usage | Ollama on your own machine |
| Copilot.el | $0 | Copilot plan | Copilot Free, 2,000 completions/mo |
| Aidermacs | $0 | Aider model usage | Aider + local model |
None of the three charges a subscription for the package itself. The real bill is the model: a local Ollama model avoids API fees but needs enough RAM and a GPU to be usable, while a hosted model is metered per token. Copilot is the exception because the model is bundled into a plan; the free plan is capped at 2,000 completions a month and Pro is $10/mo, data as of November 21, 2026.
A sane install order for a blank Emacs
- Install gptel first and confirm a chat request works. This proves your key, network and package archive are correct before you add a second moving part.
- Add Copilot.el only if you already have a Copilot entitlement. It needs Node.js and the Copilot language server, so treat it as a separate setup, not a one-line package install.
- Install Aider and verify it runs from a shell before installing Aidermacs. If Aider cannot start in the terminal, the Emacs front end cannot fix it.
- Keep one chat path. Running gptel, Copilot chat and Aidermacs chat at once is possible, but three sets of keybindings and three billing accounts are a maintenance cost, not a feature.
The Emacs AI stack is modular by design. That is its advantage over a vendor bundle: you can swap the model, keep the editor, and review every diff. It is also its cost: nobody installs it for you.
Price the model before you install it
gptel and Aidermacs are free; the API bill is not. Put your token mix against current rates first.
Open LLM API CalculatorFrequently Asked Questions
Does Emacs have built-in AI?
No. Emacs ships without an AI assistant. AI features come from community packages such as gptel, Copilot.el and Aidermacs, each of which connects to an external model or local runtime.
Is gptel free?
Yes. gptel is GPL-3.0 and free to install. You still pay the model provider for API usage unless you point it at a local backend such as Ollama, llama.cpp or GPT4All.
Does Copilot.el work with Copilot Free?
It authenticates through GitHub Copilot, so your Copilot plan controls access and the completion cap. Copilot Free includes 2,000 completions a month; Pro is $10/mo, data as of Nov 21, 2026.
What is the difference between Aidermacs and Aider?
Aider is the pair-programming engine; Aidermacs is an Emacs front end for it. Aidermacs requires Aider to be installed, then adds a transient menu, file management and Ediff review for proposed changes.
Can gptel use local models?
Yes. gptel lists Ollama, llama.cpp, Llamafile, GPT4All and a local Open WebUI instance among its backends, alongside hosted providers such as OpenAI, Anthropic, Gemini, Groq and OpenRouter.
Which package should a beginner install first?
Start with gptel for chat and rewriting because it has the fewest moving parts. Add Copilot.el only if you already have a Copilot entitlement and want inline completion.
Tools mentioned in this guide
Each link opens the tool's page on DevGems, with its current pricing model and โ where we have one โ the official pricing page with the date we read it.
