openclawsetup 1.0.8 → 1.0.10

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/install.sh CHANGED
@@ -167,7 +167,10 @@ main() {
167
167
  log_info "开始安装 OpenClaw..."
168
168
  echo ""
169
169
 
170
- npx openclawsetup@latest
170
+ # 清除 npx 缓存以确保获取最新版本
171
+ npm cache clean --force openclawsetup 2>/dev/null || true
172
+
173
+ npx --yes openclawsetup@latest
171
174
  }
172
175
 
173
176
  main "$@"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openclawsetup",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "description": "一键安装 OpenClaw - 自动完成基础部署,无需交互",
5
5
  "type": "module",
6
6
  "bin": {
@@ -2,16 +2,19 @@
2
2
 
3
3
  ## 快速开始
4
4
 
5
- ### 方式一:一键脚本(推荐)
5
+ ### 方式一:npx 直接安装(推荐)
6
6
 
7
- 自动检测并安装 Node.js,无需任何前置条件。
7
+ 已安装 Node.js 18+ 的用户,直接运行:
8
8
 
9
- **Linux (Debian/Ubuntu/CentOS 等):**
10
9
  ```bash
11
- curl -fsSL https://unpkg.com/openclawsetup/install.sh | bash
10
+ npx --yes openclawsetup@latest
12
11
  ```
13
12
 
14
- **macOS:**
13
+ ### 方式二:一键脚本
14
+
15
+ 自动检测并安装 Node.js,无需任何前置条件。
16
+
17
+ **Linux / macOS:**
15
18
  ```bash
16
19
  curl -fsSL https://unpkg.com/openclawsetup/install.sh | bash
17
20
  ```
@@ -21,24 +24,26 @@ curl -fsSL https://unpkg.com/openclawsetup/install.sh | bash
21
24
  irm https://unpkg.com/openclawsetup/install.ps1 | iex
22
25
  ```
23
26
 
24
- ### 方式二:npx(需要已安装 Node.js)
25
-
26
- ```bash
27
- npx openclawsetup
28
- ```
29
-
30
- ⚠️ 如果提示 `npx: command not found`,说明未安装 Node.js,请使用方式一。
31
-
32
27
  ### 方式三:指定端口
33
28
  ```bash
34
29
  # macOS/Linux
35
- OPENCLAW_PORT=8080 npx openclawsetup
30
+ OPENCLAW_PORT=8080 npx --yes openclawsetup@latest
36
31
 
37
32
  # Windows PowerShell
38
- $env:OPENCLAW_PORT=8080; npx openclawsetup
33
+ $env:OPENCLAW_PORT=8080; npx --yes openclawsetup@latest
39
34
 
40
35
  # Windows CMD
41
- set OPENCLAW_PORT=8080 && npx openclawsetup
36
+ set OPENCLAW_PORT=8080 && npx --yes openclawsetup@latest
37
+ ```
38
+
39
+ ### 已安装用户:更新或重装
40
+
41
+ ```bash
42
+ # 检查并更新
43
+ npx --yes openclawsetup@latest --update
44
+
45
+ # 卸载后重新安装(会清除配置)
46
+ npx --yes openclawsetup@latest --reinstall
42
47
  ```
43
48
 
44
49
  ## 安装完成后
@@ -115,18 +120,23 @@ apk add curl
115
120
  ---
116
121
 
117
122
  ### 错误:npm 安装失败
118
- **现象**:提示 "npm 安装失败"
123
+ **现象**:提示 "npm 安装失败" 或 "No matching version found"
119
124
  **解决**:
120
- 1. 检查网络连接
121
- 2. 尝试使用代理:
125
+ 1. 清除 npm 缓存后重试:
126
+ ```bash
127
+ npm cache clean --force
128
+ npx --yes openclawsetup@latest
129
+ ```
130
+ 2. 检查网络连接
131
+ 3. 尝试使用代理:
122
132
  ```bash
123
133
  npm config set proxy http://proxy:port
124
134
  ```
125
- 3. 手动安装:
135
+ 4. 手动安装:
126
136
  ```bash
127
137
  npm install -g openclaw@latest
128
138
  ```
129
- 4. Linux/macOS 可能需要 sudo:
139
+ 5. Linux/macOS 可能需要 sudo:
130
140
  ```bash
131
141
  sudo npm install -g openclaw@latest
132
142
  ```