Clawchat
pendingby Neil Hoff
Chat with OpenClaw AI agents with vault context awareness.
Clawchat š¦
Obsidian plugin for AI-powered chat with vault context
Chat with OpenClaw AI agents directly in Obsidian. Your vault content is automatically included as context.
ā” Quick Start
1. Install
mkdir -p your-vault/.obsidian/plugins/clawchat
cd your-vault/.obsidian/plugins/clawchat
# Download main.js, manifest.json, styles.css from https://github.com/nexushoff-bot/clawdian/releases
Enable in Obsidian: Settings ā Community Plugins ā Clawchat
2. Start Gateway
openclaw gateway run --tailscale serve
3. Connect
In Clawchat settings:
- Gateway URL:
wss://your-machine.tailXXXX.ts.net - Token: From
~/.openclaw/openclaw.jsonāgateway.auth.token
Why Tailscale? Obsidian's Electron app origin (
app://obsidian.md) isn't recognized by standard WebSocket origin checks. Tailscale authenticates at the network level, bypassing this issue.
Features
| Feature | Description |
|---|---|
| Vault Context | Current note content sent with messages |
| Chat History | Saved locally in .clawchat/chat-history.json |
| File Attachments | Attach vault files as context |
| Slash Commands | /search, /create, /summarize, /clear |
| Multi-Agent | Switch between agents with color themes |
| Auto-Connect | Connect automatically on startup |
Slash Commands
| Command | Description |
|---|---|
/search <query> | Search vault and include results |
/create <title> | Create a new note |
/summarize | Summarize context or attachments |
/clear | Clear conversation history |
Usage
Start Chatting
- Click the chat icon in Obsidian's ribbon
- Select an agent (if not auto-connected)
- Type your message ā current note is included automatically
Attach Files
- Click "+ Add file" in the context bar
- Select files from your vault
- Click Ć to remove
Switch Agents
Click the agent dropdown in the header. Your selection is remembered.
Security
Token Storage
Uses Obsidian's Secret Storage (encrypted, isolated per-plugin):
- Location:
.obsidian/plugins/clawchat/.secrets/token - NOT in settings.json or localStorage
Network
- All traffic via Tailscale (
wss://) - No external telemetry
- Chat history stored locally only
Troubleshooting
"Cannot connect to Gateway"
openclaw gateway status
Verify Gateway URL matches your Tailscale address in settings.
"Auth error: missing scope"
Generate a new token with operator.read, operator.write, operator.admin scopes.
UI not updating
Hard reload: Cmd/Ctrl + Shift + R
Chat history not loading
Normal for new installs. Check .clawchat/chat-history.json exists.
Development
git clone https://github.com/nexushoff-bot/clawdian.git
cd clawchat-fix
npm install
npm run build
cp main.js manifest.json styles.css /path/to/vault/.obsidian/plugins/clawchat/
See CODE_REFERENCE.md for architecture docs.
Project Structure
src/
āāā main.ts # Plugin entry, history, tokens
āāā settings.ts # Settings panel UI
āāā components/
ā āāā ChatView.ts # Chat UI, messages, commands
ā āāā TokenModal.ts # Token input modal
āāā utils/
āāā OpenClawClient.ts # WebSocket client
Publishing
- Update version in
manifest.json - Create GitHub release with
main.js,manifest.json,styles.css - Add entry to
community-plugins.json:
{
"id": "clawchat",
"name": "Clawchat",
"author": "Neil Hoff",
"description": "Chat with OpenClaw AI agents with vault context.",
"repo": "nexushoff-bot/clawdian"
}
- Submit PR to obsidian-releases
For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.