openclawsetup 2.0.2 → 2.0.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.
package/README.md CHANGED
@@ -41,7 +41,7 @@ npx openclawsetup@latest
41
41
  自动完成以下选择:
42
42
  - ✓ 选择 QuickStart 模式
43
43
  - ✓ 跳过模型配置(后续用 `npx openclawapi` 配置)
44
- - ✓ 跳过渠道配置(后续用 `npx openclawdc/openclawfs` 配置)
44
+ - ✓ 跳过渠道配置(后续用 `npx openclawdc` 或 `npx openclaw-chat-cn@latest feishu` 配置)
45
45
  - ✓ 安装后台服务(开机自启)
46
46
  - ✓ 选择 Web Dashboard
47
47
 
@@ -110,7 +110,7 @@ npx openclawapi@latest
110
110
  npx openclawdc
111
111
 
112
112
  # 飞书
113
- npx openclawfs
113
+ npx openclaw-chat-cn@latest feishu
114
114
  ```
115
115
 
116
116
  ## 常用命令
package/bin/cli.mjs CHANGED
@@ -147,7 +147,7 @@ ${colors.cyan('选项:')}
147
147
  ${colors.cyan('智能安装会自动:')}
148
148
  ✓ 选择 QuickStart 模式
149
149
  ✓ 跳过模型配置(后续用 npx openclawapi 配置)
150
- ✓ 跳过渠道配置(后续用 npx openclawdc/openclawfs 配置)
150
+ ✓ 跳过渠道配置(后续用 npx openclawdc 或 npx openclaw-chat-cn@latest feishu 配置)
151
151
  ✓ 安装后台服务(开机自启)
152
152
  ✓ 选择 Web Dashboard
153
153
 
@@ -271,24 +271,37 @@ async function runOnboardWithAutoResponse(cliName, options) {
271
271
  const os = platform();
272
272
  let child;
273
273
 
274
+ // 设置终端尺寸环境变量
275
+ const termEnv = {
276
+ ...process.env,
277
+ FORCE_COLOR: '1',
278
+ TERM: 'xterm-256color',
279
+ COLUMNS: process.stdout.columns?.toString() || '120',
280
+ LINES: process.stdout.rows?.toString() || '40',
281
+ };
282
+
274
283
  if (os === 'win32') {
275
284
  // Windows: 直接 spawn,可能没有完整的交互体验
276
285
  child = spawn(cliName, ['onboard', '--install-daemon'], {
277
286
  stdio: options.manual ? 'inherit' : ['pipe', 'pipe', 'pipe'],
278
287
  shell: true,
279
- env: { ...process.env, FORCE_COLOR: '1', TERM: 'xterm-256color' },
288
+ env: termEnv,
280
289
  });
281
290
  } else if (os === 'darwin') {
282
291
  // macOS: script -q /dev/null command args...
283
292
  child = spawn('script', ['-q', '/dev/null', cliName, 'onboard', '--install-daemon'], {
284
293
  stdio: options.manual ? 'inherit' : ['pipe', 'pipe', 'pipe'],
285
- env: { ...process.env, FORCE_COLOR: '1', TERM: 'xterm-256color' },
294
+ env: termEnv,
286
295
  });
287
296
  } else {
288
297
  // Linux: script -q -c "command args..." /dev/null
289
- child = spawn('script', ['-q', '-c', `${cliName} onboard --install-daemon`, '/dev/null'], {
298
+ // 使用 stty 设置终端尺寸
299
+ const cols = process.stdout.columns || 120;
300
+ const rows = process.stdout.rows || 40;
301
+ const cmd = `stty cols ${cols} rows ${rows} 2>/dev/null; ${cliName} onboard --install-daemon`;
302
+ child = spawn('script', ['-q', '-c', cmd, '/dev/null'], {
290
303
  stdio: options.manual ? 'inherit' : ['pipe', 'pipe', 'pipe'],
291
- env: { ...process.env, FORCE_COLOR: '1', TERM: 'xterm-256color' },
304
+ env: termEnv,
292
305
  });
293
306
  }
294
307
 
@@ -429,7 +442,7 @@ function showCompletionInfo(cliName) {
429
442
 
430
443
  console.log(colors.cyan('\n配置聊天渠道:'));
431
444
  console.log(` Discord: ${colors.yellow('npx openclawdc')}`);
432
- console.log(` 飞书: ${colors.yellow('npx openclawfs')}`);
445
+ console.log(` 飞书: ${colors.yellow('npx openclaw-chat-cn@latest feishu')}`);
433
446
 
434
447
  console.log('');
435
448
  }
package/install.sh CHANGED
@@ -371,7 +371,7 @@ show_installed_info() {
371
371
 
372
372
  echo -e "${CYAN}\n配置聊天渠道:${NC}"
373
373
  echo " Discord: npx openclawdc"
374
- echo " 飞书: npx openclawfs"
374
+ echo " 飞书: npx openclaw-chat-cn@latest feishu"
375
375
  }
376
376
 
377
377
  # 显示菜单并获取选择
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openclawsetup",
3
- "version": "2.0.2",
3
+ "version": "2.0.3",
4
4
  "description": "OpenClaw 智能安装向导 - 调用官方交互界面,自动选择推荐配置",
5
5
  "type": "module",
6
6
  "bin": {
@@ -51,7 +51,7 @@ irm https://unpkg.com/openclawsetup@latest/install.ps1 | iex
51
51
 
52
52
  **为什么跳过模型和渠道?**
53
53
  - 模型配置:后续用 `npx openclawapi` 单独配置,更灵活
54
- - 渠道配置:后续用 `npx openclawdc`(Discord)或 `npx openclawfs`(飞书)配置
54
+ - 渠道配置:后续用 `npx openclawdc`(Discord)或 `npx openclaw-chat-cn@latest feishu`(飞书)配置
55
55
 
56
56
  ## 已安装用户:更新或重装
57
57
 
@@ -78,8 +78,8 @@ npx openclawsetup@latest --reinstall
78
78
 
79
79
  3. **配置聊天渠道(可选)**
80
80
  ```bash
81
- npx openclawdc # Discord
82
- npx openclawfs # 飞书
81
+ npx openclawdc # Discord
82
+ npx openclaw-chat-cn@latest feishu # 飞书
83
83
  ```
84
84
 
85
85
  ## 常见问题