@cannbot-ai/install-helper 0.0.2-beta.9 → 1.0.2

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
@@ -18,6 +18,22 @@ npx @cannbot-ai/install-helper
18
18
 
19
19
  交互式向导会自动检测已安装的 AI 编程工具(OpenCode / Claude Code / Trae / Cursor),通过箭头键选择场景即可完成安装。
20
20
 
21
+ ## 主要特性
22
+
23
+ ### 核心功能
24
+ - **动态 Skill 发现**:自动扫描仓库中的 SKILL.md 文件,实时发现可用 Skills
25
+ - **智能缓存机制**:扫描结果缓存 24 小时,大幅提升后续命令执行速度
26
+ - **备份与恢复**:安装新插件时自动备份 AGENTS.md,支持一键恢复
27
+ - **参数校验**:`--tool` 和 `--level` 参数支持校验,提供友好的错误提示(支持中英文)
28
+ - **智能记忆**:记住上次选择的工具和安装级别,下次运行自动填充
29
+
30
+ ### 安装管理
31
+ - **交互式向导**:箭头键选择,空格切换,回车确认
32
+ - **插件安装**:支持 10 个官方插件,自动处理依赖
33
+ - **Skill 安装**:支持 89 个 Skills,按 11 个类别组织
34
+ - **智能卸载**:根据安装记录精确删除,自动清理空目录
35
+ - **健康检查**:检测安装状态,自动修复常见问题
36
+
21
37
  ## 命令一览
22
38
 
23
39
  | 命令 | 说明 |
@@ -168,6 +184,10 @@ install-helper uninstall ops-direct-invoke --tool opencode
168
184
 
169
185
  ## 可用场景
170
186
 
187
+ install-helper 支持 **10 个官方插件** 和 **89 个 Skills**(动态发现,数量可能随仓库更新而变化)。
188
+
189
+ #### 官方插件
190
+
171
191
  | # | 场景 | ID | 别名 |
172
192
  |---|------|----|------|
173
193
  | 1 | AscendC Kernel 直调 | ops-direct-invoke | ops-direct, direct, kernel |
@@ -181,6 +201,23 @@ install-helper uninstall ops-direct-invoke --tool opencode
181
201
  | 9 | 代码检视 | ops-code-reviewer | code-review, reviewer |
182
202
  | 10 | torch.compile 图模式 | torch-compile | torch, compile |
183
203
 
204
+ #### Skills 类别
205
+
206
+ Skills 按 11 个类别组织(动态发现,数量可能随仓库更新而变化):
207
+ - 知识与参考
208
+ - 环境与工具
209
+ - 调试与诊断
210
+ - 测试与质量
211
+ - AscendC 开发
212
+ - PyPTO 开发
213
+ - TileLang 开发
214
+ - Triton 开发
215
+ - 模型推理优化
216
+ - 图模式
217
+ - 平台工具
218
+
219
+ 使用 `install-helper install --list` 查看完整的 Skills 列表。
220
+
184
221
  ## 前置条件
185
222
 
186
223
  - Node.js >= 18
@@ -192,17 +229,21 @@ install-helper uninstall ops-direct-invoke --tool opencode
192
229
  install-helper 是一个编排工具:
193
230
 
194
231
  1. **自动检测**已安装的 AI 编程工具
195
- 2. **克隆或更新** cannbot-skills 仓库(缓存到 `~/.cannbot/repo/`)
196
- 3. **调用**各插件的 `init.sh` / `install.sh` 脚本执行实际安装
197
- 4. **追踪**安装状态(`~/.cannbot/config.yaml` + manifest)
232
+ 2. **动态扫描**仓库中的 SKILL.md 文件,发现可用 Skills
233
+ 3. **缓存扫描结果**到 `~/.cannbot/scan-cache.json`(24 小时有效)
234
+ 4. **克隆或更新** cannbot-skills 仓库(缓存到 `~/.cannbot/repo/`)
235
+ 5. **备份现有配置**(如果检测到已安装的 AGENTS.md)
236
+ 6. **调用**各插件的 `init.sh` / `install.sh` 脚本执行实际安装
237
+ 7. **追踪**安装状态(`~/.cannbot/config.yaml` + manifest)
198
238
 
199
239
  安装逻辑仍由各插件的 init.sh 脚本负责,install-helper 提供统一的交互式入口和状态管理。
200
240
 
201
241
  ## 配置文件
202
242
 
203
- 配置保存在 `~/.cannbot/config.yaml`:
243
+ 配置保存在 `~/.cannbot/` 目录:
204
244
 
205
245
  ```yaml
246
+ # config.yaml - 用户配置
206
247
  language: zh_CN # 界面语言
207
248
  lastTool: opencode # 上次使用的 AI 工具
208
249
  lastLevel: project # 上次安装级别
@@ -211,6 +252,26 @@ installedPlugins: # 已安装的插件列表
211
252
  - pypto-op-orchestrator
212
253
  ```
213
254
 
255
+ ```json
256
+ // scan-cache.json - 扫描缓存(自动生成,24 小时有效)
257
+ {
258
+ "skills": [...],
259
+ "timestamp": 1234567890,
260
+ "repoPath": "/path/to/repo"
261
+ }
262
+ ```
263
+
264
+ ```json
265
+ // installs/<plugin>.json - 安装记录(每个插件一个文件)
266
+ {
267
+ "pluginId": "ops-direct-invoke",
268
+ "installTime": "2026-06-23T10:00:00Z",
269
+ "configRoot": "/path/to/config",
270
+ "files": [...],
271
+ "directories": [...]
272
+ }
273
+ ```
274
+
214
275
  ## 开发
215
276
 
216
277
  ```bash