@cannbot-ai/install-helper 0.0.2-beta.63 → 0.0.2-beta.65

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
@@ -3,28 +3,25 @@
3
3
  > CANNBot Install Helper — CANNBot 交互式安装助手
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/@cannbot-ai/install-helper.svg)](https://www.npmjs.com/package/@cannbot-ai/install-helper)
6
- [![Node.js](https://img.shields.io/badge/node-%3E%3D18-brightgreen.svg)](https://nodejs.org)
7
6
 
8
7
  ## 快速开始
9
8
 
10
- ```bash
11
- # Linux/macOS 一键安装(零依赖,无需 Node.js)
12
- curl -fsSL https://raw.gitcode.com/cann/cannbot-skills/raw/master/install.sh | bash
13
-
14
- # Windows PowerShell 一键安装(零依赖)
15
- irm https://cdn.jsdelivr.net/npm/@cannbot-ai/install-helper@latest/dist/install.ps1 | iex
9
+ **有 Node.js 18+ 环境(推荐):**
16
10
 
17
- # 或通过 npm 全局安装(需要 Node.js 18+)
11
+ ```bash
18
12
  npm install -g @cannbot-ai/install-helper
19
- install-helper
20
-
21
- # 或 npx 即用(无需安装,需要 Node.js 18+)
22
- npx @cannbot-ai/install-helper
23
13
  ```
24
14
 
25
- curl 和 PowerShell 方式从 npm registry 下载预编译二进制(Bun 编译的独立可执行文件),无需 Node.js、无需 npm。安装后 `install-helper` 命令可直接使用。
15
+ **无 Node.js 环境:**
16
+
17
+ | 平台 | 命令 |
18
+ |------|------|
19
+ | Linux / macOS | `curl -fsSL https://raw.gitcode.com/cann/cannbot-skills/raw/master/install.sh \| bash` |
20
+ | Windows | `irm https://cdn.jsdelivr.net/npm/@cannbot-ai/install-helper@latest/dist/install.ps1 \| iex` |
21
+
22
+ > 也可以免安装直接运行:`npx @cannbot-ai/install-helper`
26
23
 
27
- 交互式向导会自动检测已安装的 AI 编程工具(OpenCode / Claude Code / Trae / Cursor / GitHub Copilot),通过箭头键选择场景即可完成安装。
24
+ 安装完成后运行 `install-helper` 启动交互式向导,自动检测已安装的 AI 编程工具(OpenCode / Claude Code / Trae / Cursor / GitHub Copilot),通过箭头键选择场景即可完成安装。
28
25
 
29
26
  ## 一键安装所有 Skills
30
27
 
@@ -260,7 +257,6 @@ Skills 按 11 个类别组织(另有「其他」兜底类别,动态发现,
260
257
 
261
258
  - 已安装至少一个 AI 编程工具(OpenCode / Claude Code / Trae / Cursor / GitHub Copilot)
262
259
  - Git(用于克隆 Skills 仓库)
263
- - curl/PowerShell 方式无需 Node.js;npm/npx 方式需要 Node.js >= 18
264
260
 
265
261
  ## 工作原理
266
262
 
package/dist/index.js CHANGED
@@ -8,7 +8,7 @@ import { select as select4, Separator as Separator3 } from "@inquirer/prompts";
8
8
  import chalk7 from "chalk";
9
9
 
10
10
  // src/ui/wizard.ts
11
- import { select, checkbox, Separator } from "@inquirer/prompts";
11
+ import { select, Separator } from "@inquirer/prompts";
12
12
  import chalk3 from "chalk";
13
13
 
14
14
  // src/core/registry.ts
@@ -33,6 +33,7 @@ var zh_CN_default = {
33
33
  wizard_select_tool: "\u9009\u62E9 AI \u7F16\u7A0B\u5DE5\u5177",
34
34
  wizard_select_level: "\u9009\u62E9\u5B89\u88C5\u4F4D\u7F6E",
35
35
  wizard_select_plugins: "\u9009\u62E9\u8981\u5B89\u88C5\u7684\u63D2\u4EF6",
36
+ wizard_select_plugin: "\u9009\u62E9\u8981\u5B89\u88C5\u7684\u63D2\u4EF6\uFF08\u4EC5\u53EF\u9009\u62E9\u4E00\u4E2A\uFF09",
36
37
  wizard_confirm: "\u786E\u8BA4\u5B89\u88C5",
37
38
  wizard_detected_tool: "\u68C0\u6D4B\u5230",
38
39
  wizard_confirm_tool: "\u4F7F\u7528",
@@ -217,6 +218,7 @@ var en_US_default = {
217
218
  wizard_select_tool: "Select AI coding tool",
218
219
  wizard_select_level: "Select install level",
219
220
  wizard_select_plugins: "Select scenarios to install",
221
+ wizard_select_plugin: "Select a scenario to install (one only)",
220
222
  wizard_confirm: "Confirm installation",
221
223
  wizard_detected_tool: "Detected",
222
224
  wizard_confirm_tool: "Confirm using",
@@ -1749,37 +1751,25 @@ async function stepPlugins(tool, level) {
1749
1751
  const isInstalled = installedSet.has(p.id);
1750
1752
  const suffix = isInstalled ? ` [${t("wizard_already_installed")}]` : "";
1751
1753
  return {
1752
- name: `${chalk3.cyan(p.displayName)}${suffix}`,
1754
+ name: `> ${chalk3.cyan(p.displayName)}${suffix}`,
1753
1755
  value: p.id,
1754
- checked: false,
1755
1756
  description: p.description
1756
1757
  };
1757
1758
  });
1758
- showOperationHints(true);
1759
- const selected = await checkbox({
1760
- message: t("wizard_select_plugins"),
1759
+ choices.push(new Separator("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"));
1760
+ choices.push({ name: "<- " + t("wizard_back"), value: BACK });
1761
+ choices.push({ name: "x " + t("wizard_cancel"), value: CANCEL });
1762
+ showOperationHints();
1763
+ const selected = await select({
1764
+ message: t("wizard_select_plugin"),
1761
1765
  choices,
1762
1766
  loop: false,
1763
- instructions: false,
1764
- theme: checkboxTheme,
1767
+ theme: selectTheme,
1765
1768
  pageSize: 15
1766
1769
  });
1767
- const pluginIds = selected;
1768
- if (pluginIds.length === 0) {
1769
- const action = await select({
1770
- message: t("wizard_no_selection"),
1771
- choices: [
1772
- new Separator("\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"),
1773
- { name: "<- " + t("wizard_back_to_reselect"), value: "back" },
1774
- { name: "x " + t("wizard_cancel"), value: "cancel" }
1775
- ],
1776
- loop: false,
1777
- theme: selectTheme
1778
- });
1779
- if (action === "back") return BACK;
1780
- return CANCEL;
1781
- }
1782
- return pluginIds;
1770
+ if (selected === BACK) return BACK;
1771
+ if (selected === CANCEL) return CANCEL;
1772
+ return [selected];
1783
1773
  }
1784
1774
  async function stepConfirm(tool, level, plugins) {
1785
1775
  printBoxTitle(t("wizard_step_4_title"));
@@ -3167,7 +3157,7 @@ async function installPlugin(opts) {
3167
3157
  // src/core/skill-installer.ts
3168
3158
  import { existsSync as existsSync14, mkdirSync as mkdirSync6, symlinkSync as symlinkSync2, unlinkSync as unlinkSync5, readdirSync as readdirSync4, rmdirSync, realpathSync as realpathSync2 } from "fs";
3169
3159
  import { join as join13, dirname as dirname6 } from "path";
3170
- import { select as select3, checkbox as checkbox2, Separator as Separator2 } from "@inquirer/prompts";
3160
+ import { select as select3, checkbox, Separator as Separator2 } from "@inquirer/prompts";
3171
3161
  import chalk5 from "chalk";
3172
3162
  import Table from "cli-table3";
3173
3163
  async function installSkills(skillIds, tool, level, repoPath) {
@@ -3327,7 +3317,7 @@ async function interactiveSkillSelect(tool, level) {
3327
3317
  })
3328
3318
  ];
3329
3319
  showOperationHints(true);
3330
- const selectedSkills = await checkbox2({
3320
+ const selectedSkills = await checkbox({
3331
3321
  message: t("skill_select_items"),
3332
3322
  choices: skillChoices,
3333
3323
  loop: false,