Clawchat

pending

by Neil Hoff

Chat with OpenClaw AI agents with vault context awareness.

ā˜… 1 starsUpdated 22d agoDiscovered via Obsidian Unofficial Plugins
View on GitHub

Clawchat šŸ¦ž

Obsidian plugin for AI-powered chat with vault context

Status License

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

FeatureDescription
Vault ContextCurrent note content sent with messages
Chat HistorySaved locally in .clawchat/chat-history.json
File AttachmentsAttach vault files as context
Slash Commands/search, /create, /summarize, /clear
Multi-AgentSwitch between agents with color themes
Auto-ConnectConnect automatically on startup

Slash Commands

CommandDescription
/search <query>Search vault and include results
/create <title>Create a new note
/summarizeSummarize context or attachments
/clearClear conversation history

Usage

Start Chatting

  1. Click the chat icon in Obsidian's ribbon
  2. Select an agent (if not auto-connected)
  3. Type your message — current note is included automatically

Attach Files

  1. Click "+ Add file" in the context bar
  2. Select files from your vault
  3. 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

  1. Update version in manifest.json
  2. Create GitHub release with main.js, manifest.json, styles.css
  3. 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"
}
  1. Submit PR to obsidian-releases

License: MIT | GitHub | Docs

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.