Email-based, end-to-end encrypted messaging for OpenClaw
Quick Start • Configuration • CLI Reference • Library API • Installation
This plugin integrates Delta Chat as a messaging channel for OpenClaw. It provides:
- OpenClaw channel plugin -- send and receive messages through Delta Chat
- Standalone CLI -- manage chats, contacts, and messages from your terminal
- Programmatic library -- embed Delta Chat operations in your own scripts
The project is written in TypeScript (src/) and compiles to CommonJS output in dist/.
# Build from source
npm run build
# Install as an OpenClaw extension
make install
# Verify
deltachat-cli statusConfiguration is loaded from deltachat-config.json (or the path in OPENCLAW_DELTACHAT_CONFIG).
Example config
{
"accounts": [
{
"email": "you@example.org",
"mail_pw": "app-password",
"data_dir": "~/.var/app/chat.delta.desktop/config/DeltaChat/accounts/<account-dir>",
"database_path": "~/.var/app/chat.delta.desktop/config/DeltaChat/accounts/<account-dir>/dc.db",
"account_id": 1
}
],
"runtime": {
"rpc_server_path": "~/.venv/deltachat/bin/deltachat-rpc-server",
"python_path": "~/.venv/deltachat/bin/python"
}
}| Field | Required | Notes |
|---|---|---|
accounts[].email |
Yes | Email address for the Delta Chat account |
accounts[].mail_pw |
Yes | App password or mail password |
accounts[].data_dir |
Yes | Path to the account data directory |
accounts[].database_path |
No | Defaults to <data_dir>/dc.db if omitted |
accounts[].account_id |
No | Numeric account ID |
runtime.rpc_server_path |
No | Path to deltachat-rpc-server binary |
runtime.python_path |
No | Fallback Python interpreter path |
The runtime resolves the Delta Chat RPC server in this order:
deltachat-rpc-serverscript (preferred)python <script>fallback- Python module startup (legacy last resort)
OPENCLAW_DELTACHAT_CONFIG-- point to an alternate config file- OpenClaw channel-level config can override
configPath,rpcServerPath, andpythonPath inviteLinkcan be set inopenclaw.jsonordeltachat-config.jsonto auto-join a Delta Chat invite
Build first, then run commands via node dist/cli.js or install globally with npm link to get the deltachat-cli command.
npm run build
npm link # optional: adds deltachat-cli to PATH| Command | Description |
|---|---|
status |
Show account and connection status |
list-chats [--query TEXT] [--limit N] [--json] |
List all chats, optionally filtered |
list-messages --chat ID [--limit N] [--json] |
List messages in a chat |
send (--chat ID | --to EMAIL) --text TEXT [--file PATH] [--name NAME] |
Send a text or file message |
delete-messages --chat ID --ids ID[,ID...] [--for-all] |
Delete messages |
set-profile [--name NAME] [--avatar PATH] [--clear-avatar] |
Update local profile |
save-attachment --message ID --path PATH |
Save a message attachment to disk |
edit-message --message ID --text TEXT |
Edit a sent message |
react --message ID --reaction "EMOJI [EMOJI...]" |
React to a message |
chat-info --chat ID [--json] |
Show detailed chat info |
create-group --name NAME [--protect] [--members EMAIL[,...]] [--json] |
Create a new group |
rename-chat --chat ID --name NAME [--json] |
Rename a chat |
leave-group --chat ID |
Leave a group chat |
join-qr --qr TEXT [--json] |
Join a chat via QR/invite link |
show-qr [--chat ID] [--svg-path PATH] [--json] |
Display or export a join QR code |
receive [--timeout SECS] [--count N] [--json] [--no-mark-seen] |
Listen for incoming messages |
create-chat --to EMAIL |
Create a 1:1 chat by email address |
deltachat-cli status
deltachat-cli list-chats --limit 10 --json
deltachat-cli send --to friend@example.org --text "hello from the CLI"
deltachat-cli send --chat 42 --file ./photo.jpg --text "check this out"
deltachat-cli receive --json --timeout 60
deltachat-cli create-group --name "Project Team" --protect --members a@x.org,b@x.org
deltachat-cli show-qr --chat 42 --svg-path invite.svgThe plugin can be used programmatically from Node.js.
const plugin = require('./dist/plugin');
// Set display name and avatar
await plugin.updateProfile(
{ configPath: '/path/to/deltachat-config.json' },
{ displayName: 'OpenClaw Bot', avatarPath: '/path/to/avatar.jpg' }
);
// Clear avatar
await plugin.updateProfile(
{ configPath: '/path/to/deltachat-config.json' },
{ clearAvatar: true }
);make installDefault target: ~/.openclaw/extensions/deltachat
# Configure OpenClaw integration
bash ./configure-openclaw.sh
# Or run end-to-end repair (install + rewrite openclaw.json + doctor --fix + verify)
bash ./repair-openclaw-deltachat.shmake uninstallMinimal channel entry for openclaw.json:
{
"channels": {
"deltachat": {
"enabled": true,
"configPath": "~/.openclaw/extensions/deltachat/deltachat-config.json"
}
}
}src/ TypeScript sources
dist/ Compiled JavaScript (generated)
accounts/ Account data directories
Makefile Build & install targets
openclaw.plugin.json Plugin manifest
deltachat-config.json Default runtime config
- Node.js >= 18.0.0
deltachat-rpc-serveror a Python environment with Delta Chat bindings
MIT