Efrit AI for Emacs Is the Ultimate Power Trip Nobody Asked For
Hello everyone. Strap in, because today we’re dissecting Efrit – an AI-powered Emacs coding assistant that apparently wants to be the Jarvis of text editors. Spoiler alert: whether it’s a charming companion or just another machine spewing syntax like a caffeinated parrot depends entirely on how much you love Emacs, Elisp, and living in what most normal people would consider a terminal dungeon.
The Elevator Pitch – and Why It Stops at Floor 42
The premise is bold: an AI assistant that taps directly into Emacs’ native Elisp evaluation, no messy abstractions, no “training wheels.” It’s all pedal to the metal… assuming you’re the sort of maniac who enjoys putting your foot down while riding a unicycle through rush hour traffic. Efrit offers multiple “faces”: efrit-chat
for conversational multi-turn talks, efrit-do
for quick natural language commands, and efrit-agent-run
for when you want the AI to go on some glorious self-driven quest. Sounds amazing, right? Well, yes – on paper. In practice, think less “science fiction AI ally” and more “overzealous intern with root access.”
Features or Just Fancy Buzzwords?
- Direct Elisp Evaluation – The AI can poke directly at your Emacs from the inside. Excellent if you want power; terrifying if you value stability.
- Multi-turn Conversations – Maintains context across commands. A godsend for iterative work, or a way to ensure your mistakes are made persistently and with confidence.
- Tool Integration – It can manipulate buffers and call functions, like a digital mischievous imp in your editor.
- Safety-First Design – Confirmation prompts and error handling are here to stop you from burning the whole house down. Whether they’ll work before the AI decides your config needs some “improvements” is another matter.
Installation – May the Odds Be Ever in Your Favour
You’ll need Emacs 28.1+, an Anthropic API key, and an internet connection. The setup is a lean three-step process if you do it the “standard” way: clone the repo, tweak your .emacs.d/init.el
, and stash your API key into ~/.authinfo
. Of course, for the true masochists, there’s the “emergency” one-liner that loads it straight in with emacs -q
, bypassing all your usual configurations, like a speedrun glitch that might just soft-lock your editing session.
Using Efrit – Between Smooth Jazz and Death Metal
This is where the tool flexes – various M-x
commands let you chat, issue one-liners, or launch an automation loop. The examples are almost… whimsical. The devs demo creating poems about Vim in multiple buffers. I see what’s happening here – subtle trolling disguised as feature tests. But fortunately, it does more than literary burns: you can count lines, open scratch buffers, and pull all TODOs in a project without touching your keyboard shortcuts. For those allergic to manual keystrokes, it’s borderline utopian.
Configuration – For When You Want the AI to Have Personality
The configuration is about as granular as a medical differential diagnosis – model names, token limits, turn timers, error display preferences, debug toggles. This is the kind of control that lets power users fine-tune Efrit to either be a restrained assistant or a hyperactive NPC companion constantly interrupting you with side quests. You even get custom keybindings for those who fancy muscle memory roulette.
Core Philosophy – All In on Elisp
Here’s the part where I put on my tinfoil hat in clinic – this “Elisp-centric” approach is probably why the dev insists Efrit has “unlimited flexibility.” Which is true… in the same way handing someone the nuclear launch codes is “flexibility.” It’s raw, powerful, and just waiting for either brilliance or disaster. The architecture is broken into neat, focused components – from chat handlers to debugging, all working under this efficient but potentially perilous philosophy.
Version 0.2.0 – Now with More Firepower
The latest release brags about solving API errors, boosting token limits by a factor of eight, organizing message ordering, and improving theme compatibility. It’s production-ready now, they say. That’s doctor-speak for “We finally stopped the patient from flatlining every 30 seconds.” A much-needed stability boost, in other words.
The Verdict
If you’re a seasoned Emacs power user who likes the idea of an AI with direct access to your editor’s soul and you’re comfortable giving it the keys to your kingdom, Efrit is impressive – even charming in its rawness. But for the average coder, this is the gaming equivalent of being dropped into Dark Souls wearing nothing but rags and a broken dagger. Strong potential, but be ready for the occasional boss fight with your own configuration.
Overall impression: cautiously good, assuming you know exactly what you’re signing up for. If you don’t, well – don’t blame me when Efrit decides your commented-out code looks “lonely” and replaces it with an ode to Vim.
And that, ladies and gentlemen, is entirely my opinion.
Article source: Efrit: A native elisp coding agent running in Emacs, https://github.com/steveyegge/efrit