@collectui/cli 0.2.48 → 0.2.49
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 +34 -34
- package/package.json +1 -2
- package/src/skill/SKILL.md +13 -13
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@ CollectUI Dash 的 shadcn 三方库统一 CLI。一个命令完成:
|
|
|
18
18
|
npx @collectui/cli --help
|
|
19
19
|
# 或全局
|
|
20
20
|
npm i -g @collectui/cli
|
|
21
|
-
|
|
21
|
+
cui --version
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
要求 Node ≥ 18.17。
|
|
@@ -26,7 +26,7 @@ collectui --version
|
|
|
26
26
|
## 登录
|
|
27
27
|
|
|
28
28
|
```bash
|
|
29
|
-
|
|
29
|
+
cui login
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
**OAuth 式浏览器授权**:CLI 起一个本机回调监听并打开 Dash 的 `/authorize` 授权页,
|
|
@@ -36,9 +36,9 @@ collectui login
|
|
|
36
36
|
无浏览器场景(CI / ssh / 远程机):
|
|
37
37
|
|
|
38
38
|
```bash
|
|
39
|
-
|
|
40
|
-
COLLECTUI_TOKEN=dpat_...
|
|
41
|
-
|
|
39
|
+
cui login --pat # 终端粘贴 PAT(隐藏输入)
|
|
40
|
+
COLLECTUI_TOKEN=dpat_... cui whoami --json # 或完全 headless
|
|
41
|
+
cui login --token dpat_... --json # 或显式传入
|
|
42
42
|
```
|
|
43
43
|
|
|
44
44
|
> 授权页与 PAT 创建都在 Dash 完成(服务端只把明文回传给 `127.0.0.1`/`localhost`
|
|
@@ -47,8 +47,8 @@ collectui login --token dpat_... --json # 或显式传入
|
|
|
47
47
|
## 看账户与库
|
|
48
48
|
|
|
49
49
|
```bash
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
cui whoami # 我是谁 + 我的库:账户信息、每个库是否拥有、CLI/MCP key 状态
|
|
51
|
+
cui whoami --json # Agent 用(account + sites + keys 脱敏 + libraries)
|
|
52
52
|
```
|
|
53
53
|
|
|
54
54
|
## 一键配置到项目
|
|
@@ -56,11 +56,11 @@ collectui whoami --json # Agent 用(account + sites + keys 脱敏 + librarie
|
|
|
56
56
|
在已有 shadcn 项目里:
|
|
57
57
|
|
|
58
58
|
```bash
|
|
59
|
-
|
|
59
|
+
cui configure . --libs all
|
|
60
60
|
# 指定库
|
|
61
|
-
|
|
61
|
+
cui configure . --libs reui,arc,bits
|
|
62
62
|
# 先看计划
|
|
63
|
-
|
|
63
|
+
cui configure . --libs all --dry-run
|
|
64
64
|
```
|
|
65
65
|
|
|
66
66
|
会做这些事(每步都会打印):
|
|
@@ -87,14 +87,14 @@ collectui configure . --libs all --dry-run
|
|
|
87
87
|
|
|
88
88
|
## 从零初始化一个 shadcn 项目
|
|
89
89
|
|
|
90
|
-
**默认就在系统临时目录建一个验证项目**,不碰当前目录——`
|
|
90
|
+
**默认就在系统临时目录建一个验证项目**,不碰当前目录——`cui init` 什么都不带
|
|
91
91
|
就是一条「从零验证」命令:
|
|
92
92
|
|
|
93
93
|
```bash
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
94
|
+
cui init --libs all # /tmp/collectui-app(OS temp dir)
|
|
95
|
+
cui init --name demo --libs reui,arc # <temp>/demo
|
|
96
|
+
cui init /path/to/app --libs all # 指定任意目录
|
|
97
|
+
cui init --libs all --dry-run # 只看计划
|
|
98
98
|
```
|
|
99
99
|
|
|
100
100
|
默认模板:Vite + React + TypeScript + Tailwind v4 + shadcn 兼容
|
|
@@ -104,12 +104,12 @@ collectui init --libs all --dry-run # 只看计划
|
|
|
104
104
|
## 装组件
|
|
105
105
|
|
|
106
106
|
```bash
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
107
|
+
cui add reui data-grid
|
|
108
|
+
cui add reui data-grid kanban
|
|
109
|
+
cui add arc pro/dock # 自动选 @uiarc-pro
|
|
110
|
+
cui add studio blocks/hero-01 # 自动选 @ss-blocks
|
|
111
|
+
cui add 21st shugar/button-1
|
|
112
|
+
cui add reui data-grid --print # 只打印命令
|
|
113
113
|
```
|
|
114
114
|
|
|
115
115
|
- 所有库统一走 shadcn registry → `npx shadcn@latest add @scope/<component> --yes`
|
|
@@ -119,24 +119,24 @@ collectui add reui data-grid --print # 只打印命令
|
|
|
119
119
|
## MCP 配置
|
|
120
120
|
|
|
121
121
|
```bash
|
|
122
|
-
|
|
123
|
-
|
|
122
|
+
cui mcp show # 打印按 client 分组的 MCP 配置
|
|
123
|
+
cui mcp init # 只写/合并 MCP 配置
|
|
124
124
|
```
|
|
125
125
|
|
|
126
126
|
CollectUI MCP(server 名 `collectui`)是 **Agent 专用**通道:端点
|
|
127
127
|
`https://dash.collectui.pro/api/mcp`(Bearer PAT),工具 `me`、
|
|
128
128
|
`list_repos`、`download_repo`、`get_site_docs` 等——Agent 用自己的
|
|
129
|
-
MCP client 直接调,CLI 不提供转发。人查账户用 `
|
|
129
|
+
MCP client 直接调,CLI 不提供转发。人查账户用 `cui whoami`,
|
|
130
130
|
可下仓库/反馈/订单在 Dash 站点看。
|
|
131
131
|
|
|
132
132
|
## 无头 / Agent 驱动
|
|
133
133
|
|
|
134
134
|
```bash
|
|
135
135
|
# 所有命令都支持 --json:stdout 逐行 JSON event,最后一条是 result
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
136
|
+
cui whoami --json
|
|
137
|
+
cui init /tmp/app --libs all --yes --no-install --json
|
|
138
|
+
cui configure . --libs all --yes --json
|
|
139
|
+
cui doctor --json
|
|
140
140
|
```
|
|
141
141
|
|
|
142
142
|
约定:
|
|
@@ -151,15 +151,15 @@ collectui doctor --json
|
|
|
151
151
|
装 Agent skill:
|
|
152
152
|
|
|
153
153
|
```bash
|
|
154
|
-
|
|
155
|
-
|
|
154
|
+
cui skill # .claude/skills/collectui/SKILL.md
|
|
155
|
+
cui skill --global # ~/.claude/skills/collectui/SKILL.md
|
|
156
156
|
```
|
|
157
157
|
|
|
158
158
|
## 体检
|
|
159
159
|
|
|
160
160
|
```bash
|
|
161
|
-
|
|
162
|
-
|
|
161
|
+
cui doctor # 登录、account、Dash MCP、项目 registries/env/MCP
|
|
162
|
+
cui doctor --deep # 再对每个已拥有库做一次 registry 探测(会消耗额度,慎用)
|
|
163
163
|
```
|
|
164
164
|
|
|
165
165
|
## 更新检查
|
|
@@ -168,8 +168,8 @@ collectui doctor --deep # 再对每个已拥有库做一次 registry 探测
|
|
|
168
168
|
发现新版会在启动或收尾时打一行提醒,装不装由你决定:
|
|
169
169
|
|
|
170
170
|
```bash
|
|
171
|
-
|
|
172
|
-
|
|
171
|
+
cui update # 手动更新(前台看着装)
|
|
172
|
+
cui update --check # 只查不装
|
|
173
173
|
```
|
|
174
174
|
|
|
175
175
|
- `COLLECTUI_NO_AUTO_UPDATE=1`:连检查带提醒全静默(CI / Agent 用)
|
package/package.json
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@collectui/cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.49",
|
|
4
4
|
"description": "One CLI for every shadcn library on CollectUI Dash — login once, configure registries & MCP, scaffold agent-ready projects.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"bin": {
|
|
8
|
-
"collectui": "src/cli.mjs",
|
|
9
8
|
"cui": "src/cli.mjs"
|
|
10
9
|
},
|
|
11
10
|
"files": [
|
package/src/skill/SKILL.md
CHANGED
|
@@ -27,7 +27,7 @@ never stores upstream vendor accounts.
|
|
|
27
27
|
### Inspect the account
|
|
28
28
|
|
|
29
29
|
```bash
|
|
30
|
-
|
|
30
|
+
cui whoami --json
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
The result has `account` and `libraries`: one row per library with `site`,
|
|
@@ -40,7 +40,7 @@ ThreeUI, Aura and HeroUI ship their own installers and are out of scope.
|
|
|
40
40
|
### Configure an existing project
|
|
41
41
|
|
|
42
42
|
```bash
|
|
43
|
-
|
|
43
|
+
cui configure /path/to/project --libs reui,arc --yes --json
|
|
44
44
|
```
|
|
45
45
|
|
|
46
46
|
This writes/merges:
|
|
@@ -56,8 +56,8 @@ This writes/merges:
|
|
|
56
56
|
### Scaffold under /tmp
|
|
57
57
|
|
|
58
58
|
```bash
|
|
59
|
-
|
|
60
|
-
# or:
|
|
59
|
+
cui init /tmp/my-app --libs all --yes --json --no-install
|
|
60
|
+
# or: cui init --tmp --name my-app --libs reui
|
|
61
61
|
```
|
|
62
62
|
|
|
63
63
|
Default template is Vite + React + TS + Tailwind v4 + a shadcn-compatible
|
|
@@ -67,10 +67,10 @@ Default template is Vite + React + TS + Tailwind v4 + a shadcn-compatible
|
|
|
67
67
|
### Install components
|
|
68
68
|
|
|
69
69
|
```bash
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
70
|
+
cui add reui data-grid
|
|
71
|
+
cui add arc pro/dock
|
|
72
|
+
cui add studio blocks/hero-01
|
|
73
|
+
cui add 21st shugar/button-1
|
|
74
74
|
```
|
|
75
75
|
|
|
76
76
|
Every library installs through `npx shadcn@latest add @scope/<component>
|
|
@@ -93,14 +93,14 @@ data through the CLI — it has no such commands.
|
|
|
93
93
|
To inspect or re-write the MCP config itself:
|
|
94
94
|
|
|
95
95
|
```bash
|
|
96
|
-
|
|
96
|
+
cui mcp show --json
|
|
97
97
|
```
|
|
98
98
|
|
|
99
99
|
### Verify
|
|
100
100
|
|
|
101
101
|
```bash
|
|
102
|
-
|
|
103
|
-
|
|
102
|
+
cui doctor --json
|
|
103
|
+
cui doctor --deep --json # probe every owned registry (uses quota; sparingly)
|
|
104
104
|
```
|
|
105
105
|
|
|
106
106
|
## Login
|
|
@@ -108,14 +108,14 @@ collectui doctor --deep --json # probe every owned registry (uses quota; spari
|
|
|
108
108
|
In an interactive terminal:
|
|
109
109
|
|
|
110
110
|
```bash
|
|
111
|
-
|
|
111
|
+
cui login
|
|
112
112
|
```
|
|
113
113
|
|
|
114
114
|
It opens `https://dash.collectui.pro/login` in the browser, waits for a
|
|
115
115
|
localhost callback, and otherwise asks for the PAT (hidden input). Headless:
|
|
116
116
|
|
|
117
117
|
```bash
|
|
118
|
-
COLLECTUI_TOKEN=dpat_...
|
|
118
|
+
COLLECTUI_TOKEN=dpat_... cui whoami --json
|
|
119
119
|
```
|
|
120
120
|
|
|
121
121
|
## Security
|