An LLM-powered coding agent for Emacs using gptel.
Make sure you read the material in the documentation directory.
Please note that I used early versions of coding-agent.el to both develop later versions and to help build the documentation.
- Single-file mode: Send coding instructions to an LLM for the current buffer
- Multi-file project mode: Apply changes across an entire project
- Interactive diff review: Review proposed changes via ediff before accepting
- Language-aware: Automatic detection and evaluation for multiple languages
- Seamless integration: Works with your existing gptel backend configuration
Screenshot showing using coding-agent.el on a multi-file Clojure project:
- Emacs 29+
- gptel package
- straight.el (for package installation)
- External tools:
rg(ripgrep) orfind,diff
Place coding-agent.el in your load path and add to your configuration:
(use-package coding-agent
:straight (:local-repo "~/GITHUB/coding-agent"))- Open a source file
- Run
M-x ca-run-agent(orC-c a r) - Enter an instruction (e.g., "add comments", "refactor to use let*")
- Review the diff in ediff
- Press
qand answeryto apply changes
| Key | Command | Description |
|---|---|---|
C-c a r |
ca-run-agent |
Send instruction for single file |
C-c a p |
ca-run-agent-project |
Send instruction for whole project |
C-c a e |
ca-eval-buffer-for-language |
Evaluate/syntax-check buffer |
C-c a h |
ca-help |
Show help message |
C-c l r |
my-llm-send-region-or-buffer |
Raw gptel chat |
C-c l c |
gptel-chat |
Open gptel chat buffer |
Python, Common Lisp, Clojure, JavaScript, TypeScript, Ruby, Go, Rust, C, C++, Java, Emacs Lisp, Shell
The package uses your existing gptel backend. Configure gptel-backend and gptel-model before using coding-agent.
GPL-3.0
