baozang-activator 1.2.2 → 1.2.3

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 (3) hide show
  1. package/OPENCLAW.md +170 -0
  2. package/README.md +4 -1
  3. package/package.json +1 -1
package/OPENCLAW.md ADDED
@@ -0,0 +1,170 @@
1
+ # OpenClaw 使用说明(baozang-activator)
2
+
3
+ 本文档专门说明 `baozang-activator` 对 OpenClaw 的安装、配置、验证、卸载与常见问题处理。
4
+
5
+ ## 1) 快速开始(推荐)
6
+
7
+ ```bash
8
+ # 一键安装 + 配置 OpenClaw(生产环境)
9
+ npx -y baozang-activator@latest -t openclaw <你的key或卡密>
10
+ ```
11
+
12
+ 执行后会自动完成:
13
+ - 安装 OpenClaw(调用官方安装脚本)
14
+ - 配置 provider / key / model(`gpt5.4`)
15
+ - 启动网关并校验状态
16
+ - 打开浏览器(自动使用带 token 的 Dashboard 链接)
17
+ - 预装常见 skills(默认开启)
18
+
19
+ ## 2) 平台安装脚本(官方)
20
+
21
+ `baozang-activator` 内部按平台调用官方安装方式:
22
+
23
+ ### macOS / Linux
24
+ ```bash
25
+ curl -fsSL https://openclaw.ai/install.sh | bash
26
+ ```
27
+
28
+ ### Windows CMD
29
+ ```cmd
30
+ curl -fsSL https://openclaw.ai/install.cmd -o install.cmd && install.cmd && del install.cmd
31
+ ```
32
+
33
+ ### Windows PowerShell
34
+ ```powershell
35
+ iwr -useb https://openclaw.ai/install.ps1 | iex
36
+ ```
37
+
38
+ ## 3) 配置写入规则(重点)
39
+
40
+ 默认接入参数:
41
+ - provider: `https://www.baozangaizhongzhuan.net/`
42
+ - OpenAI 兼容 endpoint: `https://www.baozangaizhongzhuan.net/v1`
43
+ - model: `gpt5.4`
44
+
45
+ 配置时会通过 `openclaw config set` 修改 OpenClaw 配置,关键字段:
46
+ - `models.providers.baozang`
47
+ - `agents.defaults.model.primary = "baozang/gpt5.4"`
48
+ - `gateway.mode = "local"`
49
+
50
+ 配置完成后执行:
51
+ - `openclaw config validate --json`
52
+ - `openclaw gateway start`(必要时安装/重启网关服务)
53
+
54
+ 查看当前配置文件路径:
55
+
56
+ ```bash
57
+ openclaw config file
58
+ ```
59
+
60
+ ## 4) Dashboard token 与浏览器跳转
61
+
62
+ 新版本会优先执行:
63
+
64
+ ```bash
65
+ openclaw dashboard --no-open
66
+ ```
67
+
68
+ 并从输出中提取带 `#token=...` 的 URL 去打开浏览器,避免出现:
69
+
70
+ `unauthorized: gateway token missing`
71
+
72
+ 如果你手动打开浏览器,建议使用:
73
+
74
+ ```bash
75
+ openclaw dashboard
76
+ ```
77
+
78
+
79
+
80
+ ```bash
81
+ openclaw dashboard --no-open
82
+ ```
83
+
84
+ 复制输出的完整 URL(带 `#token=`)访问。
85
+
86
+ ## 5) 预装 skills(默认)
87
+
88
+ 默认会预装:
89
+ - `xiaohongshu`
90
+ - `zhihu`
91
+ - `wechat-official`
92
+ - `douyin-script`
93
+
94
+ 如需跳过预装:
95
+
96
+ ```bash
97
+ npx -y baozang-activator@latest -t openclaw <key> --openclaw-skip-skills
98
+ ```
99
+
100
+ ## 6) 干净卸载(含 CLI 命令)
101
+
102
+ ### 交互式(会询问)
103
+ ```bash
104
+ npx -y baozang-activator@latest --openclaw-uninstall
105
+ ```
106
+
107
+ ### 非交互一条命令
108
+ ```bash
109
+ npx -y baozang-activator@latest --openclaw-uninstall -y --openclaw-remove-workspace --openclaw-remove-config --openclaw-remove-cli
110
+ ```
111
+
112
+ 说明:
113
+ - `--openclaw-remove-workspace`:删除工作区
114
+ - `--openclaw-remove-config`:删除配置/状态
115
+ - `--openclaw-remove-cli`:删除全局 `openclaw` 命令
116
+
117
+ 卸载后会自动校验:
118
+ - 若要求删除 CLI,则校验 `openclaw` 命令已不存在
119
+ - 否则校验网关已停止
120
+
121
+ ## 7) 常见问题
122
+
123
+ ### Q1: `baozang-activator:未找到命令`
124
+ 你执行了 `npm install baozang-activator-test@x.y.z`(本地安装),不会创建全局命令。
125
+ 请改用:
126
+
127
+ ```bash
128
+ npx -y baozang-activator@latest --help
129
+ ```
130
+
131
+ 或全局安装:
132
+
133
+ ```bash
134
+ npm i -g baozang-activator@latest
135
+ baozang-activator --help
136
+ ```
137
+
138
+ ### Q2: 卸载后为什么 `openclaw` 还能用?
139
+ 通常是机器上有多个安装来源(如 npm / pnpm / yarn / 其他路径)。先定位:
140
+
141
+ ```bash
142
+ which -a openclaw
143
+ ```
144
+
145
+ Windows:
146
+
147
+ ```powershell
148
+ where openclaw
149
+ ```
150
+
151
+ 逐个路径清理后再验证。
152
+
153
+ ### Q3: 安装后提示 PATH 缺失
154
+ 如果提示 npm 全局 bin 不在 PATH,重开终端后仍不生效时,请把对应路径加入 shell 配置(如 `~/.bashrc` / `~/.zshrc`),再 `source` 生效。
155
+
156
+ ## 8) 验证清单
157
+
158
+ 安装后建议至少执行一次:
159
+
160
+ ```bash
161
+ openclaw --version
162
+ openclaw gateway status
163
+ openclaw dashboard --no-open
164
+ ```
165
+
166
+ 卸载后建议验证:
167
+
168
+ ```bash
169
+ command -v openclaw || echo "openclaw removed"
170
+ ```
package/README.md CHANGED
@@ -35,7 +35,7 @@ npm i -g baozang-activator@latest
35
35
  ```bash
36
36
  baozang-activator -v
37
37
  ```
38
- 应显示:`1.2.1`(或更高)
38
+ 应显示:`1.2.3`(或更高)
39
39
 
40
40
  ### 3) 重新执行激活(会刷新本地 auth.json)
41
41
  ```bash
@@ -230,6 +230,9 @@ npx baozang-activator --openclaw-uninstall --openclaw-remove-workspace --opencla
230
230
 
231
231
  卸载完成后会自动校验网关状态,并打开浏览器到卸载说明页面。
232
232
 
233
+ OpenClaw 详细说明与常见问题:
234
+ - `./OPENCLAW.md`
235
+
233
236
  ## 命令行选项
234
237
 
235
238
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "baozang-activator",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
4
4
  "description": "API 激活工具 (生产环境 - baozangaizhongzhuan.net)",
5
5
  "main": "lib/index.js",
6
6
  "bin": {