@ant-design/cli 6.4.2 → 6.4.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.
- package/README.md +86 -4
- package/README.zh-CN.md +72 -3
- package/data/design-v6.md +288 -0
- package/data/v3.26.20.json.gz +0 -0
- package/data/v3.json.gz +0 -0
- 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.7.json.gz +0 -0
- package/data/v6.4.4.json.gz +0 -0
- package/data/v6.json.gz +0 -0
- package/data/versions.json +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +8912 -10143
- package/package.json +10 -4
- package/skills/antd/SKILL.md +25 -6
- 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.3.6.json.gz +0 -0
- package/data/v6.4.0.json.gz +0 -0
- package/data/v6.4.1.json.gz +0 -0
- package/data/v6.4.2.json.gz +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ant-design/cli",
|
|
3
|
-
"version": "6.4.
|
|
3
|
+
"version": "6.4.4",
|
|
4
4
|
"description": "CLI tool for querying antd knowledge and analyzing antd usage in projects",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -44,17 +44,23 @@
|
|
|
44
44
|
},
|
|
45
45
|
"overrides": {
|
|
46
46
|
"fast-uri": "^3.1.2",
|
|
47
|
-
"hono": "^4.12.
|
|
47
|
+
"hono": "^4.12.23",
|
|
48
48
|
"ip-address": "^10.1.1"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"
|
|
51
|
+
"fast-glob": "^3.3.3",
|
|
52
|
+
"fast-levenshtein": "^3.0.0",
|
|
53
|
+
"oxc-parser": "^0.134.0",
|
|
54
|
+
"semver": "^7.8.0",
|
|
55
|
+
"string-width": "^8.2.1"
|
|
52
56
|
},
|
|
53
57
|
"devDependencies": {
|
|
54
58
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
59
|
+
"@types/fast-levenshtein": "^0.0.4",
|
|
55
60
|
"@types/node": "^25.5.0",
|
|
61
|
+
"@types/semver": "^7.7.1",
|
|
56
62
|
"@vitest/coverage-v8": "^4.1.2",
|
|
57
|
-
"commander": "^
|
|
63
|
+
"commander": "^15.0.0",
|
|
58
64
|
"conf": "^15.1.0",
|
|
59
65
|
"env-paths": "^4.0.0",
|
|
60
66
|
"envinfo": "^7.21.0",
|
package/skills/antd/SKILL.md
CHANGED
|
@@ -9,13 +9,14 @@ allowed-tools:
|
|
|
9
9
|
- Bash(antd *)
|
|
10
10
|
- Bash(antd bug*)
|
|
11
11
|
- Bash(antd bug-cli*)
|
|
12
|
+
- Bash(antd upgrade*)
|
|
12
13
|
- Bash(npm install -g @ant-design/cli*)
|
|
13
14
|
- Bash(which antd)
|
|
14
15
|
---
|
|
15
16
|
|
|
16
17
|
# Ant Design CLI
|
|
17
18
|
|
|
18
|
-
You have access to `@ant-design/cli` — a local CLI tool with bundled antd metadata for
|
|
19
|
+
You have access to `@ant-design/cli` — a local CLI tool with bundled antd metadata for v4/v5/v6 (plus migration guides for v3 → v4, v4 → v5, v5 → v6). Use it to query component knowledge, analyze projects, and guide migrations. All data is offline, no network needed.
|
|
19
20
|
|
|
20
21
|
## Setup
|
|
21
22
|
|
|
@@ -25,7 +26,7 @@ Before first use, check if the CLI is installed. If not, install it automaticall
|
|
|
25
26
|
which antd || npm install -g @ant-design/cli
|
|
26
27
|
```
|
|
27
28
|
|
|
28
|
-
After running any command, if the output contains an "Update available" notice, run `
|
|
29
|
+
After running any command, if the output contains an "Update available" notice, run `antd upgrade` to update before continuing.
|
|
29
30
|
|
|
30
31
|
|
|
31
32
|
**Always use `--format json` for structured output you can parse programmatically.**
|
|
@@ -48,6 +49,9 @@ antd semantic Button --format json
|
|
|
48
49
|
|
|
49
50
|
# Check component-level design tokens for theming
|
|
50
51
|
antd token Button --format json
|
|
52
|
+
|
|
53
|
+
# Get the overall design language (design.md): colors, typography, spacing, radius + principles
|
|
54
|
+
antd design.md --format json
|
|
51
55
|
```
|
|
52
56
|
|
|
53
57
|
**Workflow:** `antd info` → understand props → `antd demo` → grab a working example → write code.
|
|
@@ -93,6 +97,9 @@ antd migrate 4 5 --format json # v4 → v5
|
|
|
93
97
|
# Check migration for a specific component
|
|
94
98
|
antd migrate 4 5 --component Select --format json
|
|
95
99
|
|
|
100
|
+
# Generate agent-friendly auto-migration prompt (does not modify files)
|
|
101
|
+
antd migrate 4 5 --apply ./src --format json
|
|
102
|
+
|
|
96
103
|
# See what changed between two versions
|
|
97
104
|
antd changelog 4.24.0 5.0.0 --format json
|
|
98
105
|
|
|
@@ -218,7 +225,18 @@ antd bug-cli --title "antd info Button returns wrong props for v5.12.0" \
|
|
|
218
225
|
|
|
219
226
|
**Opt-out:** If the environment variable `ANTD_NO_AUTO_REPORT=1` is set, skip all bug-reporting suggestions entirely — do not suggest `antd bug` or `antd bug-cli` unless the user directly asks.
|
|
220
227
|
|
|
221
|
-
### 11.
|
|
228
|
+
### 11. Upgrading the CLI
|
|
229
|
+
|
|
230
|
+
When the user wants to update `@ant-design/cli` to the latest version, or when an "Update available" notice appears:
|
|
231
|
+
|
|
232
|
+
```bash
|
|
233
|
+
# Upgrade to the latest version (auto-detects package manager)
|
|
234
|
+
antd upgrade
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
The command detects which package manager installed the CLI (npm, yarn, pnpm, bun, cnpm, utoo) and runs the appropriate upgrade command. If detection fails, it suggests the manual command.
|
|
238
|
+
|
|
239
|
+
### 12. Using as MCP server
|
|
222
240
|
|
|
223
241
|
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:
|
|
224
242
|
|
|
@@ -233,21 +251,22 @@ If working in an IDE that supports MCP (Claude Desktop, Cursor, etc.), the CLI c
|
|
|
233
251
|
}
|
|
234
252
|
```
|
|
235
253
|
|
|
236
|
-
This provides
|
|
254
|
+
This provides 8 tools (`antd_list`, `antd_info`, `antd_doc`, `antd_demo`, `antd_token`, `antd_design_md`, `antd_semantic`, `antd_changelog`) and 2 prompts (`antd-expert`, `antd-page-generator`) via MCP protocol.
|
|
237
255
|
|
|
238
256
|
## Global Flags
|
|
239
257
|
|
|
240
258
|
| Flag | Purpose |
|
|
241
259
|
|---|---|
|
|
242
|
-
| `--format json`
|
|
260
|
+
| `--format <format>` | Output format: `json`, `text`, or `markdown` (agents should prefer `json`) |
|
|
243
261
|
| `--version <v>` | Target a specific antd version (e.g. `5.20.0`) |
|
|
244
262
|
| `--lang zh` | Chinese output (default: `en`) |
|
|
245
263
|
| `--detail` | Include extra fields (description, since, deprecated, FAQ) |
|
|
264
|
+
| `-V, --cli-version` | Print CLI version and exit |
|
|
246
265
|
|
|
247
266
|
## Key Rules
|
|
248
267
|
|
|
249
268
|
1. **Always query before writing** — Don't guess antd APIs from memory. Run `antd info` first.
|
|
250
|
-
2. **Match the user's version** — If the project uses antd
|
|
269
|
+
2. **Match the user's version** — Knowledge queries (`list/info/doc/demo/token/semantic/changelog`) support antd v4+. If the project uses antd 4.x/5.x/6.x, pass `--version 4.24.0` / `5.24.0` / `6.x`. For antd v3 projects, use `antd migrate 3 4` first.
|
|
251
270
|
3. **Use `--format json`** — Every command supports it. Parse the JSON output rather than regex-matching text output.
|
|
252
271
|
4. **Check before suggesting migration** — Run `antd changelog <v1> <v2>` and `antd migrate` before advising on version upgrades.
|
|
253
272
|
5. **Lint after changes** — After writing or modifying antd code, run `antd lint` on the changed files to catch deprecated or problematic usage.
|
package/data/v6.3.1.json.gz
DELETED
|
Binary file
|
package/data/v6.3.3.json.gz
DELETED
|
Binary file
|
package/data/v6.3.4.json.gz
DELETED
|
Binary file
|
package/data/v6.3.5.json.gz
DELETED
|
Binary file
|
package/data/v6.3.6.json.gz
DELETED
|
Binary file
|
package/data/v6.4.0.json.gz
DELETED
|
Binary file
|
package/data/v6.4.1.json.gz
DELETED
|
Binary file
|
package/data/v6.4.2.json.gz
DELETED
|
Binary file
|