← all repositories
xenodium/chatgpt-shell

Emacs users finally get a shell that talks back

A multi-LLM comint shell for Emacs that treats ChatGPT, Claude, and Ollama as interchangeable utilities, not web apps.

1.2k stars Emacs Lisp Chat AssistantsCoding Assistants
chatgpt-shell
Velocity · 7d
+1.0
★ / day
Trend
steady
star history

What it does

chatgpt-shell wraps eight LLM providers (OpenAI, Anthropic, Google, DeepSeek, Perplexity, Kagi, OpenRouter, and local Ollama) inside Emacs’s native comint shell. You type, it streams back responses. No browser, no context switching, no leaving your editor.

The package also provides a compose buffer for crafting prompts from selected regions, inline code modifications with diff confirmation, and org babel-style execution of source blocks directly inside responses.

The interesting bit

The real craft is in the compose buffer workflow: select code, hit your binding, edit the prompt in a dedicated buffer, submit with C-c C-c, then navigate replies with single-key bindings (n/p for blocks, r to reply, m for “more like this”). It’s REPL-like interactivity applied to LLM prompting, complete with transient menus for discoverability.

Key highlights

  • Swap models mid-session with M-x chatgpt-shell-swap-model — same buffer, different brain
  • Compose buffer with automatic region import and read-only response mode
  • Transient menu (C-c C-t) exposing shell, navigation, code actions, and history commands
  • Inline edits via diff confirmation; execute code blocks with C-c C-c like org babel
  • Vision support for ChatGPT only (image description, desktop region selection)
  • Install via MELPA or straight.el; API keys per provider except free local Ollama

Caveats

  • Vision experiments are ChatGPT-only; other providers not yet supported
  • README notes the project is “in development” and solicits sponsorship for sustainability
  • Cloud providers require paid API access (costs are yours, not abstracted)

Verdict

Worth installing if you already live in Emacs and want LLM access that respects your muscle memory. Skip it if you need cross-editor consistency or a polished GUI — this is a power-user’s shell, not a beginner’s chat client.

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