openclawsetup 1.0.15 → 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 CHANGED
@@ -1,15 +1,14 @@
1
1
  # openclawsetup
2
2
 
3
- 一键安装 OpenClaw - 自动完成基础部署,无需交互。
3
+ OpenClaw 智能安装向导 - 调用官方 `openclaw onboard` 交互界面,自动选择推荐配置。
4
4
 
5
- ## 功能
5
+ ## 特点
6
6
 
7
- - 自动检测并安装 Node.js(如果未安装)
8
- - 自动安装 OpenClaw CLI
9
- - 自动创建配置文件和 workspace
10
- - 自动配置服务持久化(开机自启动)
11
- - 支持 macOS、Linux、Windows 三系统
12
- - 无需任何交互,全自动完成
7
+ - **真实体验**:调用官方 `openclaw onboard` 命令,用户看到完整的原版安装界面
8
+ - **智能自动化**:自动选择推荐配置,无需手动操作
9
+ - **可观看过程**:用户可以看到每一步的选择过程,了解发生了什么
10
+ - **手动模式**:`--manual` 参数可切换到完全手动模式
11
+ - **三系统支持**:macOS、Linux、Windows
13
12
 
14
13
  ## 快速开始
15
14
 
@@ -17,101 +16,90 @@
17
16
 
18
17
  **macOS / Linux:**
19
18
  ```bash
20
- curl -fsSL https://unpkg.com/openclawsetup/install.sh | bash
19
+ curl -fsSL https://unpkg.com/openclawsetup@latest/install.sh | bash
21
20
  ```
22
21
 
23
22
  **Windows PowerShell:**
24
23
  ```powershell
25
- irm https://unpkg.com/openclawsetup/install.ps1 | iex
24
+ irm https://unpkg.com/openclawsetup@latest/install.ps1 | iex
26
25
  ```
27
26
 
28
27
  ### 方式二:npx(需要已安装 Node.js 18+)
29
28
 
30
29
  ```bash
31
- npx openclawsetup
30
+ npx openclawsetup@latest
32
31
  ```
33
32
 
34
- 如果提示 `npx: command not found`,说明未安装 Node.js,请使用方式一。
33
+ ## 安装模式
35
34
 
36
- ## 安装选项
35
+ ### 智能模式(默认)
37
36
 
38
- ### 环境变量
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
+ ```
39
53
 
40
- | 变量 | 说明 | 默认值 |
41
- |------|------|--------|
42
- | `OPENCLAW_PORT` | Gateway 端口 | 18789 |
43
- | `GATEWAY_TOKEN` | 自定义 Token | 自动生成 |
44
- | `SKIP_DAEMON` | 跳过服务持久化 | false |
54
+ 完全交互,自己选择所有配置项。
45
55
 
46
- ### 命令行参数
56
+ ## 命令行参数
47
57
 
48
58
  | 参数 | 说明 |
49
59
  |------|------|
50
- | `--port <port>` | 指定 Gateway 端口 |
51
- | `--token <token>` | 指定 Gateway Token |
52
- | `--skip-daemon` | 跳过服务持久化配置 |
53
- | `--skip-start` | 安装后不启动服务 |
60
+ | `--manual` | 手动模式,不自动选择 |
61
+ | `--with-model` | 安装时配置模型(默认跳过) |
62
+ | `--update` | 检查并更新已安装的 OpenClaw |
63
+ | `--reinstall` | 卸载后重新安装(清除配置) |
54
64
  | `--help, -h` | 显示帮助信息 |
55
65
 
56
66
  ## 使用示例
57
67
 
58
- ### 默认安装(推荐)
68
+ ### 默认安装(智能模式)
59
69
 
60
70
  ```bash
61
71
  # macOS/Linux - 一键脚本
62
- curl -fsSL https://unpkg.com/openclawsetup/install.sh | bash
72
+ curl -fsSL https://unpkg.com/openclawsetup@latest/install.sh | bash
63
73
 
