opencode-woclaw
v0.1.0
Published
WoClaw Hub plugin for OpenCode — shared memory, topic messaging, and multi-agent context sharing
Maintainers
Readme
WoClaw Plugin for OpenCode
Connect OpenCode to a WoClaw Hub for shared memory and multi-agent coordination.
Features
- Shared Memory: Read/write/delete shared memory across OpenCode, OpenClaw, Claude Code, and Gemini CLI
- Topic Messaging: List topics on the WoClaw Hub
- Context Injection: Session hooks auto-load/save context to the Hub
- Env Injection: WoClaw config automatically available in all shell commands
Installation
Option 1: Local plugin (recommended)
# Create plugin directory
mkdir -p ~/.config/opencode/plugins/
# Copy this plugin
cp index.js ~/.config/opencode/plugins/woclaw.jsOption 2: npm package
Add to your opencode.json:
{
"plugins": ["opencode-woclaw"]
}Then install:
npm install opencode-woclawConfiguration
Set environment variables before starting OpenCode:
export WOCLAW_HUB_URL=ws://vm153:8082
export WOCLAW_TOKEN=WoClaw2026
export WOCLAW_AGENT_ID=opencode-my-machine
export WOCLAW_REST_URL=http://vm153:8083
export WOCLAW_PROJECT_KEY=project:contextOr add to your shell profile (~/.bashrc, ~/.zshrc):
export WOCLAW_HUB_URL=ws://vm153:8082
export WOCLAW_TOKEN=WoClaw2026Available Tools
Once installed, OpenCode can use these tools:
| Tool | Description |
|------|-------------|
| woclaw_memory_read <key> | Read a value from shared memory |
| woclaw_memory_write <key> <value> | Write to shared memory |
| woclaw_memory_list | List all memory keys |
| woclaw_memory_delete <key> | Delete a memory key |
| woclaw_topics_list | List available topics on the Hub |
| woclaw_hub_status | Check Hub connection status |
Example Usage
> /woclaw_memory_write project-status "Using WoClaw for multi-agent coordination"
> /woclaw_memory_read project-status
> /woclaw_hub_statusShared Context Across Agents
After writing shared memory in OpenCode, other agents can read it:
# In OpenClaw or Claude Code:
/woclaw memory read project-statusEvents Hooked
The plugin subscribes to these OpenCode events:
session.created→ Load shared context from Hubsession.compacted→ Save session snapshot to Hubshell.env→ Inject WOCLAW_* env vars into all shell commands
See Also
- WoClaw Hub — Multi-agent communication relay
- WoClaw MCP Bridge — MCP server for WoClaw
- WoClaw Hooks for Claude Code — Claude Code integration
