Copilots, Assistants and other AI helpers are popping up all around us. While there is undoubtedly some hype surrounding these tools, they are also just a genuinely useful piece of technology. It’s quite interesting to explore new workflows and integrations using them. One such integration that has proven itself useful to me is an integration in Emacs called chatgpt-shell.
chatgpt-shell is a comint-based
buffer with a prompt to enter instructions and displaying the response from
ChatGPT. Behind the scenes there is much more going on of course. It creates the
API request and parses the result. It handles streaming, errors, syntax
highlighting. It provides several user commands, customizations, keyboard
shortcuts.
What I like about it is it’s explicitness and simplicity. Type M-x chatgpt-shell
and you’re dropped into a shell buffer directly in Emacs to chat
with ChatGPT. That’s it. While not the most advanced integration it also doesn’t
try to figure out how to be smart and helpful on its own. Instead, it is smart
and helpful when I ask it to be and gets out of my way if I don’t. I quite like
this approach currently.
It’s also fun to play around with various system prompts. I’m using the
Programming
prompt most of the time. This essentially tells the LLM to be
concise and on point. It avoids much of the polite noise that LLMs tend to
produce.
One issue that nagged me is the time it takes for ChatGPT to generate responses. Oftentimes I’m waiting for the answer and even if it’s just a few seconds, watching the response trickle in can be annoying. It’s like a slightly too long delay in keyboard input or a lagging mouse. Not the end of the world, but strangely irritating. I guess I wouldn’t even think too much about it, if I wouldn’t know that there are alternatives trying to tackle this exact issue. One example is Kagi’s FastGPT. Another recent contender is Claude’s Haiku.
Currently these models are tuned for response speed and cost while sacrificing a bit of “intelligence”. It’s a trade-off, but depending on what you need, a good one. Also, the field is evolving so rapidly! When we are talking about giving up “intelligence” Haiku still beats ChatGPT 3.5 in benchmarks.
And so here we are. Today I’m announcing claude-shell - a Claude integration in Emacs!
It is very similar to
chatgpt-shell and built on the
same shell-maker
foundation. Go head over to
https://github.com/arminfriedl/claude-shell and see if you like the new Haiku.
Of course you can also use Sonnet or Opus with
claude-shell.