@ant-design/cli 6.3.4 → 6.3.5
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 +73 -1
- package/README.zh-CN.md +73 -1
- package/data/v4.0.4.json.gz +0 -0
- package/data/v4.1.5.json.gz +0 -0
- package/data/v4.10.3.json.gz +0 -0
- package/data/v4.11.3.json.gz +0 -0
- package/data/v4.12.3.json.gz +0 -0
- package/data/v4.13.1.json.gz +0 -0
- package/data/v4.14.1.json.gz +0 -0
- package/data/v4.15.6.json.gz +0 -0
- package/data/v4.16.13.json.gz +0 -0
- package/data/v4.17.4.json.gz +0 -0
- package/data/v4.18.9.json.gz +0 -0
- package/data/v4.19.5.json.gz +0 -0
- package/data/v4.2.5.json.gz +0 -0
- package/data/v4.20.7.json.gz +0 -0
- package/data/v4.21.7.json.gz +0 -0
- package/data/v4.22.8.json.gz +0 -0
- package/data/v4.23.6.json.gz +0 -0
- package/data/v4.24.16.json.gz +0 -0
- package/data/v4.3.5.json.gz +0 -0
- package/data/v4.4.3.json.gz +0 -0
- package/data/v4.5.4.json.gz +0 -0
- package/data/v4.6.6.json.gz +0 -0
- package/data/v4.7.3.json.gz +0 -0
- package/data/v4.8.6.json.gz +0 -0
- package/data/v4.9.4.json.gz +0 -0
- package/data/v4.json.gz +0 -0
- package/data/v5.0.7.json.gz +0 -0
- package/data/v5.1.7.json.gz +0 -0
- package/data/v5.10.3.json.gz +0 -0
- package/data/v5.11.5.json.gz +0 -0
- package/data/v5.12.8.json.gz +0 -0
- package/data/v5.13.3.json.gz +0 -0
- package/data/v5.14.2.json.gz +0 -0
- package/data/v5.15.4.json.gz +0 -0
- package/data/v5.16.5.json.gz +0 -0
- package/data/v5.17.4.json.gz +0 -0
- package/data/v5.18.3.json.gz +0 -0
- package/data/v5.19.4.json.gz +0 -0
- package/data/v5.2.3.json.gz +0 -0
- package/data/v5.20.6.json.gz +0 -0
- package/data/v5.21.6.json.gz +0 -0
- package/data/v5.22.7.json.gz +0 -0
- package/data/v5.23.4.json.gz +0 -0
- package/data/v5.24.9.json.gz +0 -0
- package/data/v5.25.4.json.gz +0 -0
- package/data/v5.26.7.json.gz +0 -0
- package/data/v5.27.6.json.gz +0 -0
- package/data/v5.28.1.json.gz +0 -0
- package/data/v5.29.3.json.gz +0 -0
- package/data/v5.3.3.json.gz +0 -0
- package/data/v5.4.7.json.gz +0 -0
- package/data/v5.5.2.json.gz +0 -0
- package/data/v5.6.4.json.gz +0 -0
- package/data/v5.7.3.json.gz +0 -0
- package/data/v5.8.6.json.gz +0 -0
- package/data/v5.9.4.json.gz +0 -0
- package/data/v5.json.gz +0 -0
- package/data/v6.0.1.json.gz +0 -0
- package/data/v6.1.4.json.gz +0 -0
- package/data/v6.2.3.json.gz +0 -0
- package/data/v6.3.1.json.gz +0 -0
- package/data/v6.3.3.json.gz +0 -0
- package/data/v6.3.4.json.gz +0 -0
- package/data/v6.3.5.json.gz +0 -0
- package/data/v6.json.gz +0 -0
- package/data/versions.json +1 -1
- package/dist/index.js +31339 -2405
- package/package.json +6 -2
- package/skills/antd/SKILL.md +47 -4
- package/dist/index.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ant-design/cli",
|
|
3
|
-
"version": "6.3.
|
|
3
|
+
"version": "6.3.5",
|
|
4
4
|
"description": "CLI tool for querying antd knowledge and analyzing antd usage in projects",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -43,10 +43,14 @@
|
|
|
43
43
|
"access": "public"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"
|
|
46
|
+
"oxc-parser": "^0.121.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
+
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
49
50
|
"@types/node": "^25.5.0",
|
|
51
|
+
"@vitest/coverage-v8": "^3.2.4",
|
|
52
|
+
"commander": "~13.1.0",
|
|
53
|
+
"envinfo": "^7.21.0",
|
|
50
54
|
"gray-matter": "^4.0.3",
|
|
51
55
|
"tsup": "^8.4.0",
|
|
52
56
|
"tsx": "^4.19.0",
|
package/skills/antd/SKILL.md
CHANGED
|
@@ -25,6 +25,8 @@ Before first use, check if the CLI is installed. If not, install it automaticall
|
|
|
25
25
|
which antd || npm install -g @ant-design/cli
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
+
After running any command, if the output contains an "Update available" notice, run `npm install -g @ant-design/cli` to update before continuing.
|
|
29
|
+
|
|
28
30
|
|
|
29
31
|
**Always use `--format json` for structured output you can parse programmatically.**
|
|
30
32
|
|
|
@@ -64,6 +66,9 @@ antd doc Table --lang zh # Chinese docs
|
|
|
64
66
|
When code isn't working as expected or the user reports an antd bug:
|
|
65
67
|
|
|
66
68
|
```bash
|
|
69
|
+
# Collect full environment snapshot (system, deps, browsers, build tools)
|
|
70
|
+
antd env --format json
|
|
71
|
+
|
|
67
72
|
# Check if the prop exists for the user's antd version
|
|
68
73
|
antd info Select --version 5.12.0 --format json
|
|
69
74
|
|
|
@@ -74,7 +79,7 @@ antd lint ./src/components/MyForm.tsx --format json
|
|
|
74
79
|
antd doctor --format json
|
|
75
80
|
```
|
|
76
81
|
|
|
77
|
-
**Workflow:** `antd doctor` → check
|
|
82
|
+
**Workflow:** `antd env` → capture full environment → `antd doctor` → check configuration → `antd info --version X` → verify API against the user's exact version → `antd lint` → find deprecated or incorrect usage.
|
|
78
83
|
|
|
79
84
|
### 4. Migrating between versions
|
|
80
85
|
|
|
@@ -140,11 +145,32 @@ antd list --format json
|
|
|
140
145
|
antd list --version 5.0.0 --format json
|
|
141
146
|
```
|
|
142
147
|
|
|
143
|
-
### 8.
|
|
148
|
+
### 8. Collecting environment info
|
|
149
|
+
|
|
150
|
+
When you need to understand the project's antd setup, or prepare info for a bug report:
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
# Full environment snapshot (text — paste into GitHub Issues)
|
|
154
|
+
antd env
|
|
155
|
+
|
|
156
|
+
# Structured JSON for programmatic use
|
|
157
|
+
antd env --format json
|
|
158
|
+
|
|
159
|
+
# Scan a specific project directory
|
|
160
|
+
antd env ./my-project --format json
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
Collects: OS, Node, package managers (npm/pnpm/yarn/bun/utoo), npm registry, browsers, core deps (antd/react/dayjs), all `@ant-design/*` and `rc-*` packages, and build tools (umi/vite/webpack/typescript/etc.).
|
|
164
|
+
|
|
165
|
+
### 9. Reporting antd bugs
|
|
144
166
|
|
|
145
167
|
When you encounter a confirmed antd component bug that can't be resolved locally:
|
|
146
168
|
|
|
147
169
|
```bash
|
|
170
|
+
# Step 0: Collect environment info for reference (optional — antd bug already embeds basic env)
|
|
171
|
+
# Use the output to cross-check versions or attach extra details to the bug report
|
|
172
|
+
antd env --format json
|
|
173
|
+
|
|
148
174
|
# Step 1: Preview for user review
|
|
149
175
|
antd bug --title "DatePicker crashes when selecting date" \
|
|
150
176
|
--reproduction "https://codesandbox.io/s/xxx" \
|
|
@@ -164,7 +190,7 @@ antd bug --title "DatePicker crashes when selecting date" \
|
|
|
164
190
|
--submit
|
|
165
191
|
```
|
|
166
192
|
|
|
167
|
-
###
|
|
193
|
+
### 10. Auto-reporting CLI issues
|
|
168
194
|
|
|
169
195
|
**IMPORTANT: Whenever you use any `antd` CLI command and notice something wrong, you should proactively initiate a bug report using `antd bug-cli`.**
|
|
170
196
|
|
|
@@ -203,6 +229,23 @@ antd bug-cli --title "antd info Button returns wrong props for v5.12.0" \
|
|
|
203
229
|
|
|
204
230
|
**Key principle:** You are a quality feedback loop for the CLI. Don't silently work around CLI issues — report them so they get fixed. Always confirm with the user before submitting.
|
|
205
231
|
|
|
232
|
+
### 11. Using as MCP server
|
|
233
|
+
|
|
234
|
+
If working in an IDE that supports MCP (Claude Desktop, Cursor, etc.), the CLI can also run as an MCP server, exposing all knowledge-query tools directly:
|
|
235
|
+
|
|
236
|
+
```json
|
|
237
|
+
{
|
|
238
|
+
"mcpServers": {
|
|
239
|
+
"antd": {
|
|
240
|
+
"command": "antd",
|
|
241
|
+
"args": ["mcp", "--version", "5.20.0"]
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
This provides 7 tools (`antd_list`, `antd_info`, `antd_doc`, `antd_demo`, `antd_token`, `antd_semantic`, `antd_changelog`) and 2 prompts (`antd-expert`, `antd-page-generator`) via MCP protocol.
|
|
248
|
+
|
|
206
249
|
## Global Flags
|
|
207
250
|
|
|
208
251
|
| Flag | Purpose |
|
|
@@ -219,5 +262,5 @@ antd bug-cli --title "antd info Button returns wrong props for v5.12.0" \
|
|
|
219
262
|
3. **Use `--format json`** — Every command supports it. Parse the JSON output rather than regex-matching text output.
|
|
220
263
|
4. **Check before suggesting migration** — Run `antd changelog <v1> <v2>` and `antd migrate` before advising on version upgrades.
|
|
221
264
|
5. **Lint after changes** — After writing or modifying antd code, run `antd lint` on the changed files to catch deprecated or problematic usage.
|
|
222
|
-
6. **Report antd bugs** —
|
|
265
|
+
6. **Report antd bugs** — First run `antd env` to capture the full environment, then use `antd bug` to report. Always preview first, get user confirmation, then submit.
|
|
223
266
|
7. **Auto-report CLI issues** — If any `antd` command crashes, returns wrong data, or behaves inconsistently, proactively use `antd bug-cli` to report it. You are the quality feedback loop for the CLI — don't silently work around issues.
|