openclaw-service 0.5.0 → 0.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/README.zh-CN.md +40 -172
  2. package/dist/index.js +1737 -151
  3. package/dist/index.pkg.cjs +7385 -0
  4. package/package.json +1 -1
  5. package/README.aiclaw.md +0 -25
  6. package/README.aliclaw.md +0 -25
  7. package/README.alpha-claw.md +0 -25
  8. package/README.alphaclaw.md +0 -25
  9. package/README.amazonclaw.md +0 -25
  10. package/README.amzclaw.md +0 -25
  11. package/README.anthropicclaw.md +0 -25
  12. package/README.appleclaw.md +0 -25
  13. package/README.autoopenclaw.md +0 -25
  14. package/README.awsclaw.md +0 -25
  15. package/README.bdclaw.md +0 -25
  16. package/README.blclaw.md +0 -25
  17. package/README.bytclaw.md +0 -25
  18. package/README.claw-open.md +0 -25
  19. package/README.clawjs.md +0 -25
  20. package/README.coclaw.md +0 -25
  21. package/README.copaw.md +0 -25
  22. package/README.ddclaw.md +0 -25
  23. package/README.duclaw.md +0 -25
  24. package/README.dyclaw.md +0 -25
  25. package/README.easyclaw.md +0 -25
  26. package/README.fastclaw.md +0 -25
  27. package/README.fbclaw.md +0 -25
  28. package/README.googleclaw.md +0 -25
  29. package/README.hello-claw.md +0 -25
  30. package/README.hwclaw.md +0 -25
  31. package/README.jdclaw.md +0 -25
  32. package/README.kimiclaw.md +0 -25
  33. package/README.ksclaw.md +0 -25
  34. package/README.maxclaw.md +0 -25
  35. package/README.md.bak +0 -75
  36. package/README.megaclaw.md +0 -25
  37. package/README.metaclaw.md +0 -25
  38. package/README.miclaw.md +0 -25
  39. package/README.msclaw.md +0 -25
  40. package/README.mtclaw.md +0 -25
  41. package/README.nflxclaw.md +0 -25
  42. package/README.nvdaclaw.md +0 -25
  43. package/README.open-claw.md +0 -25
  44. package/README.openaiclaw.md +0 -25
  45. package/README.openclaw-cli.md +0 -25
  46. package/README.openclaw-daemon.md +0 -25
  47. package/README.openclaw-gateway.md +0 -25
  48. package/README.openclaw-health.md +0 -25
  49. package/README.openclaw-helper.md +0 -25
  50. package/README.openclaw-install.md +0 -25
  51. package/README.openclaw-manage.md +0 -25
  52. package/README.openclaw-monitor.md +0 -25
  53. package/README.openclaw-run.md +0 -25
  54. package/README.openclaw-service.md +0 -25
  55. package/README.openclaw-setup.md +0 -25
  56. package/README.openclaw-start.md +0 -25
  57. package/README.openclaw-tools.md +0 -25
  58. package/README.openclaw-upgrade.md +0 -25
  59. package/README.openclaw-utils.md +0 -25
  60. package/README.openclaw-watch.md +0 -25
  61. package/README.pddclaw.md +0 -25
  62. package/README.qclaw-cli.md +0 -25
  63. package/README.qclaw.md +0 -25
  64. package/README.smartclaw.md +0 -25
  65. package/README.ttclaw.md +0 -25
  66. package/README.txclaw.md +0 -25
  67. package/README.uberclaw.md +0 -25
  68. package/README.volclaw.md +0 -25
  69. package/README.wxclaw.md +0 -25
  70. package/README.xclaw.md +0 -25
  71. package/README.zhclaw.md +0 -25
  72. package/dist/chunk-XSRH4RHR.js +0 -1152
  73. package/dist/server-3JMOADVR.js +0 -7
package/README.zh-CN.md CHANGED
@@ -1,212 +1,80 @@
1
1
  <p align="center">
