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

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
@@ -6,79 +6,55 @@
6
6
 
7
7
  ## 快速开始
8
8
 
9
- **有 Node.js 18+ 环境(推荐):**
9
+ ### Linux / macOS
10
10
 
11
11
  ```bash
12
- npm install -g @cannbot-ai/install-helper
12
+ curl -fsSL https://raw.gitcode.com/cann/cannbot-skills/raw/master/install.sh | bash
13
13
  ```
14
14
 
15
- **无 Node.js 环境:**
15
+ ### Windows
16
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` |
17
+ ```powershell
18
+ irm https://cdn.jsdelivr.net/npm/@cannbot-ai/install-helper@latest/dist/install.ps1 | iex
19
+ ```
20
+
21
+ ### npm(全平台,需要 Node.js 18+)
22
+
23
+ ```bash
24
+ npm install -g @cannbot-ai/install-helper
25
+ ```
21
26
 
22
27
  > 也可以免安装直接运行:`npx @cannbot-ai/install-helper`
23
28
 
24
- 安装完成后运行 `install-helper` 启动交互式向导,自动检测已安装的 AI 编程工具(OpenCode / Claude Code / Trae / Cursor / GitHub Copilot),通过箭头键选择场景即可完成安装。
29
+ ---
25
30
 
26
- ## 一键安装所有 Skills
31
+ 安装完成后运行 `install-helper` 启动向导。
27
32
 
28
- 如果 AI 编程工具已安装,可直接一键安装全部 Skills(无需逐个点选)。支持所有工具(opencode / claude / trae / cursor / copilot):
33
+ ## 一键安装所有 Skills
29
34
 
30
35
  ```bash
31
- # 一键安装全部 Skills 到当前项目(跳过确认)
36
+ # 安装全部 Skills 到当前项目
32
37
  install-helper install --all --tool opencode --yes
33
38
 
34
- # 一键安装全部 Skills 到全局
39
+ # 安装全部 Skills 到全局
35
40
  install-helper install --all --tool opencode --level global --yes
36
-
37
- # 指定其他 AI 工具
38
- install-helper install --all --tool claude --yes
39
- install-helper install --all --tool trae --yes
40
-
41
- # 不指定 --tool,交互式选择工具
42
- install-helper install --all --yes
43
41
  ```
44
42
 
45
- > 交互式向导也支持「全选所有 Skills」和「全选当前类别」,详见下文。
46
-
47
- ## 主要特性
48
-
49
- ### 核心功能
50
- - **动态 Skill 发现**:自动扫描仓库中的 SKILL.md 文件,实时发现可用 Skills
51
- - **智能缓存机制**:扫描结果缓存 24 小时,大幅提升后续命令执行速度
52
- - **备份与恢复**:安装新插件时自动备份 AGENTS.md,支持一键恢复
53
- - **参数校验**:`--tool` 和 `--level` 参数支持校验,提供友好的错误提示(支持中英文)
54
- - **智能记忆**:记住上次选择的工具和安装级别,下次运行自动填充
55
-
56
- ### 安装管理
57
- - **交互式向导**:箭头键选择,空格切换,回车确认
58
- - **列表排序**:插件和 Skills 列表按名称升序排列
59
- - **描述聚焦**:光标聚焦某项时,下方以青色 + 💡 前缀显示详细描述,支持中文自适应换行
60
- - **批量选择**:支持全选所有 Skills、全选当前类别、跨类别累积选择
61
- - **插件安装**:支持 10 个官方插件,自动处理依赖
62
- - **Skill 安装**:支持 91 个 Skills,按 11 个类别组织
63
- - **智能卸载**:根据安装记录精确删除,自动清理空目录
64
- - **健康检查**:检测安装状态,自动修复常见问题
65
-
66
43
  ## 命令一览
67
44
 
68
45
  | 命令 | 说明 |
69
46
  |------|------|
70
- | `install-helper` / `install-helper init` | 交互式安装向导 |
47
+ | `install-helper` | 交互式安装向导 |
71
48
  | `install-helper list` | 列出可用场景及安装状态 |
72
49
  | `install-helper install <name>` | 安装指定插件或 Skill(自动识别) |
73
50
  | `install-helper install --list` | 按类别列出所有可用 Skills |
74
51
  | `install-helper install --all --tool <tool> --yes` | 一键安装全部 Skills |
75
- | `install-helper update [plugin]` | 更新已安装的 Skills |
76
- | `install-helper uninstall <plugin>` | 卸载指定场景 |
52
+ | `install-helper update [plugin]` | 更新已安装的插件 |
53
+ | `install-helper uninstall <plugin>` | 卸载指定插件 |
77
54
  | `install-helper status` | 查看已安装插件详情 |
78
55
  | `install-helper doctor` | 健康检查 |
79
56
  | `install-helper doctor --fix` | 健康检查 + 自动修复 |
80
57
  | `install-helper info <plugin>` | 查看插件详情 |
81
- | `install-helper lang show` | 显示当前语言 |
82
58
  | `install-helper lang set en_US` | 切换语言 |
83
59
 
84
60
  ## 命令详解
@@ -87,22 +63,13 @@ install-helper install --all --yes
87
63
 
88
64
  ```bash
