- Emacs Lisp 89.1%
- JavaScript 5.8%
- Shell 4.8%
- Makefile 0.3%
| .beads | ||
| .githooks | ||
| docs | ||
| test | ||
| .gitignore | ||
| AGENTS.md | ||
| LICENSE | ||
| Makefile | ||
| openclaw-pkg.el | ||
| openclaw.el | ||
| README.org | ||
openclaw.el
- Overview
- Installation
- Quick Start
- Configuration
- Keybindings
- Slash Commands
- Gateway Protocol
- Troubleshooting
- Repository History
- Development
- License
- Links
Overview
openclaw.el is an Emacs package that provides a complete interface to OpenClaw, your personal AI assistant.
Each OpenClaw session becomes its own Emacs buffer, and you get:
- Leader-key based keybindings for all slash commands
- Direct slash command support for those who prefer it
- Full feature parity with the OpenClaw TUI
- Multiple simultaneous sessions in separate buffers
Installation
With straight.el and use-package (recommended)
If you use straight.el with use-package, add this to your init file:
(use-package openclaw
:straight (openclaw :type git :host github :repo "Kyvero-Vexus/openclaw.el")
:config
(setq openclaw-gateway-url "ws://127.0.0.1:18789"))
With straight.el only
(straight-use-package
'(openclaw :type git :host github :repo "Kyvero-Vexus/openclaw.el"))
With Quelpa
(use-package openclaw
:quelpa (openclaw :fetcher github :repo "Kyvero-Vexus/openclaw.el"))
Manual installation
Clone this repository and add to your load-path:
(add-to-list 'load-path "/path/to/openclaw.el")
(require 'openclaw)
Dependencies
- Emacs 27.1 or later
- websocket package (for WebSocket communication)
straight.el and package.el will install dependencies automatically.
Quick Start
-
Connect to your OpenClaw gateway:
M-x openclaw-connect RET -
Start chatting:
M-x openclaw-chat RET - Type your message and press
C-c C-cto send.
Configuration
Gateway settings
(setq openclaw-gateway-url "ws://127.0.0.1:18789"
openclaw-gateway-token "your-token-here")
Leader key
By default, leader-style commands are accessible under C-c in openclaw-mode:
(setq openclaw-leader-key "C-c") ; default
Keybindings
Chat mode (openclaw-chat-mode)
| Key | Command |
|---|---|
RET |
Send message |
C-c C-c |
Send message |
C-c C-l |
List sessions |
C-c C-s |
Switch session |
C-c C-n |
New chat |
C-c C-h |
Show history |
C-c C-q |
Close connection |
Leader keys
In openclaw-mode, single-letter commands are available:
| Key | Command |
|---|---|
c |
Connect |
C |
Close connection |
l |
List sessions |
s |
Switch session |
n |
New chat |
m |
Send message |
h |
Show history |
? |
Help |
Slash Commands
You can still use OpenClaw slash commands directly by typing them in the chat buffer:
/status- Show session status/clear- Clear chat history/model- Change model/help- Show gateway help
Gateway Protocol
openclaw.el communicates with the OpenClaw gateway via JSON-RPC over WebSocket:
- Default URL:
ws://127.0.0.1:18789 - Protocol: JSON-RPC 2.0
-
Methods used:
sessions.list- List available sessionschat.send- Send a messagechat.history- Fetch message history
See the OpenClaw Gateway documentation for more details.
Troubleshooting
Authentication failures with gateway v2026.3.7+
Starting with OpenClaw gateway v2026.3.7, the gateway.auth.mode configuration
field is required. If you see authentication errors ("auth mode not configured"
or similar), ensure your ~/.openclaw/openclaw.json includes:
{
"gateway": {
"auth": {
"mode": "token",
"token": "your-token-here"
}
}
}
Valid mode values: token, password, none. When mode is omitted the
gateway will reject all connection attempts.
Repository History
On 2026-03-08, this repository's GitHub and GitLab histories were unified with a
history-preserving merge commit on main:
- Commit:
e8cc6dc - Purpose: connect previously unrelated remote histories while preserving the canonical working tree from this repository.
If you're auditing old refs or bisecting across remotes, use e8cc6dc as the
history unification point.
Development
Running tests
make test
Byte compilation check
make compile
License
GNU Affero General Public License v3.0 or later. See LICENSE for details.