← all repositories
karthink/gptel

LLM chat that lives in every Emacs buffer, not a sidebar

It keeps you from alt-tabbing out of Emacs just to ask a model to rewrite a function.

3.5k stars Emacs Lisp Chat AssistantsAgents
gptel
Not currently ranked — collecting fresh signals.
star history

What it does gptel is an LLM client for Emacs that lets you chat, refactor, or ask questions from any buffer—code, prose, shell, or minibuffer. It supports dozens of backends from OpenAI and Claude to Ollama and local Llamafile servers, and returns responses as Markdown or Org markup. Conversations can be saved as plain text files and resumed later, or kept as ephemeral in-place interactions.

The interesting bit Instead of locking you into a dedicated chat pane, gptel acts like a native Emacs feature: rewrite a region of code in-place, inspect exactly what payload will be sent before it goes, pause multi-stage tool-use requests mid-flight, or define your own commands via its API if the default workflow annoys you.

Key highlights

  • Works uniformly across any buffer, shell, or minibuffer—no context switching required.
  • Supports tool-use and MCP integration via mcp.el for agentic capabilities.
  • Handles multi-modal input (images, documents) and reasoning content in responses.
  • Lets you introspect, edit, and modify queries before sending them to the backend.
  • Falls back to Emacs’ built-in url-retrieve if Curl isn’t available, keeping dependencies minimal.

Caveats

  • Requires Transient 0.7.8 or higher, which may need a manual update since Emacs doesn’t upgrade built-in packages by default.
  • The breadth of supported backends means setup details vary widely and can require careful API key management.

Verdict Worth a look if you treat Emacs as your primary environment and want LLM assistance woven into existing buffers rather than siloed in a browser. If you rarely leave VS Code or want a polished GUI chat interface, this won’t convert you.

Frequently asked

What is karthink/gptel?
It keeps you from alt-tabbing out of Emacs just to ask a model to rewrite a function.
Is gptel open source?
Yes — karthink/gptel is open source, released under the GPL-3.0 license.
What language is gptel written in?
karthink/gptel is primarily written in Emacs Lisp.
How popular is gptel?
karthink/gptel has 3.5k stars on GitHub.
Where can I find gptel?
karthink/gptel is on GitHub at https://github.com/karthink/gptel.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.