64
- # 或者 npx(需要 Node.js)
65
- npx openclawsetup
74
+ # 或者 npx
75
+ npx openclawsetup@latest
66
76
  ```
67
77
 
68
- ### 指定端口
78
+ ### 手动模式(完全交互)
69
79
 
70
80
  ```bash
71
- # macOS/Linux
72
- OPENCLAW_PORT=8080 npx openclawsetup
73
-
74
- # Windows PowerShell
75
- $env:OPENCLAW_PORT=8080; npx openclawsetup
76
-
77
- # Windows CMD
78
- set OPENCLAW_PORT=8080 && npx openclawsetup
81
+ npx openclawsetup@latest --manual
79
82
  ```
80
83
 
81
- ### 指定 Token
84
+ ### 更新或重装
82
85
 
83
86
  ```bash
84
- # macOS/Linux
85
- GATEWAY_TOKEN="my-secret-token" npx openclawsetup
86
-
87
- # Windows PowerShell
88
- $env:GATEWAY_TOKEN="my-secret-token"; npx openclawsetup
87
+ # 检查并更新
88
+ npx openclawsetup@latest --update
89
89
 
90
- # Windows CMD
91
- set GATEWAY_TOKEN=my-secret-token && npx openclawsetup
92
- ```
93
-
94
- ### 命令行参数方式
95
-
96
- ```bash
97
- npx openclawsetup --port 8080 --token my-secret-token
98
- ```
99
-
100
- ### 仅安装不启动
101
-
102
- ```bash
103
- npx openclawsetup --skip-start
90
+ # 卸载后重新安装(会清除配置)
91
+ npx openclawsetup@latest --reinstall
104
92
  ```
105
93
 
106
94
  ## 安装后
107
95
 
108
- 安装完成后,你需要配置 AI 模型才能使用:
96
+ 安装完成后,需要配置 AI 模型才能使用:
109
97
 
110
98
  ```bash
111
99
  # 配置 Claude 模型(推荐)
112
100
  npx openclawapi@latest preset-claude
113
101
 
114
- # 或配置其他模型
102
+ # 或交互式配置
115
103
  npx openclawapi@latest
116
104
  ```
117
105
 
@@ -141,51 +129,25 @@ openclaw gateway restart
141
129
  openclaw doctor
142
130
  ```
143
131
 
144
- ## 服务持久化
145
-
146
- 安装时会自动配置开机自启动:
147
-
148
- - **macOS**: launchd (`~/Library/LaunchAgents/com.openclaw.gateway.plist`)
149
- - **Linux**: systemd --user (`~/.config/systemd/user/openclaw.service`)
150
- - **Windows**: 计划任务 (OpenClaw)
151
-
152
- ### 手动管理服务
153
-
154
- **macOS:**
155
- ```bash
156
- # 启动
157
- launchctl start com.openclaw.gateway
158
-
159
- # 停止
160
- launchctl stop com.openclaw.gateway
161
-
162
- # 卸载
163
- launchctl unload ~/Library/LaunchAgents/com.openclaw.gateway.plist
164
- ```
165
-
166
- **Linux:**
167
- ```bash
168
- # 启动
169
- systemctl --user start openclaw
170
-
171
- # 停止
172
- systemctl --user stop openclaw
173
-
174
- # 查看状态
175
- systemctl --user status openclaw
176
- ```
177
-
178
- **Windows (PowerShell):**
179
- ```powershell
180
- # 启动
181
- Start-ScheduledTask -TaskName "OpenClaw"
182
-
183
- # 停止
184
- Stop-ScheduledTask -TaskName "OpenClaw"
185
-
186
- # 删除
187
- Unregister-ScheduledTask -TaskName "OpenClaw" -Confirm:$false
188
- ```
132
+ ## 工作原理
133
+
134
+ 1. 安装 `openclaw` npm 包
135
+ 2. 使用 `script` 命令(Unix)创建伪终端,运行 `openclaw onboard --install-daemon`
136
+ 3. 监听输出,识别交互提示后自动发送预设答案
137
+ 4. 用户看到完整的原版界面 + 自动选择过程
138
+
139
+ ## 自动应答规则
140
+
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 |
189
151
 
190
152
  ## 卸载
191
153