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

8 sources
I primarily use gptel configured in Emacs right now, so I’ve found myself with a chat buffer always open. https://github.com/karthink/gptel In the last couple of weeks I’ve found it really useful chatting through ideas about a parser combinator library I’ve been working on. It also really helped me understand some of the finer points of monad lore. I genuinely don’t mind when it gets things slightly wrong first time, I’ve found the interactive process much more productive and educational than finding half a solution on StackOverflow and then being on my own. I use it several times a week to extract structured data from chaos. It’s truly excellent at taking a specified template (CSV, JSON or XML) and fleshing it out. Sometimes I do this for test data entirely generatively. This isn’t a work thing I guess but it’s generated what I think are
Read the rest
extremely high quality D&D campaigns to play with my kids who have just started out. Things like that really help increase the amount of quality time you have as a family when you’re busy. I’ve also tried many things that have failed. I often want help with cryptic crossword clues, sometimes even after giving up and getting the answer I don’t quite understand the construction. But neither does GPT. I have tried to use it to structure parts of my classical history reading but I’ve found it no better than Wikipedia in general and its utter refusal to have opinions about anything is slightly maddening.
In Ask HN: How are you using GPT to be productive?
See also gptel[0], gptai[1], codegpt[3], chatgpt[2], ChatGPT.el[4], gpt.el[5], and I'm sure more I missed. Of these, [0] is my favorite so far, and most focus to greater or lesser degrees on passing regions/whole buffers into GPT for it to digest. This package looks like a great complement! [0]: https://github.com/karthink/gptel [1]: https://github.com/antonhibl/gptai [2]: https://github.com/emacs-openai/chatgpt [3]: https://github.com/emacs-openai/codegpt [4]: https://github.com/joshcho/ChatGPT.el [5]: https://github.com/stuhlmueller/gpt.el
In A ChatGPT Emacs Shell

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.