89
65
  install-helper
90
- # 或
91
- install-helper init
92
66
  ```
93
67
 
94
- 向导会引导你完成:
95
- 1. 选择安装类型(Plugin 完整工作流 / Skill 轻量知识)
96
- 2. 自动检测已安装的 AI 编程工具
97
- 3. 选择安装级别(project / global)
98
- 4. 多选要安装的插件或 Skills(空格切换,回车确认)
99
- 5. 确认并执行安装
100
-
101
- **列表展示**:插件和 Skill 列表均按名称升序排列。光标聚焦某项时,下方会以青色 + 💡 前缀显示该项的详细描述,支持中文自适应换行。
68
+ 向导引导:选择类型(Plugin/Skill)→ 检测工具 → 选择位置 → 选择插件/Skill → 确认安装。
102
69
 
103
- **智能记忆**:向导会记住你上次选择的工具和级别,下次运行无需重新选择。已安装的插件会自动标记并默认不勾选。
70
+ 已安装的插件会自动标记,上次选择的工具和级别会被记住。
104
71
 
105
- ### 安装指定场景
72
+ ### 安装指定插件
106
73
 
107
74
  ```bash
108
75
  install-helper install ops-direct-invoke # 安装单个
@@ -111,42 +78,19 @@ install-helper install ops-direct-invoke --yes # 跳过确认
111
78
  install-helper install ops-direct-invoke --level global # 全局安装
112
79
  ```
113
80
 
114
- **重要说明**:
115
-
116
- 每个插件都有独立的 `AGENTS.md` 配置文件。如果在同一目录下安装多个插件,后安装的会覆盖前一个的配置文件。建议每个项目只安装一个插件,如需使用多个插件,在不同目录下分别安装。
117
-
118
- **示例**:
119
- ```bash
120
- # 项目 A:使用 Kernel 直调
121
- cd project-a
122
- install-helper install ops-direct-invoke --tool opencode
123
-
124
- # 项目 B:使用 Triton
125
- cd project-b
126
- install-helper install triton --tool opencode
127
- ```
128
-
129
- ### 安装单个 Skill(轻量模式)
81
+ > 每个插件有独立的 `AGENTS.md`,建议每个项目只安装一个插件。
130
82
 
131
- 如果只需要让 AI agent 掌握特定领域知识,不需要完整工作流,可以直接安装单个 Skill:
83
+ ### 安装单个 Skill
132
84
 
133
85
  ```bash
134
86
  install-helper install npu-arch # 安装 NPU 架构知识
135
87
  install-helper install ascendc-precision-debug # 安装精度调试技能
136
- install-helper install model-infer-kvcache # 安装 KVCache 优化技能
137
88
  install-helper install --list # 查看所有可用 Skills
