A personal AI assistant that bridges OpenCode with Weixin, Feishu, and WeCom.
The architecture is straightforward: messaging channels receive user messages, forward them to OpenCode, and send the responses back.
Three channels are supported right now:
- Weixin: Uses
@tencent-weixin/openclaw-weixinwith QR code login and long-polling - Feishu: Uses
@larksuiteoapi/node-sdkwith WebSocket push and reply-in-thread support - WeCom: Uses
@wecom/aibot-node-sdkwith WebSocket and streaming reply support
jiegeclaw manages OpenCode instances automatically. Each channel gets its own OpenCode server process, launched on demand in the selected project directory. On first use, send /cd <path> to select a project directory; this creates or resumes a session. Subsequent messages reuse the existing server and session.
Sessions are persisted to ~/.jiegeclaw/sessions.yaml. When you /cd to a directory you've used before, the previous session is resumed. The last opened directory per channel is remembered so it's automatically reconnected on the next message after a restart.
Requires Node.js >= 22 and opencode installed and available in $PATH.
npm installConfig lives at ~/.jiegeclaw/config.yaml:
channels:
- type: feishu
appId: cli_xxxxxxxxxxxxxxxx
appSecret: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- type: weixin
accountId: xxxxxxxxxxxx
token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
userId: xxxxxxxxxxxx
- type: wecom
botId: xxxxxxxxxxxx
secret: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxYou don't need to edit this file manually — just use the CLI setup commands.
# Feishu: follow the prompts to enter App ID and App Secret
npm start setup add feishu
# Weixin: scan the QR code displayed in the terminal
npm start setup add weixin
# WeCom: follow the prompts to enter Bot ID and Secret
npm start setup add wecomnpm startInstalls ~/.config/systemd/user/jiegeclaw.service, enables linger, and starts the service. You'll be prompted to confirm each step.
npm start installSend these in any messaging channel:
/cd <path>— Switch to a different project directory. Tears down the previous server and launches a new one in the target directory, resuming or creating a session. Use this first before sending any messages./help— Show available commands.
npm start setupMIT