1- # openclaw-plugin- worktool
1+ # openclaw-worktool
22
33OpenClaw 的 WorkTool 渠道插件,支持:
44
55- 出站:将 OpenClaw 回复发送到微信(经 WorkTool bridge)。
66- 入站:接收 WorkTool webhook 回调并路由到小龙虾 Agent。
77
8- ## 安装
8+ ## 快速开始(推荐)
99
10- 方式 1:一键安装( Docker 用户推荐,无需 openclaw CLI)
10+ 只需 Docker 和一个 WorkTool 机器人 ID,从零到跑通:
1111
1212``` bash
13- curl -fsSL https://raw.githubusercontent.com/answerlink/openclaw-plugin-worktool/main/scripts/install-docker.sh | bash
13+ git clone https://github.com/answerlink/openclaw-worktool.git
14+ cd openclaw-worktool
15+ bash scripts/setup-docker.sh
16+ ```
17+
18+ 脚本会自动完成全部流程:
19+
20+ 1 . 交互式询问 WorkTool Robot ID(也可从 ` .env ` 读取)。
21+ 2 . 拉取 OpenClaw Docker 镜像(如本地没有)。
22+ 3 . 创建 Docker 容器(端口映射、volume 挂载全自动)。
23+ 4 . 启动 ** OpenClaw onboard** (选模型、配网关 token——OpenClaw 官方交互界面)。
24+ 5 . 复制插件源码进容器、创建 SDK 兼容层、修补版本兼容性。
25+ 6 . 写入 ` openclaw.json ` 的 plugins + channels.worktool 配置。
26+ 7 . 重启容器、验证 webhook 健康检查。
27+ 8 . 所有值回写 ` .env ` ,下次升级/重装零交互。
28+
29+ 第二次运行(升级/改配置):
30+
31+ ``` bash
32+ bash scripts/setup-docker.sh
33+ # .env 中已有 ROBOT_ID 等值,直接跑完;onboard 会问你是否要重新配模型
34+ ```
35+
36+ 也可环境变量全传,跳过交互(适合 CI):
37+
38+ ``` bash
39+ ROBOT_ID=wctestid SKIP_ONBOARD=1 bash scripts/setup-docker.sh
40+ ```
41+
42+ 可覆盖参数:
43+
44+ | 变量 | 默认值 | 说明 |
45+ | ---| ---| ---|
46+ | ` ROBOT_ID ` | (必填) | WorkTool 机器人 ID |
47+ | ` OPENCLAW_IMAGE ` | ` alpine/openclaw:2026.3.28 ` | OpenClaw Docker 镜像 |
48+ | ` CONTAINER_NAME ` | ` openclaw-gateway ` | 容器名 |
49+ | ` GATEWAY_PORT ` | ` 18789 ` | OpenClaw 网关端口 |
50+ | ` BRIDGE_BASE_URL ` | ` https://api.worktool.ymdyes.cn ` | WorkTool Bridge 地址 |
51+ | ` WEBHOOK_HOST ` | ` 0.0.0.0 ` | Webhook 监听地址 |
52+ | ` WEBHOOK_PORT ` | ` 18799 ` | Webhook 端口 |
53+ | ` WEBHOOK_PATH ` | ` /wechat/webhook ` | Webhook 路径 |
54+ | ` SKIP_ONBOARD ` | (空) | 设为 ` 1 ` 跳过 onboard |
55+ | ` ENV_FILE ` | ` ./.env ` | 配置文件路径 |
56+ | ` PLUGIN_SOURCE_DIR ` | 自动检测 | 插件源码目录 |
57+
58+ ## 其他安装方式
59+
60+ ### 方式 1:一键安装(Docker 用户,无需 openclaw CLI)
61+
62+ ``` bash
63+ curl -fsSL https://raw.githubusercontent.com/answerlink/openclaw-worktool/main/scripts/install-docker.sh | bash
1464```
1565
1666说明:
@@ -22,7 +72,7 @@ curl -fsSL https://raw.githubusercontent.com/answerlink/openclaw-plugin-worktool
2272安装指定版本:
2373
2474``` bash
25- VERSION=0.2.1 curl -fsSL https://raw.githubusercontent.com/answerlink/openclaw-plugin- worktool/main/scripts/install-docker.sh | bash
75+ VERSION=0.2.1 curl -fsSL https://raw.githubusercontent.com/answerlink/openclaw-worktool/main/scripts/install-docker.sh | bash
2676```
2777
2878如果你的 ` docker-compose.worktool.yml ` 或配置目录不在当前目录,可传参:
@@ -31,34 +81,34 @@ VERSION=0.2.1 curl -fsSL https://raw.githubusercontent.com/answerlink/openclaw-p
3181ROBOT_ID=wctestid \
3282COMPOSE_FILE=/path/to/docker-compose.worktool.yml \
3383OPENCLAW_CONFIG=/path/to/runtime/config/openclaw.json \
34- PLUGIN_HOST_DIR=/path/to/openclaw-plugin- worktool \
35- curl -fsSL https://raw.githubusercontent.com/answerlink/openclaw-plugin- worktool/main/scripts/install-docker.sh | bash
84+ PLUGIN_HOST_DIR=/path/to/openclaw-worktool \
85+ curl -fsSL https://raw.githubusercontent.com/answerlink/openclaw-worktool/main/scripts/install-docker.sh | bash
3686```
3787
38- 方式 2:一键安装(CLI 模式,需要本机有 ` openclaw ` 命令)
88+ ### 方式 2:一键安装(CLI 模式,需要本机有 ` openclaw ` 命令)
3989
4090``` bash
41- ROBOT_ID=wctestid curl -fsSL https://raw.githubusercontent.com/answerlink/openclaw-plugin- worktool/main/scripts/install.sh | bash
91+ ROBOT_ID=wctestid curl -fsSL https://raw.githubusercontent.com/answerlink/openclaw-worktool/main/scripts/install.sh | bash
4292```
4393
4494安装指定版本:
4595
4696``` bash
47- ROBOT_ID=wctestid VERSION=0.2.1 curl -fsSL https://raw.githubusercontent.com/answerlink/openclaw-plugin- worktool/main/scripts/install.sh | bash
97+ ROBOT_ID=wctestid VERSION=0.2.1 curl -fsSL https://raw.githubusercontent.com/answerlink/openclaw-worktool/main/scripts/install.sh | bash
4898```
4999
50100可选覆盖 WorkTool 地址(私有化部署):
51101
52102``` bash
53103ROBOT_ID=wctestid BRIDGE_BASE_URL=https://your-private-worktool.example.com \
54- curl -fsSL https://raw.githubusercontent.com/answerlink/openclaw-plugin- worktool/main/scripts/install.sh | bash
104+ curl -fsSL https://raw.githubusercontent.com/answerlink/openclaw-worktool/main/scripts/install.sh | bash
55105```
56106
57- 方式 3:源码一键安装(clone 后本地自测)
107+ ### 方式 3:源码一键安装(clone 后本地自测)
58108
59109``` bash
60- git clone https://github.com/answerlink/openclaw-plugin- worktool.git
61- cd openclaw-plugin- worktool
110+ git clone https://github.com/answerlink/openclaw-worktool.git
111+ cd openclaw-worktool
62112ROBOT_ID=wctestid bash scripts/install-local.sh
63113```
64114
@@ -90,16 +140,16 @@ ROBOT_ID=wctestid bash scripts/install-local-native.sh
90140- 回调地址通常是:` https://your-public-domain.example.com/wechat/webhook `
91141- 需要模型配置可用(OpenClaw provider 可调用),否则只能收消息不能出 AI 回复。
92142
93- 方式 4:源码目录安装(开发联调)
143+ ### 方式 4:源码目录安装(开发联调)
94144
95145``` bash
96- openclaw plugins install /absolute/path/openclaw-plugin- worktool
146+ openclaw plugins install /absolute/path/openclaw-worktool
97147```
98148
99- 方式 5:发布包安装(给私有部署环境)
149+ ### 方式 5:发布包安装(给私有部署环境)
100150
101151``` bash
102- cd /absolute/path/openclaw-plugin- worktool
152+ cd /absolute/path/openclaw-worktool
103153npm run release:local
104154openclaw plugins install ./dist/package
105155```
0 commit comments