138
89
  ```
139
90
 
140
- Skills 按 11 个大类组织(另有「其他」兜底类别):知识与参考、环境与工具、调试与诊断、测试与质量、AscendC 开发、PyPTO 开发、TileLang 开发、Triton 开发、模型推理优化、图模式、平台工具。
141
-
142
- `install` 命令自动识别输入是插件还是 Skill,无需区分。
91
+ `install` 命令自动识别输入是插件还是 Skill。
143
92
 
144
- **交互式批量选择**:运行 `install-helper install`(不带参数)进入交互式选择时,支持以下批量操作:
145
-
146
- - **全选所有 Skills**:类别列表顶部有「全选所有 Skills(共 N 个)」,选中即一键安装全部。
147
- - **全选当前类别**:进入某类别后,顶部有「全选当前类别」,勾选后回车即选中该类别全部 Skills。
148
- - **跨类别累积选择**:选完一个类别后,可选择「继续选择其他类别」,已选 Skills 会保留累积,不丢失。类别列表中实时显示「确认安装(已选 N 个 Skills)」快捷入口,随时可确认安装。
149
- - **单选/多选**:在类别内用空格勾选任意多个 Skills,回车确认。
93
+ 交互式选择时支持:全选所有 Skills、全选当前类别、跨类别累积选择。
150
94
 
151
95
  **选项:**
152
96
 
@@ -154,27 +98,23 @@ Skills 按 11 个大类组织(另有「其他」兜底类别):知识与参
154
98
  |------|------|
155
99
  | `--tool <tool>` | 指定 AI 工具(opencode, claude, trae, cursor, copilot) |
156
100
  | `--level <level>` | 安装级别(project, global),默认 project |
157
- | `--all` `-a` | 安装全部 Skills(一键安装) |
101
+ | `--all` `-a` | 安装全部 Skills |
158
102
  | `--yes` `-y` | 跳过所有确认提示 |
159
103
 
160
- **已装检测**:如果插件已安装,会提示是否覆盖安装。使用 `--yes` 可跳过提示直接覆盖。
161
-
162
- ### 更新已安装的 Skills
104
+ ### 更新
163
105
 
164
106
  ```bash
165
107
  install-helper update # 更新所有已安装插件
166
108
  install-helper update triton # 更新指定插件
167
109
  ```
168
110
 
169
- 更新流程:`git pull` 拉取最新 Skills 仓库 → 重新执行安装脚本 → 软链接自动指向最新内容。
170
-
171
- ### 查看插件详情
111
+ ### 卸载
172
112
 
173
113
  ```bash
174
- install-helper info ops-direct-invoke
114
+ install-helper uninstall ops-direct-invoke --tool opencode
175
115
  ```
176
116
 
177
- 输出插件描述、包含的 Skills/Agents 列表、quickstart 文档路径、安装状态。
117
+ 根据安装记录精确删除所有产物,自动清理空目录。
178
118
 
179
119
  ### 健康检查
180
120
 
@@ -183,44 +123,14 @@ install-helper doctor # 仅检测
183
123
  install-helper doctor --fix # 检测 + 自动修复
184
124
  ```
185
125
 
186
- 检查项目:
187
- - AI 工具安装状态
188
- - 已安装插件状态
189
- - 软链接完整性
190
- - 配置文件存在性
191
-
192
- `--fix` 会自动修复:清理失效软链接、重建缺失目录。
193
-
194
126
  ### 语言管理
195
127
 
196
128
  ```bash
197
129
  install-helper lang show # 显示当前语言
198
- install-helper lang set zh_CN # 设置为中文(默认)
199
- install-helper lang set en_US # 设置为英文
130
+ install-helper lang set en_US # 切换为英文
200
131
  ```
201
132
 
202
- 语言设置保存在 `~/.cannbot/config.yaml`,重启后自动生效。
203
-
204
- ### 卸载
205
-
206
- ```bash
207
- install-helper uninstall ops-direct-invoke --tool opencode
208
- ```
209
-
210
- 卸载时根据安装记录(`~/.cannbot/installs/<plugin>.json`)精确删除所有安装产物:
211
- - Skills 软链接
212
- - Agents 软链接
213
- - Workflows 链接
214
- - 配置文件(AGENTS.md / CLAUDE.md)
215
- - Manifest 文件
216
- - 参考仓库链接(asc-devkit 等)
217
- - 空目录清理
218
-
219
- ## 可用场景
220
-
221
- install-helper 支持 **10 个官方插件** 和 **91 个 Skills**(动态发现,数量可能随仓库更新而变化)。
222
-
223
- #### 官方插件
133
+ ## 可用插件
224
134
 
225
135
  | # | 场景 | ID | 别名 |
226
136
  |---|------|----|------|