2
- <img src="https://raw.githubusercontent.com/Sobranier/openclaw-cli/main/assets/welcome.png" alt="OpenClaw Doctor" width="400" />
2
+ <img src="https://raw.githubusercontent.com/Sobranier/openclaw-cli/main/assets/hero.png" alt="OpenClaw CLI" width="700" />
3
3
  </p>
4
4
 
5
- <h1 align="center">OpenClaw Doctor</h1>
5
+ <h1 align="center">OpenClaw CLI</h1>
6
6
 
7
7
  <p align="center">
8
8
  让你的 OpenClaw 服务永不宕机。
9
9
  </p>
10
10
 
11
11
  <p align="center">
12
- <a href="./README.md">English</a>
12
+ <a href="./README.md">EN</a> | <a href="https://openclaw-cli.app">openclaw-cli.app</a>
13
13
  </p>
14
14
 
15
- ## 开始使用
15
+ <p align="center">
16
+ <a href="https://www.npmjs.com/package/openclaw-cli"><img src="https://img.shields.io/npm/v/openclaw-cli?label=openclaw-cli&color=blue" alt="openclaw-cli" /></a>
17
+ &nbsp;
18
+ <a href="https://www.npmjs.com/package/openclaw-cli"><img src="https://img.shields.io/npm/dm/openclaw-cli?color=blue" alt="downloads" /></a>
19
+ &nbsp;
20
+ <a href="./LICENSE"><img src="https://img.shields.io/badge/license-MIT-brightgreen" alt="license" /></a>
21
+ &nbsp;
22
+ <img src="https://img.shields.io/node/v/openclaw-cli" alt="node" />
23
+ </p>
16
24
 
17
- ```bash
18
- npm install -g openclaw-doctor
19
- openclaw-doctor watch -d
20
- ```
25
+ ---
21
26
 
22
- 就这样。Doctor 在后台监控你的 OpenClaw 网关,挂了自动重启,全程通知你。无需任何配置——它会自动读取你现有的 OpenClaw 设置。
27
+ ## 为什么需要它?
23
28
 
24
- ## 核心命令
29
+ OpenClaw 以本地守护进程的方式运行。网络抖动、系统唤醒、意外更新——任何一个都可能让它悄悄挂掉,而你只有在用 AI 助手的时候才会发现。
25
30
 
26
- ```bash
27
- openclaw-doctor watch # 开始监控(前台)
28
- openclaw-doctor watch -d # 开始监控(后台)
29
- openclaw-doctor unwatch # 停止监控
31
+ OpenClaw CLI 替你盯着网关。检测到故障,自动重启,全程通知。零配置,不用盯。
30
32
 
31
- openclaw-doctor status # 快速健康检查
32
- ```
33
-
34
- 这四个命令覆盖日常 90% 的使用场景。
35
-
36
- ## 网关管理
33
+ ## 开始使用
37
34
 
38
35
  ```bash
39
- openclaw-doctor gateway start # 启动 OpenClaw 网关
40
- openclaw-doctor gateway stop # 停止网关
41
- openclaw-doctor gateway restart # 重启网关
36
+ npm install -g openclaw-cli
37
+ openclaw-cli watch -d
42
38
  ```
43
39
 
44
- ## 诊断和日志
45
-
46
- ```bash
47
- openclaw-doctor doctor # 完整诊断(二进制、网关、通道)
48
- openclaw-doctor logs # 查看网关日志
49
- openclaw-doctor logs --error # 只看错误日志
50
- openclaw-doctor logs --doctor # 查看 Doctor 自身事件日志
51
- openclaw-doctor dashboard # Web 管理面板(http://localhost:9090)
52
- ```
40
+ 就这样。OpenClaw CLI 现在在后台运行了。
53
41
 
54
- ## 安装
42
+ ## 核心命令
55
43
 
