Description
We should add a clawdchan update command to the CLI. This command will provide a single-step workflow to synchronize
the local installation with the latest state of the repository, ensuring that both the binaries and the environment
configuration (agent wiring, tool definitions, and guides) are always current.
Proposed Behavior
The update command should perform a full synchronization in three steps:
-
Binary Update:
- The command will refresh the local binaries (clawdchan, clawdchan-mcp, and clawdchan-relay) by rebuilding them
from the latest repository source (e.g., using go install ...@latest).
-
Configuration & Agent Sync:
- The command will automatically refresh the environment configuration to match the latest repo standards.
- It should detect which agents (Claude Code, OpenClaw, etc.) are already active and re-run their "wiring" logic
(e.g., updating .mcp.json tool definitions or refreshing CLAWDCHAN_GUIDE.md files).
- This step must be non-interactive, preserving the user's existing settings (relay URL, alias, and selected
scopes).
-
Service Refresh & User Notification:
- If the clawdchan daemon is installed, the command should automatically restart it so the background listener
runs the latest code immediately.
- Agent Restart Alert: Upon completion, the command must explicitly notify the user to restart their active
agents (e.g., Claude Code or OpenClaw sessions). This ensures the agents reload the updated MCP server and pick
up any changes to the tool surface or guides.
User Experience
1 $ clawdchan update
2 ▸ Syncing with latest repository changes...
3 ▸ Rebuilding binaries... done.
4 ▸ Synchronizing agent configurations:
5 [ok] Claude Code MCP tools refreshed.
6 [ok] OpenClaw agent guides updated.
7 ▸ Restarting background daemon... done.
8
9 ✅ ClawdChan is now up to date with the latest repository state.
10 👉 Please restart your active agents (Claude Code / OpenClaw) to apply changes.
Technical Implementation Tasks
- Refactor Setup: Modify cmd_setup.go to separate the "wiring" logic from the interactive prompts, allowing it to be
called in a "refresh-only" mode.
- Update Command: Implement cmd_update.go to handle the rebuild of binaries and trigger the configuration sync.
- State Persistence: Ensure the CLI tracks which agents are currently "active" in the configuration so it knows what
to refresh during the update.
Description
We should add a clawdchan update command to the CLI. This command will provide a single-step workflow to synchronize
the local installation with the latest state of the repository, ensuring that both the binaries and the environment
configuration (agent wiring, tool definitions, and guides) are always current.
Proposed Behavior
The update command should perform a full synchronization in three steps:
Binary Update:
from the latest repository source (e.g., using go install ...@latest).
Configuration & Agent Sync:
(e.g., updating .mcp.json tool definitions or refreshing CLAWDCHAN_GUIDE.md files).
scopes).
Service Refresh & User Notification:
runs the latest code immediately.
agents (e.g., Claude Code or OpenClaw sessions). This ensures the agents reload the updated MCP server and pick
up any changes to the tool surface or guides.
User Experience
10 👉 Please restart your active agents (Claude Code / OpenClaw) to apply changes.
Technical Implementation Tasks
called in a "refresh-only" mode.
to refresh during the update.