@cnbcool/cnb-cli 1.5.2 → 1.5.4

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/README.md +17 -66
  2. package/dist/index.js +35 -35
  3. package/package.json +4 -3
package/README.md CHANGED
@@ -1,110 +1,61 @@
1
1
  # CNB Skills
2
2
 
3
- CNB 平台技能集合,在一个仓库中维护多个 CodeBuddy Skill,可通过 `npx skills` 便捷安装。
3
+ CNB 平台技能集合,支持 CodeBuddy,通过 `npx skills` 安装。
4
4
 
5
5
  ## 安装方式
6
6
 
7
7
  ### 安装 skills
8
8
 
9
9
  ```bash
10
- # 一键安装所有 Skill
11
10
  npx skills add https://cnb.cool/cnb/skills/cnb-skill.git --agent codebuddy -y
12
11
  ```
13
12
 
14
13
  ### 只安装指定的 Skill
15
14
 
16
15
  ```bash
17
- # 列出所有可用的 Skill
18
16
  npx skills add https://cnb.cool/cnb/skills/cnb-skill.git --list
19
-
20
- # 安装单个 Skill
21
17
  npx skills add https://cnb.cool/cnb/skills/cnb-skill.git --skill cnb-api --agent codebuddy -y
22
-
23
- # 安装多个指定 Skill
24
- npx skills add https://cnb.cool/cnb/skills/cnb-skill.git --skill cnb-api --skill code-review --skill pr-diff --agent codebuddy -y
25
18
  ```
26
19
 
27
20
  ### 安装 cnb-cli
28
21
 
29
- 使用 cnb-skills 还需安装 cnb-cli,支持以下安装方式:
30
-
31
- #### 方式一:一键安装脚本(推荐)
32
-
33
- 自动检测操作系统和 CPU 架构,下载对应的二进制文件:
34
-
35
- **Linux / macOS**:
22
+ 使用 skills 需先安装 cnb-cli,支持以下方式:
36
23
 
37
24
  ```bash
25
+ # 一键安装最新版(macOS / Linux)
38
26
  curl -fsSL https://cnb.cool/cnb/skills/cnb-skill/-/git/raw/main/install.sh | sh
39
- ```
40
27
 
41
- 安装指定版本:
42
-
43
- ```bash
44
- curl -fsSL https://cnb.cool/cnb/skills/cnb-skill/-/git/raw/main/install.sh | sh -s 1.4.5
28
+ # 一键安装指定版本(macOS / Linux)
29
+ curl -fsSL https://cnb.cool/cnb/skills/cnb-skill/-/git/raw/main/install.sh | sh -s 1.5.3
45
30
  ```
46
31
 
47
- **Windows(PowerShell)**:
48
-
49
32
  ```powershell
33
+ # 一键安装最新版(Windows PowerShell)
50
34
  irm https://cnb.cool/cnb/skills/cnb-skill/-/git/raw/main/install.ps1 | iex
51
- ```
52
-
53
- 安装指定版本:
54
35
 
55
- ```powershell
56
- $v="1.4.3"; irm https://cnb.cool/cnb/skills/cnb-skill/-/git/raw/main/install.ps1 | iex
36
+ # 一键安装指定版本(Windows PowerShell)
37
+ $v="1.5.3"; irm https://cnb.cool/cnb/skills/cnb-skill/-/git/raw/main/install.ps1 | iex
57
38
  ```
58
39
 
59
- #### 方式二:手动下载
60
-
61
- 前往 [Releases](https://cnb.cool/cnb/skills/cnb-skill/-/releases) 页面,下载最新版本中对应平台的文件:
62
-
63
- | 平台 | 文件名 |
64
- | --------------------- | --------------------- |
65
- | macOS (Apple Silicon) | `cnb-darwin-arm64` |
66
- | macOS (Intel) | `cnb-darwin-x64` |
67
- | Linux (x64) | `cnb-linux-x64` |
68
- | Linux (ARM64) | `cnb-linux-arm64` |
69
- | Windows (x64) | `cnb-windows-x64.exe` |
70
-
71
- 下载后将文件重命名为 `cnb`(Windows 为 `cnb.exe`),放入 PATH 目录中即可使用。
72
-
73
- #### 方式三:npm 安装
74
-
75
40
  ```bash
76
- # 运行环境要求 Node.js 20.x 及以上版本
41
+ # npm 安装
77
42
  npm install @cnbcool/cnb-cli -g
78
43
  ```
79
44
 
80
- 安装完成后运行 `cnb --help` 验证是否安装成功。
45
+ 也可前往 [Releases](https://cnb.cool/cnb/skills/cnb-skill/-/releases) 手动下载(最新版直链:`https://cnb.cool/cnb/skills/cnb-skill/-/releases/latest/download/<filename>`)。
81
46
 
82
47
  ## AI 安装提示词
83
48
 
84
- 将以下提示词复制后发送给 AI 智能体(如 CodeBuddy),即可自动完成所有安装:
49
+ 将以下内容发送给 CodeBuddy 等智能体即可自动安装:
85
50
 
86
51
  ```
87
- 请帮我安装 CNB Skills 的运行环境,依次执行以下步骤:
88
-
89
- 1. 全局安装 cnb-cli:
90
- npm install @cnbcool/cnb-cli -g
91
- 安装完成后运行 cnb --help 验证是否安装成功。
92
-
93
- 2. 全局安装 skills 工具:
94
- npm install skills -g
95
-
96
- 3. 通过 skills 工具安装所有 skill 到当前工作目录:
97
- npx skills add https://cnb.cool/cnb/skills/cnb-skill.git --agent codebuddy -y --copy
98
-
99
- 每一步执行完后告诉我结果,如果有报错请帮我解决。
52
+ npm install @cnbcool/cnb-cli -g
53
+ npm install skills -g
54
+ npx skills add https://cnb.cool/cnb/skills/cnb-skill.git --agent codebuddy -y --copy
100
55
  ```
101
56
 
102
57
  ## 环境变量
103
58
 
104
- - **CNB_TOKEN** — 访问凭证(必须)
105
- - **CNB_API_ENDPOINT** API 端点地址(必须),示例:`https://api.cnb.cool`
106
- - **CNB_BRANCH** — 默认分支(选填),示例:`main`
107
-
108
- ## 关键词
109
-
110
- CNB、云原生构建、组织、代码仓库、Issue、PR、合并请求、流水线、代码评审、CI/CD
59
+ - `CNB_TOKEN`:访问凭证(必须)
60
+ - `CNB_API_ENDPOINT`:API 端点,如 `https://api.cnb.cool`(必须)
61
+ - `CNB_BRANCH`:默认分支(选填)