56
44
  ```bash
57
- # npm(推荐)
58
- npm install -g openclaw-doctor
59
-
60
- # 或免安装直接跑
61
- npx openclaw-doctor status
62
- ```
45
+ openclaw-cli watch # 开始监控(前台)
46
+ openclaw-cli watch -d # 开始监控(后台)
47
+ openclaw-cli unwatch # 停止监控
63
48
 
64
- 需要 Node >= 22(和 OpenClaw 一致)。
65
-
66
- ## 工作原理
67
-
68
- Doctor 自动探测你的 OpenClaw 安装:
69
-
70
- - 读取 `~/.openclaw/openclaw.json` 获取网关端口、通道、Agent 信息
71
- - 扫描 `~/Library/LaunchAgents/` 找到 launchd 服务
72
- - 通过 `openclaw health --json` 检查健康(真正的网关 RPC,不是 HTTP 探测)
73
- - 需要时通过 `launchctl kickstart` 重启
74
-
75
- **你不需要配置 OpenClaw 的任何信息。** Doctor 会自动搞定。
76
-
77
- ## 完整命令
78
-
79
- | 命令 | 说明 |
80
- |------|------|
81
- | **监控** | |
82
- | `watch` | 开始健康监控(前台) |
83
- | `watch -d` | 开始健康监控(后台) |
84
- | `watch -d --dashboard` | 后台监控 + Web 面板 |
85
- | `unwatch` | 停止监控 |
86
- | **网关** | |
87
- | `gateway start` | 启动 OpenClaw 网关 |
88
- | `gateway stop` | 停止网关 |
89
- | `gateway restart` | 重启网关 |
90
- | **信息** | |
91
- | `status` | 显示网关和通道健康状态 |
92
- | `status --json` | 机器可读的 JSON 输出 |
93
- | `doctor` | 运行完整诊断 |
94
- | `dashboard` | 启动 Web 管理面板 |
95
- | `logs` | 查看网关日志 |
96
- | `logs --error` | 只看错误日志 |
97
- | `logs --doctor` | 查看 Doctor 事件日志 |
98
-
99
- ## 配置
100
-
101
- 配置文件位于 `~/.openclaw-doctor/config.json`,首次运行时自动创建。只包含 Doctor 自身的偏好——无需配置 OpenClaw 的信息。
102
-
103
- ```json
104
- {
105
- "checkInterval": 30,
106
- "failThreshold": 3,
107
- "dashboardPort": 9090,
108
- "maxRestartsPerHour": 5,
109
- "openclawProfile": "default",
110
- "notify": {
111
- "webhook": {
112
- "enabled": false,
113
- "url": "",
114
- "bodyTemplate": "{\"msgtype\":\"text\",\"text\":{\"content\":\"{{message}}\"}}"
115
- },
116
- "system": {
117
- "enabled": true
118
- }
119
- }
120
- }
49
+ openclaw-cli status # 快速健康检查
50
+ openclaw-cli doctor # 完整诊断
121
51
  ```
122
52
 
123
- | 字段 | 说明 | 默认值 |
124
- |------|------|--------|
125
- | `checkInterval` | 健康检查间隔(秒) | `30` |
126
- | `failThreshold` | 连续失败几次后重启 | `3` |
127
- | `dashboardPort` | Web 面板端口 | `9090` |
128
- | `maxRestartsPerHour` | 每小时最多重启次数 | `5` |
129
- | `openclawProfile` | 监控的 OpenClaw 配置(`default`、`dev`...) | `default` |
130
- | `notify.webhook.url` | Webhook 通知地址 | -- |
131
- | `notify.system.enabled` | macOS 系统通知 | `true` |
132
-
133
- ## 通知系统
134
-
135
- Doctor 在整个生命周期都会通知你:
136
-
137
- | 事件 | 示例消息 |
138
- |------|----------|
139
- | 开始监控 | "Doctor 正在守护你的 OpenClaw 服务" |
140
- | 状态异常 | "服务异常(第 2/3 次检测)" |
141
- | 准备重启 | "正在重启网关..." |
142
- | 重启成功 | "网关已恢复上线" |
143
- | 重启失败 | "重启失败:[错误详情]" |
144
- | 重启受限 | "重启次数过多,需要人工介入" |
145
- | 自行恢复 | "服务自行恢复,无需重启" |
146
- | 停止监控 | "Doctor 已停止" |
147
-
148
- 支持渠道:**Webhook**(钉钉、飞书、Slack、企业微信等)+ **macOS 系统通知**。
149
-
150
- ## Skills 集成
151
-
152
- Doctor 作为独立守护进程运行,可被 OpenClaw 或其他工具调用:
53
+ ## 网关管理
153
54
 
