@superdad/xiaochuang
v0.0.6
Published
OpenClaw Xiaochuang channel plugin — real-time AI integration via Bridge
Readme
@superdad/xiaochuang
OpenClaw channel plugin for Xiaochuang — real-time AI interaction via xcai-cli Bridge.
Quick Start
One command to install, activate, and configure:
npx -y @superdad/xiaochuang@latest installFor test environment:
npx -y @superdad/xiaochuang@latest install-testThe install script will:
- Check OpenClaw is installed
- Install the plugin via
openclaw plugins install - Download the xcai-cli Bridge binary for your platform
- Prompt for an activation code (from the Xiaochuang miniprogram)
- Activate and save the token
- Enable the plugin and restart the gateway
Architecture
OpenClaw ── xiaochuang plugin ── stdio ── xcai-cli Bridge ── WebSocket ── xcai-server- Plugin spawns
xcai-cli bridgeas a subprocess, communicates via NDJSON over stdin/stdout - Bridge manages the WebSocket connection, heartbeat, reconnection, token rotation, and offline queue
- Token/auth managed by xcai-cli (
~/.xcai/config.yaml), not by OpenClaw config
CLI Commands
npx -y @superdad/xiaochuang@latest install # Install + setup (production)
npx -y @superdad/xiaochuang@latest install-test # Install + setup (test environment)
npx -y @superdad/xiaochuang@latest status # Check connection status
npx -y @superdad/xiaochuang@latest help # Show helpConfiguration
Most configuration is managed automatically. These optional settings can be set in openclaw.json:
| Key | Description | Default |
|-----|-------------|---------|
| channels.xiaochuang.enabled | Enable/disable the channel | true |
| channels.xiaochuang.bridgePath | Path to xcai-cli binary (auto-detected) | — |
| channels.xiaochuang.dmPolicy | DM policy: open / pairing / allowlist | open |
| channels.xiaochuang.allowFrom | Allowed sender IDs when dmPolicy is allowlist | — |
| channels.xiaochuang.blockStreaming | Enable streaming replies | true |
xcai-cli configuration (~/.xcai/config.yaml):
| Key | Description |
|-----|-------------|
| bridge_token | API token (auto-populated after activation) |
| bridge_ws_url | WebSocket server URL (set by install script) |
| api_key | OpenAPI key (auto-populated by server on connect) |
| endpoint | OpenAPI endpoint URL |
Updating
- Plugin update:
openclaw plugins update xiaochuang - xcai-cli update: Re-run
npx -y @superdad/xiaochuang@latest install(auto-detects and downloads new version)
License
MIT