@@ -235,77 +145,11 @@ install-helper 支持 **10 个官方插件** 和 **91 个 Skills**(动态发
235
145
  | 9 | torch.compile 图模式 | torch-compile | torch, compile, graph |
236
146
  | 10 | 代码检视 | ops-code-reviewer | code-review, reviewer, review |
237
147
 
238
- #### Skills 类别
239
-
240
- Skills 按 11 个类别组织(另有「其他」兜底类别,动态发现,数量可能随仓库更新而变化):
241
- - 知识与参考
242
- - 环境与工具
243
- - 调试与诊断
244
- - 测试与质量
245
- - AscendC 开发
246
- - PyPTO 开发
247
- - TileLang 开发
248
- - Triton 开发
249
- - 模型推理优化
250
- - 图模式
251
- - 平台工具
252
- - 其他 Skills
253
-
254
- 使用 `install-helper install --list` 查看完整的 Skills 列表。
255
-
256
148
  ## 前置条件
257
149
 
258
150
  - 已安装至少一个 AI 编程工具(OpenCode / Claude Code / Trae / Cursor / GitHub Copilot)
259
151
  - Git(用于克隆 Skills 仓库)
260
152
 
261
- ## 工作原理
262
-
263
- install-helper 是一个编排工具:
264
-
265
- 1. **自动检测**已安装的 AI 编程工具
266
- 2. **动态扫描**仓库中的 SKILL.md 文件,发现可用 Skills
267
- 3. **缓存扫描结果**到 `~/.cannbot/scan-cache.json`(24 小时有效)
268
- 4. **克隆或更新** cannbot-skills 仓库(缓存到 `~/.cannbot/repo/`)
269
- 5. **备份现有配置**(如果检测到已安装的 AGENTS.md)
270
- 6. **声明式安装**:从 `plugins.d/*.yml` 读取安装清单(installSkills/installAgents/configFile/externalRepos),通过 Node.js 原生引擎执行安装(创建 symlink、克隆外部仓库、写 manifest),无需 bash/sh;无安装清单时 fallback 到 `init.sh` 脚本
271
- 7. **追踪**安装状态(`~/.cannbot/config.yaml` + manifest)
272
-
273
- 安装逻辑优先由 manifest 引擎(Node.js 原生,跨平台)负责,install-helper 提供统一的交互式入口和状态管理。
274
-
275
- ## 配置文件
276
-
277
- 配置保存在 `~/.cannbot/` 目录:
278
-
279
- ```yaml
280
- # config.yaml - 用户配置
281
- language: zh_CN # 界面语言
282
- lastTool: opencode # 上次使用的 AI 工具
283
- lastLevel: project # 上次安装级别
284
- installedPlugins: # 已安装的插件列表
285
- - ops-direct-invoke
286
- - pypto-op-orchestrator
287
- ```
288
-
289
- ```json
290
- // scan-cache.json - 扫描缓存(自动生成,24 小时有效)
291
- {
292
- "skills": [...],
293
- "repoCommit": "a1b2c3d4e5f6...",
294
- "timestamp": 1234567890
295
- }
296
- ```
297
-
298
- ```json
299
- // installs/<plugin>.json - 安装记录(每个插件一个文件)
300
- {
301
- "pluginId": "ops-direct-invoke",
302
- "installTime": "2026-06-23T10:00:00Z",
303
- "configRoot": "/path/to/config",
304
- "files": [...],
305
- "directories": [...]
306
- }
307
- ```
308
-
309
153
  ## 开发
310
154
 
311
155
  ```bash
@@ -318,5 +162,3 @@ npm run build # 构建
318
162
  npm link # 全局注册
319
163
  install-helper list # 测试
320
164
  ```
321
-
322
-
package/dist/index.js CHANGED
@@ -32,8 +32,7 @@ var zh_CN_default = {
32
32
  wizard_detect: "\u6B63\u5728\u68C0\u6D4B\u5DF2\u5B89\u88C5\u7684 AI \u7F16\u7A0B\u5DE5\u5177...",
33
33
  wizard_select_tool: "\u9009\u62E9 AI \u7F16\u7A0B\u5DE5\u5177",
34
34
  wizard_select_level: "\u9009\u62E9\u5B89\u88C5\u4F4D\u7F6E",
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",
35
+ wizard_select_plugin: "\u9009\u62E9\u8981\u5B89\u88C5\u7684\u63D2\u4EF6",
37
36
  wizard_confirm: "\u786E\u8BA4\u5B89\u88C5",
38
37
  wizard_detected_tool: "\u68C0\u6D4B\u5230",
39
38
  wizard_confirm_tool: "\u4F7F\u7528",
@@ -91,8 +90,6 @@ var zh_CN_default = {
91
90
  error_not_installed: "\u672A\u5B89\u88C5",
92
91
  error_no_shell: "\u672A\u627E\u5230 bash \u6216 sh\uFF0C\u65E0\u6CD5\u6267\u884C\u5B89\u88C5\u811A\u672C\u3002\u8BF7\u5B89\u88C5 Git Bash \u6216 WSL",
93
92
  error_symlink_windows: "\u521B\u5EFA\u7B26\u53F7\u94FE\u63A5\u5931\u8D25\uFF0C\u8BF7\u4EE5\u7BA1\u7406\u5458\u8EAB\u4EFD\u8FD0\u884C\u6216\u5F00\u542F Windows \u5F00\u53D1\u8005\u6A21\u5F0F",
94
- quick_start: "\u542F\u52A8\u547D\u4EE4",
95
- quick_start_hint: "\u8BD5\u8BD5\u8F93\u5165: \u5E2E\u6211\u5F00\u53D1\u4E00\u4E2A Abs \u7B97\u5B50",
96
93
  skill_select_category: "\u9009\u62E9 Skill \u7C7B\u522B",
97
94
  skill_select_items: "\u9009\u62E9\u8981\u5B89\u88C5\u7684 Skills",
98
95
  skill_already_installed: "\u5DF2\u5B89\u88C5",
@@ -132,7 +129,6 @@ var zh_CN_default = {
132
129
  uninstall_no_record: "\u672A\u627E\u5230\u5B89\u88C5\u8BB0\u5F55\uFF0C\u53EF\u80FD\u672A\u5B89\u88C5\u6216\u5B89\u88C5\u8BB0\u5F55\u5DF2\u635F\u574F",
133
130
  uninstall_no_record_hint: "\u5982\u9700\u5F3A\u5236\u6E05\u7406\uFF0C\u8BF7\u624B\u52A8\u5220\u9664 .opencode/ \u6216 .claude/ \u76EE\u5F55\u4E2D\u7684\u76F8\u5173\u6587\u4EF6",
134
131
  uninstall_in_progress: "\u6B63\u5728\u5378\u8F7D",
135
- uninstall_removed: "\u5DF2\u5378\u8F7D",
136
132
  uninstall_summary_format: "{name}\uFF08\u79FB\u9664 {files} \u4E2A\u6587\u4EF6\uFF0C{dirs} \u4E2A\u76EE\u5F55\uFF09",
137
133
  uninstall_files_gone: "\u7684\u6587\u4EF6\u5DF2\u4E0D\u5B58\u5728\uFF0C\u5DF2\u6E05\u7406\u5B89\u88C5\u8BB0\u5F55",
138
134
  uninstall_skills_in_progress: "\u6B63\u5728\u5378\u8F7D",
@@ -166,6 +162,16 @@ var zh_CN_default = {
166
162
  skill_record_corrupted: "Skill \u5B89\u88C5\u8BB0\u5F55\u5DF2\u635F\u574F",
167
163
  plugin_yaml_error: "\u63D2\u4EF6\u914D\u7F6E\u89E3\u6790\u5931\u8D25\uFF1A{file}",
168
164
  record_write_failed: "\u5B89\u88C5\u8BB0\u5F55\u5199\u5165\u5931\u8D25\uFF0C\u5378\u8F7D\u65F6\u53EF\u80FD\u65E0\u6CD5\u81EA\u52A8\u6E05\u7406",
165
+ install_config_failed: "\u914D\u7F6E\u6587\u4EF6\u5B89\u88C5\u5931\u8D25: {error}",
166
+ install_clone_failed: "git clone \u5931\u8D25: {url}\uFF0C\u8BF7\u624B\u52A8\u514B\u9686: git clone {url} {dir}",
167
+ install_link_config_failed: "\u94FE\u63A5 {name} \u5230\u914D\u7F6E\u76EE\u5F55\u5931\u8D25",
168
+ install_link_project_failed: "\u94FE\u63A5 {name} \u5230\u9879\u76EE\u76EE\u5F55\u5931\u8D25",
169
+ install_link_workflows_failed: "\u94FE\u63A5 workflows \u5230\u914D\u7F6E\u76EE\u5F55\u5931\u8D25",
170
+ install_skill_source_not_found: "Skill \u6E90\u76EE\u5F55\u672A\u627E\u5230: {dir}",
171
+ install_skill_not_found: "Skill \u672A\u627E\u5230: {name} (\u5728 {dir})",
172
+ install_skill_failed: "Skill \u5B89\u88C5\u5931\u8D25: {name}",
173
+ install_agent_not_found: "Agent \u672A\u627E\u5230: {name}",
174
+ install_agent_failed: "Agent \u5B89\u88C5\u5931\u8D25: {name}",
169
175
  install_no_skill_selected: "\u672A\u9009\u62E9\u4EFB\u4F55 Skill",
170
176
  install_to: "\u5B89\u88C5\u5230",
171
177
  start_to_use: "\u542F\u52A8 {tool} \u5373\u53EF\u4F7F\u7528",
@@ -182,8 +188,6 @@ var zh_CN_default = {
182
188
  result_success_format: "{count} \u6210\u529F",
183
189
  result_failed_format: "{count} \u5931\u8D25",
184
190
  uninstall_remove_label: "\u79FB\u9664",
185
- uninstall_remove_file_format: "\u79FB\u9664 {count} \u4E2A\u6587\u4EF6",
186
- uninstall_remove_dir_format: "{count} \u4E2A\u76EE\u5F55",
187
191
  uninstall_clean_empty_dir: "\u6E05\u7406\u7A7A\u76EE\u5F55",
188
192
  uninstall_skill_not_installed: "\u672A\u5B89\u88C5",
189
193
  available_plugins: "\u53EF\u7528\u63D2\u4EF6",
@@ -217,8 +221,7 @@ var en_US_default = {
217
221
  wizard_detect: "Detecting installed AI coding tools...",
218
222
  wizard_select_tool: "Select AI coding tool",
219
223
  wizard_select_level: "Select install level",
220
- wizard_select_plugins: "Select scenarios to install",
221
- wizard_select_plugin: "Select a scenario to install (one only)",
224
+ wizard_select_plugin: "Select a scenario to install",
222
225
  wizard_confirm: "Confirm installation",
223
226
  wizard_detected_tool: "Detected",
224
227
  wizard_confirm_tool: "Confirm using",
@@ -276,8 +279,6 @@ var en_US_default = {
276
279
  error_not_installed: "Not installed",
277
280
  error_no_shell: "bash or sh not found, cannot execute install script. Please install Git Bash or WSL",
278
281
  error_symlink_windows: "Failed to create symlink, please run as administrator or enable Windows Developer Mode",
279
- quick_start: "Launch command",
280
- quick_start_hint: "Try: help me develop an Abs operator",
281
282
  skill_select_category: "Select Skill category",
282
283
  skill_select_items: "Select Skills to install (space to toggle, enter to confirm)",
283
284
  skill_already_installed: "installed",
@@ -317,7 +318,6 @@ var en_US_default = {
317
318
  uninstall_no_record: "No install record found, may not be installed or record is corrupted",
318
319
  uninstall_no_record_hint: "For manual cleanup, delete related files in .opencode/ or .claude/ directory",
319
320
  uninstall_in_progress: "Uninstalling",
320
- uninstall_removed: "Uninstalled",
321
321
  uninstall_summary_format: "{name} (removed {files} files, {dirs} directories)",
322
322
  uninstall_files_gone: " files no longer exist, install record cleaned",
323
323
  uninstall_skills_in_progress: "Uninstalling",
@@ -351,6 +351,16 @@ var en_US_default = {
351
351
  skill_record_corrupted: "Skill install record corrupted",
352
352
  plugin_yaml_error: "Plugin config parse error: {file}",
353
353
  record_write_failed: "Install record write failed, uninstall may not work properly",
354
+ install_config_failed: "Failed to install config file: {error}",
355
+ install_clone_failed: "git clone failed: {url}, clone manually: git clone {url} {dir}",
356
+ install_link_config_failed: "Failed to link {name} to config directory",
357
+ install_link_project_failed: "Failed to link {name} to project directory",
358
+ install_link_workflows_failed: "Failed to link workflows to config directory",
359
+ install_skill_source_not_found: "Skill source not found: {dir}",
360
+ install_skill_not_found: "Skill not found: {name} in {dir}",
361
+ install_skill_failed: "Failed to install skill: {name}",
362
+ install_agent_not_found: "Agent not found: {name}",
363
+ install_agent_failed: "Failed to install agent: {name}",
354
364
  install_no_skill_selected: "No Skill selected",
355
365
  install_to: "Install to",
356
366
  start_to_use: "Start {tool} to use",
@@ -367,8 +377,6 @@ var en_US_default = {
367
377
  result_success_format: "{count} succeeded",
368
378
  result_failed_format: "{count} failed",
369
379
  uninstall_remove_label: "Removed",
370
- uninstall_remove_file_format: "Removed {count} files",
371
- uninstall_remove_dir_format: "{count} directories",
372
380
  uninstall_clean_empty_dir: "Cleaned empty directory",
373
381
  uninstall_skill_not_installed: "Not installed",
374
382
  available_plugins: "Available plugins",
@@ -2355,7 +2363,7 @@ var RepositoryManager = class {
2355
2363
  return targetPath;
2356
2364
  } catch (error) {
2357
2365
  throw new Error(
2358
- `Failed to clone repository: ${error instanceof Error ? error.message : "Unknown error"}`
2366
+ `Failed to clone repository: ${error instanceof Error ? error.message : t("error_unknown")}`
2359
2367
  );
2360
2368
  }
2361
2369
  }
@@ -2700,7 +2708,7 @@ async function showRestorePrompt(backups) {
2700
2708
  }
2701
2709
 
2702
2710
  // src/core/plugin-installer.ts
2703
- import { existsSync as existsSync12, mkdirSync as mkdirSync5, symlinkSync, unlinkSync as unlinkSync4, realpathSync, copyFileSync as copyFileSync2, cpSync, writeFileSync as writeFileSync3, rmSync } from "fs";
2711
+ import { existsSync as existsSync12, mkdirSync as mkdirSync5, symlinkSync, unlinkSync as unlinkSync4, realpathSync, copyFileSync as copyFileSync2, cpSync, writeFileSync as writeFileSync2, rmSync } from "fs";
2704
2712
  import { join as join11, basename } from "path";
2705
2713
  import { execa as execa3 } from "execa";
2706
2714
  function installLink(source, target) {
@@ -2749,7 +2757,7 @@ function installConfigFile(pluginDir, configFile, tool, level, configRoot, insta
2749
2757
  }
2750
2758
  }
2751
2759
  } catch (e) {
2752
- logger.warn(` Failed to install config file: ${e.message}`);
2760
+ logger.warn(t("install_config_failed").replace("{error}", e.message));
2753
2761
  }
2754
2762
  if (isProjectLevel && primaryTarget !== join11(configRoot, agentsFileName)) {
2755
2763
  if (configRootConfigLink === false) return;
@@ -2782,7 +2790,7 @@ async function installExternalRepos(repos, repoPath, configRoot, installPath, le
2782
2790
  try {
2783
2791
  await execa3("git", args, { timeout: 12e4 });
2784
2792
  } catch {
2785
- logger.warn(` git clone failed: ${repo.url}, clone manually: git clone ${repo.url} ${repo.dir}`);
2793
+ logger.warn(t("install_clone_failed").replace("{url}", repo.url).replace("{dir}", repo.dir));
2786
2794
  try {
2787
2795
  rmSync(targetDir, { recursive: true, force: true });
2788
2796
  } catch {
@@ -2807,7 +2815,7 @@ async function installExternalRepos(repos, repoPath, configRoot, installPath, le
2807
2815
  }
2808
2816
  }
2809
2817
  } catch {
2810
- logger.warn(` Failed to link ${linkName} to config directory`);
2818
+ logger.warn(t("install_link_config_failed").replace("{name}", linkName));
2811
2819
  }
2812
2820
  }
2813
2821
  if (level === "project") {
@@ -2824,7 +2832,7 @@ async function installExternalRepos(repos, repoPath, configRoot, installPath, le
2824
2832
  }
2825
2833
  }
2826
2834
  } catch {
2827
- logger.warn(` Failed to link ${linkName} to project directory`);
2835
+ logger.warn(t("install_link_project_failed").replace("{name}", linkName));
2828
2836
  }
2829
2837
  }
2830
2838
  }
@@ -2846,7 +2854,7 @@ function installWorkflows(pluginDir, configRoot) {
2846
2854
  }
2847
2855
  }
2848
2856
  } catch {
2849
- logger.warn(` Failed to link workflows to config directory`);
2857
+ logger.warn(t("install_link_workflows_failed"));
2850
2858
  }
2851
2859
  }
2852
2860
  function writeCannbotManifest(configRoot, pluginId, version, level, tool, skills, agents) {
@@ -2862,7 +2870,7 @@ function writeCannbotManifest(configRoot, pluginId, version, level, tool, skills
2862
2870
  install_time: (/* @__PURE__ */ new Date()).toISOString()
2863
2871
  };
2864
2872
  const manifestPath = join11(configRoot, "cannbot-manifest.json");
2865
- writeFileSync3(manifestPath, JSON.stringify(manifest, null, 2), "utf-8");
2873
+ writeFileSync2(manifestPath, JSON.stringify(manifest, null, 2), "utf-8");
2866
2874
  return manifest;
2867
2875
  }
2868
2876
  async function installViaManifest(plugin, repoPath, tool, level, installPath) {
@@ -2879,7 +2887,7 @@ async function installViaManifest(plugin, repoPath, tool, level, installPath) {
2879
2887
  for (const source of plugin.installSkills || []) {
2880
2888
  const sourceDir = join11(repoPath, source.dir);
2881
2889
  if (!existsSync12(sourceDir)) {
2882
- logger.warn(` Skill source not found: ${source.dir}`);
2890
+ logger.warn(t("install_skill_source_not_found").replace("{dir}", source.dir));
2883
2891
  continue;
2884
2892
  }
2885
2893
  for (const skillEntry of source.skills) {
@@ -2887,7 +2895,7 @@ async function installViaManifest(plugin, repoPath, tool, level, installPath) {
2887
2895
  const skillAlias = typeof skillEntry === "string" ? skillName : skillEntry.as || skillName;
2888
2896
  const skillPath = join11(sourceDir, skillName);
2889
2897
  if (!existsSync12(skillPath)) {
2890
- logger.warn(` Skill not found: ${skillName} in ${source.dir}`);
2898
+ logger.warn(t("install_skill_not_found").replace("{name}", skillName).replace("{dir}", source.dir));
2891
2899
  continue;
2892
2900
  }
2893
2901
  const targetPath = join11(skillsDir, skillAlias);
@@ -2895,7 +2903,7 @@ async function installViaManifest(plugin, repoPath, tool, level, installPath) {
2895
2903
  if (result !== "failed") {
2896
2904
  installedSkills.push(skillAlias);
2897
2905
  } else {
2898
- logger.warn(` Failed to install skill: ${skillAlias}`);
2906
+ logger.warn(t("install_skill_failed").replace("{name}", skillAlias));
2899
2907
  }
2900
2908
  }
2901
2909
  }
@@ -2903,7 +2911,7 @@ async function installViaManifest(plugin, repoPath, tool, level, installPath) {
2903
2911
  const agentFile = agentName.endsWith(".md") ? agentName : `${agentName}.md`;
2904
2912
  const agentPath = join11(pluginDir, "agents", agentFile);
2905
2913
  if (!existsSync12(agentPath)) {
2906
- logger.warn(` Agent not found: ${agentFile}`);
2914
+ logger.warn(t("install_agent_not_found").replace("{name}", agentFile));
2907
2915
  continue;
2908
2916
  }
2909
2917
  const targetPath = join11(agentsDir, agentFile);
@@ -2911,7 +2919,7 @@ async function installViaManifest(plugin, repoPath, tool, level, installPath) {
2911
2919
  if (result !== "failed") {
2912
2920
  installedAgents.push(agentFile);
2913
2921
  } else {
2914
- logger.warn(` Failed to install agent: ${agentFile}`);
2922
+ logger.warn(t("install_agent_failed").replace("{name}", agentFile));
2915
2923
  }
2916
2924
  }
2917
2925
  installConfigFile(pluginDir, plugin.configFile || "AGENTS.md", tool, level, configRoot, cwd, plugin.configRootConfigLink);
@@ -2946,7 +2954,7 @@ async function installViaManifest(plugin, repoPath, tool, level, installPath) {
2946
2954
 
2947
2955
  // src/core/installer.ts
2948
2956
  function findShell() {
2949
- const candidates = process.platform === "win32" ? ["bash", "sh"] : ["bash", "sh"];
2957
+ const candidates = ["bash", "sh"];
2950
2958
  for (const cmd of candidates) {
2951
2959
  try {
2952
2960
  const detectCmd = process.platform === "win32" ? "where" : "which";