HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
karthink
gptel
Emacs Lisp2023–2026
karthink / gptel

gptel

A simple, extensible LLM client for Emacs

39Distinct people
43Mentions
1Explicit recommenders
3.6KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

A simple, extensible LLM client for Emacs

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

gptel in emacs does this. You can run the same prompt against different models in separate emacs windows (local or via api w/ keys) at the same time to compare outputs. I…

peterb used a recommendation phrase. One indexed comment matches. This is a phrase match, not a verdict.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 9–Nov 16 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/16/2026, 12:01:57 AM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year43 dated mentions

Observed mentions: 2023-03-22 04:09:50 UTC to 2026-08-05 06:52:46 UTC.

0510152023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 8 mentions; 1 submissions, 7 comments20232024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 15 mentions; 1 submissions, 14 comments20242025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 15 mentions; 0 submissions, 15 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 5 mentions; 0 submissions, 5 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC817
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC15114
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC15015
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC505

From the project README

An excerpt from the repository, fetched Nov 13, 2026.

Read the project’s introduction
gptel: A simple LLM client for Emacs gptel is a simple Large Language Model chat client for Emacs, with support for multiple models and backends. It works in the spirit of Emacs, available at any time and uniformly in any buffer. General usage: (YouTube Demo, 18 min) Advanced usage: (YouTube Demo, 28 min) intro-demo.mp4 intro-demo-2.mp4 In-place usage gptel-rewrite-demo-1.mp4 Tool use gptel-tool-use-filesystem-confirm-demo-2.mp4 gptel-tool-use-feed-search-demo.mp4 See also this youtube demo (2 minutes) by Armin Darvish. Interact with LLMs from anywhere in Emacs (any buffer, shell, minibuffer, wherever). LLM responses are in Markdown or Org markup. Supports multiple independent conversations, one-off ad hoc interactions and anything in between. Supports tool-use to equip LLMs with agentic capabilities. Supports Model Context Protocol (MCP) integration using mcp.el. Supports multi-modal input (include images, documents). Supports “reasoning” content in LLM responses. Save chats as regular Markdown/Org/Text files and resume them later. Edit your previous prompts or LLM responses when continuing a conversation. These will be fed back to the model. Supports introspection, so you can see exactly what will be sent. Inspect and modify queries before sending them. Pause multi-stage requests at an intermediate stage and resume them later. Don’t like gptel’s workflow? Use it to create your own for any supported model/backend with a simple API. gptel uses Curl if available, but falls back to the built-in url-retrieve to work without external dependencies. Contents Installation Straight Manual Doom Emacs Spacemacs Setup OpenAI Other LLM backends (Optional) Securing API keys with =authinfo= (Optional) Reading API keys from environment variables OpenAI (ChatGPT plus/pro subscription) Azure GPT4All Ollama Open WebUI Gemini Llama.cpp or Llamafile Kagi (FastGPT & Summarizer) together.ai Anyscale Perplexity Anthropic (Claude) Groq Mistral Le Chat OpenRouter PrivateGPT DeepSeek Sambanova (Deepseek) Cerebras Novita AI xAI AI/ML API GitHub CopilotChat AWS Bedrock Moonshot (Kimi) Usage In any buffer: In a dedicated chat buffer: Including media (images, documents or plain-text files) with requests Save and restore your chat sessions Setting options (backend, model, request parameters, system prompts and more) Include more context with requests Handle “reasoning” content Tool use Defining gptel tools Selecting tools LLM tool collections Model Context Protocol (MCP) integration Rewrite, refactor or fill in a region Extra Org mode conveniences Introspection (examine, debug or modify requests) FAQ Chat buffer UI I want the window to scroll automatically as the response is inserted I want the cursor to move to the next prompt after the response is inserted I want to change the formatting of the prompt and LLM response How does gptel distinguish between user prompts and LLM responses? Transient menu behavior I want to set gptel options but only for this buffer I want the transient menu options to be saved so I only need to set them once Using the transient menu leaves behind extra windows Can I change the transient menu key bindings? (Doom Emacs) Sending a query from the gptel menu fails because of a key conflict with Org mode Miscellaneous I want to use gptel in a way that’s not supported by gptel-send or the options menu (ChatGPT) I get the error “(HTTP/2 429) You exceeded your current quota” Why another LLM client? Additional Configuration Option presets Applying presets to requests automatically Alternatives Packages using gptel Acknowledgments Installation Note: gptel requires Transient 0.7.8 or higher. Transient is a built-in package and Emacs does not update it by default. Ensure that package-install-upgrade-built-in is true, or update Transient manually. Release version: M-x package-install ⏎ gptel in Emacs. Development snapshot: Add MELPA or NonGNU-devel ELPA to your list of package sources, then install with M-x package-install ⏎ gptel. Optional: Install markdown-mode. Straight (straight-use-package 'gptel) Manual Note: gptel requires Transient 0.7.8 or higher. Transient is a built-in package and Emacs does not update it by default. Ensure that package-install-upgrade-built-in is true, or update Transient manually. Clone or download this repository and run M-x package-install-file⏎ on the repository directory. Doom Emacs In packages.el (package! gptel :recipe (:nonrecursive t)) In config.el (use-package! gptel :config (setq! gptel-api-key "your key")) “your key” can be the API key itself, or (safer) a function that returns the key. Setting gptel-api-key is optional, you will be asked for a key if it’s not found. Alternatively, Doom Emacs provides a built-in :tools llm module powered by gptel. Enable it in your init.el in the doom! block: (doom! :tools llm) This installs gptel with preconfigured keybindings (<leader> o l), m
Read the full README on GitHub

What Hacker News says

15 sources
Learning to leverage AI as it exists today takes effort, but is usually worth it. However, ignoring the effort undercuts the distance these products have to go. Speech is great because there is just a single interface to integrate with. Obviously I'm biased to my employer's speech product, but I'm sure there are many. Biggest thing for me was when I saw that the lem editor[0] posted on hacker news[1] was a small editor, which has 3 top level features: common lisp API, LSP support, and copilot support. I've installed gptel[2] in emacs, and hacking up a few tools that really make it shine. Up next is figuring out voice + AI + emacs :) [0]: https://lem-project.github.io/ [1]: https://news.ycombinator.com/item?id=41357409 [2]: https://github.com/karthink/gptel
In I Use AI 100 Times per Hour
> If you use Org mode, you can have branching conversations in gptel where each path through the document's outline tree is a separate conversation branch. This way you can explore tangential topics while retaining the lineage of the conversation that led to them, while excluding the other branches. This keeps the context window from blowing up and your API inference costs (if any) down. Can you give an example of how this looks? I see it's mentioned in https://github.com/karthink/gptel/?tab=readme-ov-file#extra-... but I feel like I need an example. It sounds quite interesting and useful, I've often done this "manually" by saving to a new buffer when I go on a tangent. EDIT: Nevermind, C-h v gptel-org-branching-context gives: Use the lineage of the current heading as the context for gptel in Org buffers. This makes each same
Read the rest
level heading a separate conversation branch. By default, gptel uses a linear context: all the text up to the cursor is sent to the LLM. Enabling this option makes the context the hierarchical lineage of the current Org heading. In this example: ----- Top level text * Heading 1 heading 1 text * Heading 2 heading 2 text ** Heading 2.1 heading 2.1 text ** Heading 2.2 heading 2.2 text ----- With the cursor at the end of the buffer, the text sent to the LLM will be limited to ----- Top level text * Heading 2 heading 2 text ** Heading 2.2 heading 2.2 text ----- This makes it feasible to have multiple conversation branches. Cool :-D
In gptel: a simple LLM client for Emacs

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.