154
55
  ```bash
155
- openclaw-doctor status --json # 机器可读输出
156
- openclaw-doctor watch -d # 幂等——重复调用安全
56
+ openclaw-cli gateway start
57
+ openclaw-cli gateway stop
58
+ openclaw-cli gateway restart
157
59
  ```
158
60
 
159
- 即使调用方崩溃,Doctor 继续运行。
61
+ ## 监控面板
160
62
 
161
- ## 架构
162
-
163
- ```
164
- +-----------------+
165
- | 通知系统 |
166
- | (Webhook/OS) |
167
- +--------^--------+
168
- |
169
- +-------------+ CLI +--------+--------+ RPC +-----------+
170
- | OpenClaw | --------> | | ---------> | OpenClaw |
171
- | / 脚本 | | openclaw-doctor | | 网关 |
172
- | / Skills | <-------- | (守护进程) | <--------- | :18789 |
173
- +-------------+ stdout +--------+--------+ health +-----------+
174
- |
175
- +--------v--------+
176
- | ~/.openclaw/logs |
177
- | (读取并分析) |
178
- +-----------------+
63
+ ```bash
64
+ openclaw-cli monitor # 启动 Web 面板(http://localhost:9090)
179
65
  ```
180
66
 
181
- ## 开发
67
+ ## 兼容别名
182
68
 
183
- ```bash
184
- git clone https://github.com/Sobranier/openclaw-cli.git
185
- cd openclaw-doctor
186
- npm install
69
+ `openclaw-doctor`、`hello-claw`、`aiclaw`、`pddclaw` 等别名包全部指向同一个 CLI 引擎。
187
70
 
188
- npm run dev -- status # 快速测试
189
- npm run dev -- watch # 前台监控
190
- npm run dev -- watch -d # 后台守护
191
- npm run dev -- unwatch # 停止守护
71
+ - 主包:https://www.npmjs.com/package/openclaw-cli
72
+ - 项目地址:https://github.com/Sobranier/openclaw-cli
192
73
 
193
- npm run build # 构建发布版本
194
- ```
74
+ ## 更多文档
195
75
 
196
- ## 路线图
197
-
198
- - [x] 通过 `openclaw health --json` 检查健康 + 自动重启(含频率限制)
199
- - [x] 自动探测 OpenClaw 配置(网关端口、通道、Agent、launchd)
200
- - [x] 后台守护模式(`watch -d` / `unwatch`)
201
- - [x] 网关管理(`gateway start/stop/restart`)
202
- - [x] 读取并展示 OpenClaw 网关日志
203
- - [x] Web 状态面板
204
- - [x] `status --json` 输出
205
- - [ ] 通知系统(Webhook + macOS)
206
- - [ ] `logs --tail`(实时跟踪)
207
- - [ ] `config` 命令(get/set)
208
- - [ ] 多服务监控
209
- - [ ] Linux systemd 支持
76
+ - 开发和发布流程:[CONTRIBUTING.md](./CONTRIBUTING.md)
77
+ - English README:[README.md](./README.md)
210
78
 
211
79
  ## 协议
212
80