madrigal provides LLM-driven Emacs editing through CRDT replicas.
use-packageIf madrigal is in your load-path (or installed as a package), use:
(use-package madrigal
:ensure t
:after (llm crdt)
:commands (madrigal-edit)
:init
;; llm-openai.el is a module in the `llm` package; load it explicitly
;; when you want OpenAI/OpenAI-compatible providers.
(require 'llm-openai)
:custom
(madrigal-llm-provider
(make-llm-openai-compatible
:url "https://api.openai.com/v1/"
:key (lambda () (getenv "OPENAI_API_KEY"))
:chat-model "gpt-4o")))
madrigal.el and madrigal-pkg.el:
llmcrdtllm-openai is not a separate package dependency; it is a module
provided by the llm package. Load it with (require 'llm-openai) before
constructing OpenAI or OpenAI-compatible providers.