doomemacs/modules/tools/llm
Henrik Lissner 6f40ad55f5
docs: discourage after! and use-package! use
There's little reason for users to use these macros in their private
configs over plain ol' `with-eval-after-load` and `use-package`, unless
they're writing their own modules.

It's my fault for signal boosting them in documentation and whenever I'm
asked for help, because beginners now believe they are somehow
required for Doom to work correctly (there are guides out there
telling beginners that migrating to Doom involves replacing all
instances of `with-eval-after-load` and `use-package` in their
pre-existing configs with `after!` and `use-package!` -- which was never
true).

What's more, I plan to replace `use-package`, internally, so the
`use-package!` macro won't exist for much longer.
2026-02-09 04:29:47 -05:00
..
config.el fix(llm): don't auto-kill gptel popup buffer 2025-05-11 20:34:14 -04:00
packages.el bump: :tools 2026-01-06 02:00:17 -05:00
README.org docs: discourage after! and use-package! use 2026-02-09 04:29:47 -05:00

:tools llm

Description   unfold

This module integrates LLMs into Emacs for analyzing or generating code and text, powered by the gptel package. Out of the box, ChatGPT is the default backend, but it can talk to other LLMs given some configuration.

Module flags

This module has no flags.

Hacks

󱌣 This module's hacks haven't been documented yet. Document them?

TODO Changelog

This module does not have a changelog yet.

Installation

Enable this module in your doom! block.

An OpenAI API key, paid account, and enough credits to use it is required (if you use the OpenAI backend). To use this module with other LLMs, visit the Configuration section.

Usage

󱌣 This module's usage documentation is incomplete. Complete it?

Check out gptel's usage documentation for details on how to use the package.

Doom exposes these keybinds for gptel's commands:

Keybind Command Description
<leader> o l a cmd:gptel-add Add text to LLM context
<leader> o l e cmd:gptel-quick Explain item or selection
<leader> o l f cmd:gptel-add-file Add file to LLM context
<leader> o l l cmd:gptel Open gptel chat buffer
<leader> o l s cmd:gptel-send Send text before (point) (or selection)
<leader> o l m cmd:gptel-menu Open configuration menu for gptel
<leader> o l r cmd:gptel-rewrite Rewrite, refactor, or change the selected region
<leader> o l o cmd:gptel-org-set-topic Limit context to Org heading
<leader> o l O cmd:gptel-org-set-properties Store gptel config as org properties

This module also adds a "pre-generated message" option to magit-commit's transient menu. Alternatively, press M-g to generate a message in a commit buffer.

Configuration

󱌣 This module's configuration documentation is incomplete. Complete it?

To use this module with only ChatGPT, you only need to set gptel-api-key to your OpenAI key. For other LLMs you'll need to call one of the gptel-make-* functions in an (with-eval-after-load 'gptel ...) block. Examples of these calls can be found in gptel's readme.

Troubleshooting

There are no known problems with this module. Report one?

Frequently asked questions

This module has no FAQs yet. Ask one?

TODO Appendix

󱌣 This module has no appendix yet. Write one?