openclawsetup 1.0.16 → 2.0.0
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.
- package/README.md +58 -108
- package/bin/cli.mjs +275 -860
- package/package.json +2 -2
- package//344/275/277/347/224/250/350/257/264/346/230/216.md +52 -156
package/README.md
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
# openclawsetup
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
OpenClaw 智能安装向导 - 调用官方 `openclaw onboard` 交互界面,自动选择推荐配置。
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## 特点
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
- 安装/更新/卸载重装显示进度与预计剩余时间(基于网络测速,可能有误差)
|
|
13
|
-
- 云服务器自动检测公网 IP 并输出访问指引
|
|
14
|
-
- 无需任何交互,全自动完成
|
|
7
|
+
- **真实体验**:调用官方 `openclaw onboard` 命令,用户看到完整的原版安装界面
|
|
8
|
+
- **智能自动化**:自动选择推荐配置,无需手动操作
|
|
9
|
+
- **可观看过程**:用户可以看到每一步的选择过程,了解发生了什么
|
|
10
|
+
- **手动模式**:`--manual` 参数可切换到完全手动模式
|
|
11
|
+
- **三系统支持**:macOS、Linux、Windows
|
|
15
12
|
|
|
16
13
|
## 快速开始
|
|
17
14
|
|
|
@@ -30,100 +27,79 @@ irm https://unpkg.com/openclawsetup@latest/install.ps1 | iex
|
|
|
30
27
|
### 方式二:npx(需要已安装 Node.js 18+)
|
|
31
28
|
|
|
32
29
|
```bash
|
|
33
|
-
npx
|
|
30
|
+
npx openclawsetup@latest
|
|
34
31
|
```
|
|
35
32
|
|
|
36
|
-
|
|
33
|
+
## 安装模式
|
|
37
34
|
|
|
38
|
-
|
|
35
|
+
### 智能模式(默认)
|
|
39
36
|
|
|
40
|
-
|
|
37
|
+
```bash
|
|
38
|
+
npx openclawsetup@latest
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
自动完成以下选择:
|
|
42
|
+
- ✓ 选择 QuickStart 模式
|
|
43
|
+
- ✓ 跳过模型配置(后续用 `npx openclawapi` 配置)
|
|
44
|
+
- ✓ 跳过渠道配置(后续用 `npx openclawdc/openclawfs` 配置)
|
|
45
|
+
- ✓ 安装后台服务(开机自启)
|
|
46
|
+
- ✓ 选择 Web Dashboard
|
|
47
|
+
|
|
48
|
+
### 手动模式
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
npx openclawsetup@latest --manual
|
|
52
|
+
```
|
|
41
53
|
|
|
42
|
-
|
|
43
|
-
|------|------|--------|
|
|
44
|
-
| `OPENCLAW_PORT` | Gateway 端口 | 18789 |
|
|
45
|
-
| `GATEWAY_TOKEN` | 自定义 Token | 自动生成 |
|
|
46
|
-
| `SKIP_DAEMON` | 跳过服务持久化 | false |
|
|
54
|
+
完全交互,自己选择所有配置项。
|
|
47
55
|
|
|
48
|
-
|
|
56
|
+
## 命令行参数
|
|
49
57
|
|
|
50
58
|
| 参数 | 说明 |
|
|
51
59
|
|------|------|
|
|
52
|
-
| `--
|
|
53
|
-
| `--
|
|
54
|
-
| `--
|
|
55
|
-
| `--
|
|
60
|
+
| `--manual` | 手动模式,不自动选择 |
|
|
61
|
+
| `--with-model` | 安装时配置模型(默认跳过) |
|
|
62
|
+
| `--update` | 检查并更新已安装的 OpenClaw |
|
|
63
|
+
| `--reinstall` | 卸载后重新安装(清除配置) |
|
|
56
64
|
| `--help, -h` | 显示帮助信息 |
|
|
57
65
|
|
|
58
66
|
## 使用示例
|
|
59
67
|
|
|
60
|
-
###
|
|
68
|
+
### 默认安装(智能模式)
|
|
61
69
|
|
|
62
70
|
```bash
|
|
63
71
|
# macOS/Linux - 一键脚本
|
|
64
72
|
curl -fsSL https://unpkg.com/openclawsetup@latest/install.sh | bash
|
|
65
73
|
|
|
66
|
-
# 或者 npx
|
|
67
|
-
npx
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
### 指定端口
|
|
71
|
-
|
|
72
|
-
```bash
|
|
73
|
-
# macOS/Linux
|
|
74
|
-
OPENCLAW_PORT=8080 npx --yes openclawsetup@latest
|
|
75
|
-
|
|
76
|
-
# Windows PowerShell
|
|
77
|
-
$env:OPENCLAW_PORT=8080; npx --yes openclawsetup@latest
|
|
78
|
-
|
|
79
|
-
# Windows CMD
|
|
80
|
-
set OPENCLAW_PORT=8080 && npx --yes openclawsetup@latest
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
### 指定 Token
|
|
84
|
-
|
|
85
|
-
```bash
|
|
86
|
-
# macOS/Linux
|
|
87
|
-
GATEWAY_TOKEN="my-secret-token" npx --yes openclawsetup@latest
|
|
88
|
-
|
|
89
|
-
# Windows PowerShell
|
|
90
|
-
$env:GATEWAY_TOKEN="my-secret-token"; npx --yes openclawsetup@latest
|
|
91
|
-
|
|
92
|
-
# Windows CMD
|
|
93
|
-
set GATEWAY_TOKEN=my-secret-token && npx --yes openclawsetup@latest
|
|
74
|
+
# 或者 npx
|
|
75
|
+
npx openclawsetup@latest
|
|
94
76
|
```
|
|
95
77
|
|
|
96
|
-
###
|
|
78
|
+
### 手动模式(完全交互)
|
|
97
79
|
|
|
98
80
|
```bash
|
|
99
|
-
npx
|
|
81
|
+
npx openclawsetup@latest --manual
|
|
100
82
|
```
|
|
101
83
|
|
|
102
|
-
###
|
|
103
|
-
|
|
104
|
-
```bash
|
|
105
|
-
npx --yes openclawsetup@latest --skip-start
|
|
106
|
-
|
|
107
|
-
### 已安装用户:更新或重装
|
|
84
|
+
### 更新或重装
|
|
108
85
|
|
|
109
86
|
```bash
|
|
110
87
|
# 检查并更新
|
|
111
|
-
npx
|
|
88
|
+
npx openclawsetup@latest --update
|
|
112
89
|
|
|
113
90
|
# 卸载后重新安装(会清除配置)
|
|
114
|
-
npx
|
|
115
|
-
```
|
|
91
|
+
npx openclawsetup@latest --reinstall
|
|
116
92
|
```
|
|
117
93
|
|
|
118
94
|
## 安装后
|
|
119
95
|
|
|
120
|
-
|
|
96
|
+
安装完成后,需要配置 AI 模型才能使用:
|
|
121
97
|
|
|
122
98
|
```bash
|
|
123
99
|
# 配置 Claude 模型(推荐)
|
|
124
100
|
npx openclawapi@latest preset-claude
|
|
125
101
|
|
|
126
|
-
#
|
|
102
|
+
# 或交互式配置
|
|
127
103
|
npx openclawapi@latest
|
|
128
104
|
```
|
|
129
105
|
|
|
@@ -153,51 +129,25 @@ openclaw gateway restart
|
|
|
153
129
|
openclaw doctor
|
|
154
130
|
```
|
|
155
131
|
|
|
156
|
-
##
|
|
157
|
-
|
|
158
|
-
安装时会自动配置开机自启动:
|
|
159
|
-
|
|
160
|
-
- **macOS**: launchd (`~/Library/LaunchAgents/com.openclaw.gateway.plist`)
|
|
161
|
-
- **Linux**: systemd --user (`~/.config/systemd/user/openclaw.service`)
|
|
162
|
-
- **Windows**: 计划任务 (OpenClaw)
|
|
132
|
+
## 工作原理
|
|
163
133
|
|
|
164
|
-
|
|
134
|
+
1. 安装 `openclaw` npm 包
|
|
135
|
+
2. 使用 `script` 命令(Unix)创建伪终端,运行 `openclaw onboard --install-daemon`
|
|
136
|
+
3. 监听输出,识别交互提示后自动发送预设答案
|
|
137
|
+
4. 用户看到完整的原版界面 + 自动选择过程
|
|
165
138
|
|
|
166
|
-
|
|
167
|
-
```bash
|
|
168
|
-
# 启动
|
|
169
|
-
launchctl start com.openclaw.gateway
|
|
170
|
-
|
|
171
|
-
# 停止
|
|
172
|
-
launchctl stop com.openclaw.gateway
|
|
139
|
+
## 自动应答规则
|
|
173
140
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
systemctl --user stop openclaw
|
|
185
|
-
|
|
186
|
-
# 查看状态
|
|
187
|
-
systemctl --user status openclaw
|
|
188
|
-
```
|
|
189
|
-
|
|
190
|
-
**Windows (PowerShell):**
|
|
191
|
-
```powershell
|
|
192
|
-
# 启动
|
|
193
|
-
Start-ScheduledTask -TaskName "OpenClaw"
|
|
194
|
-
|
|
195
|
-
# 停止
|
|
196
|
-
Stop-ScheduledTask -TaskName "OpenClaw"
|
|
197
|
-
|
|
198
|
-
# 删除
|
|
199
|
-
Unregister-ScheduledTask -TaskName "OpenClaw" -Confirm:$false
|
|
200
|
-
```
|
|
141
|
+
| 提示类型 | 自动选择 |
|
|
142
|
+
|---------|---------|
|
|
143
|
+
| 安全确认 | 同意 (y) |
|
|
144
|
+
| Setup 模式 | QuickStart |
|
|
145
|
+
| Model Provider | 跳过 (s) |
|
|
146
|
+
| API Key | 跳过 |
|
|
147
|
+
| Channel 配置 | 跳过 (s) |
|
|
148
|
+
| Skills | 跳过 (s) |
|
|
149
|
+
| Daemon/Service | 安装 (y) |
|
|
150
|
+
| UI 选择 | Web Dashboard |
|
|
201
151
|
|
|
202
152
|
## 卸载
|
|
203
153
|
|