@wechat-mini-claw/wechat-mini-claw
v0.3.2
Published
Self-hosted WeChat Mini Program channel plugin for OpenClaw
Readme
OpenClaw Plugin
First-party OpenClaw plugin for the WeChat Mini Program bridge.
Scope
- connect outward to the public relay service,
- send heartbeat,
- pull queued relay jobs,
- auto-bootstrap local plugin config for first-time installs,
- request one-time pairing codes for instance claim,
- inject text into relay-provided OpenClaw sessions,
- post final text replies back to the relay.
Current status
This package now contains the runnable MVP bridge plus the first pairing workflow for multi-instance support.
Install
openclaw plugins install @wechat-mini-claw/wechat-mini-clawInstall no longer requires pre-existing plugin config. The required relay credentials are generated by the pair command in the next step.
Pair a host instance
After install, run:
openclaw wechat-mini-claw pairThe command:
- creates or updates
~/.openclaw/openclaw.json, - fills in default
relayBaseUrl, - generates
pluginIdandpluginSecretif they do not already exist, - enables the plugin entry,
- requests a one-time pairing code from relay.
Paste that pairing code into the Mini Program bind-instance page together with:
- an instance name,
- the Mini Program access password for that instance.
If your local OpenClaw gateway is already running, restart it after pair so the new config takes effect.
Local repo workflow
When developing from this repository instead of the published npm package, you can still run:
cd openclaw_plugin
pnpm pairThis reuses the same bootstrap logic as openclaw wechat-mini-claw pair.
Release smoke test
Before publishing a new npm version, verify the cold-start path with a temporary HOME so the test does not reuse your real ~/.openclaw state:
cd /path/to/openclaw_plugin
pnpm build
npm pack
cd /path/to/openclaw
HOME=/tmp/wmc-smoke-$$ node scripts/run-node.mjs plugins install /path/to/openclaw_plugin/wechat-mini-claw-wechat-mini-claw-<version>.tgz
HOME=/tmp/wmc-smoke-$$ node scripts/run-node.mjs wechat-mini-claw pairThe temporary HOME should end up with a fresh ~/.openclaw/openclaw.json containing the generated relay credentials for wechat-mini-claw.
Session model
sessionKey remains in plugin config as the base template that identifies the target OpenClaw agent. Relay uses that base value to derive the final session key for each:
- bound instance,
- WeChat user.
