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

5 sources
Interesting. Tnx. In case anyone else wondered about using gptel to edit thinking (eg vis Qwen3.6's `preserve thinking`), [1] explains: > In a multi-turn request, from the time you run `gptel-send`, everything the LLM sends is passed back to it [...during tool calls...] includes multiple reasoning blocks. [...But...] subsequent gptel-send calls read their input from the buffer contents (or active region, etc), so the reasoning blocks in the buffer will not [] be sent as "reasoning_content". But in org mode, those are apparently `#+being_reasoning` blocks (`gptel-include-reasoning`?), so editable thought might be an easy addition? A caution, fwiw, that any llms which respond with interleaved content and reasoning blocks, currently only work when not streaming, and fixing that is non-trivial.[also 1] [1] https://github.com/karthink/gptel/is
Read the rest
In I have officially retired from Emacs
I use KVM/QEMU on Linux. I have a set of scripts that I use to create a new directory with a VM project and that also installs a debian image for the VM. I have an ./pull_from_vm and ./push_to_vm that I use to pull and push the git code to and from the vm. As well as a ./claude to start claude on the vm and a ./emacs to initialize and start emacs on the vm after syncing my local .spacemacs directory to the vm (I like this because of customized emacs muscle memory and because I worry that emacs can execute arbitrary code if I use it to ssh to the VM client from my host). I try not to run LLM's directly on my own host. The only exception I have is that I do use https://github.com/karthink/gptel on my own machine, because it is just too damn useful. I hope I don't self own myself with that someday.
In Let's discuss sandbox isolation

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.