@ant-design/cli 6.3.5-beta.0 → 6.3.6

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 (75) hide show
  1. package/README.md +67 -1
  2. package/README.zh-CN.md +67 -1
  3. package/data/v3.26.20.json.gz +0 -0
  4. package/data/v3.json.gz +0 -0
  5. package/data/v4.0.4.json.gz +0 -0
  6. package/data/v4.1.5.json.gz +0 -0
  7. package/data/v4.10.3.json.gz +0 -0
  8. package/data/v4.11.3.json.gz +0 -0
  9. package/data/v4.12.3.json.gz +0 -0
  10. package/data/v4.13.1.json.gz +0 -0
  11. package/data/v4.14.1.json.gz +0 -0
  12. package/data/v4.15.6.json.gz +0 -0
  13. package/data/v4.16.13.json.gz +0 -0
  14. package/data/v4.17.4.json.gz +0 -0
  15. package/data/v4.18.9.json.gz +0 -0
  16. package/data/v4.19.5.json.gz +0 -0
  17. package/data/v4.2.5.json.gz +0 -0
  18. package/data/v4.20.7.json.gz +0 -0
  19. package/data/v4.21.7.json.gz +0 -0
  20. package/data/v4.22.8.json.gz +0 -0
  21. package/data/v4.23.6.json.gz +0 -0
  22. package/data/v4.24.16.json.gz +0 -0
  23. package/data/v4.3.5.json.gz +0 -0
  24. package/data/v4.4.3.json.gz +0 -0
  25. package/data/v4.5.4.json.gz +0 -0
  26. package/data/v4.6.6.json.gz +0 -0
  27. package/data/v4.7.3.json.gz +0 -0
  28. package/data/v4.8.6.json.gz +0 -0
  29. package/data/v4.9.4.json.gz +0 -0
  30. package/data/v4.json.gz +0 -0
  31. package/data/v5.0.7.json.gz +0 -0
  32. package/data/v5.1.7.json.gz +0 -0
  33. package/data/v5.10.3.json.gz +0 -0
  34. package/data/v5.11.5.json.gz +0 -0
  35. package/data/v5.12.8.json.gz +0 -0
  36. package/data/v5.13.3.json.gz +0 -0
  37. package/data/v5.14.2.json.gz +0 -0
  38. package/data/v5.15.4.json.gz +0 -0
  39. package/data/v5.16.5.json.gz +0 -0
  40. package/data/v5.17.4.json.gz +0 -0
  41. package/data/v5.18.3.json.gz +0 -0
  42. package/data/v5.19.4.json.gz +0 -0
  43. package/data/v5.2.3.json.gz +0 -0
  44. package/data/v5.20.6.json.gz +0 -0
  45. package/data/v5.21.6.json.gz +0 -0
  46. package/data/v5.22.7.json.gz +0 -0
  47. package/data/v5.23.4.json.gz +0 -0
  48. package/data/v5.24.9.json.gz +0 -0
  49. package/data/v5.25.4.json.gz +0 -0
  50. package/data/v5.26.7.json.gz +0 -0
  51. package/data/v5.27.6.json.gz +0 -0
  52. package/data/v5.28.1.json.gz +0 -0
  53. package/data/v5.29.3.json.gz +0 -0
  54. package/data/v5.3.3.json.gz +0 -0
  55. package/data/v5.4.7.json.gz +0 -0
  56. package/data/v5.5.2.json.gz +0 -0
  57. package/data/v5.6.4.json.gz +0 -0
  58. package/data/v5.7.3.json.gz +0 -0
  59. package/data/v5.8.6.json.gz +0 -0
  60. package/data/v5.9.4.json.gz +0 -0
  61. package/data/v5.json.gz +0 -0
  62. package/data/v6.0.1.json.gz +0 -0
  63. package/data/v6.1.4.json.gz +0 -0
  64. package/data/v6.2.3.json.gz +0 -0
  65. package/data/v6.3.1.json.gz +0 -0
  66. package/data/v6.3.3.json.gz +0 -0
  67. package/data/v6.3.4.json.gz +0 -0
  68. package/data/v6.3.5.json.gz +0 -0
  69. package/data/v6.3.6.json.gz +0 -0
  70. package/data/v6.json.gz +0 -0
  71. package/data/versions.json +4 -1
  72. package/dist/index.js +31473 -2274
  73. package/package.json +9 -7
  74. package/skills/antd/SKILL.md +35 -23
  75. package/dist/index.js.map +0 -1
package/README.md CHANGED
@@ -14,6 +14,7 @@ Query component knowledge, analyze project usage, and guide migrations — fully
14
14
  [![npm version](https://img.shields.io/npm/v/@ant-design/cli?color=blue&label=npm)](https://www.npmjs.com/package/@ant-design/cli)
15
15
  [![npm downloads](https://img.shields.io/npm/dm/@ant-design/cli?color=blue)](https://www.npmjs.com/package/@ant-design/cli)
16
16
  [![CI](https://github.com/ant-design/ant-design-cli/actions/workflows/ci.yml/badge.svg)](https://github.com/ant-design/ant-design-cli/actions/workflows/ci.yml)
17
+ [![codecov](https://codecov.io/gh/ant-design/ant-design-cli/branch/main/graph/badge.svg)](https://codecov.io/gh/ant-design/ant-design-cli)
17
18
  [![install size](https://packagephobia.com/badge?p=@ant-design/cli)](https://packagephobia.com/result?p=@ant-design/cli)
18
19
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](./LICENSE)
19
20
 
@@ -40,7 +41,7 @@ npx skills add ant-design/ant-design-cli # install as an agent skill
40
41
  - 🤖 **Agent-optimized** — `--format json` on every command. Structured errors with codes and suggestions. Clean stdout/stderr separation.
41
42
  - 🌍 **Bilingual** — Every component name, description, and doc has both English and Chinese. Switch with `--lang zh`.
42
43
  - 🔮 **Smart matching** — Typo `Buttn`? The CLI suggests `Button` using Levenshtein distance, with first-letter preference.
43
- - 🧩 **14 commands** — From prop lookup to project-wide lint, from design token queries to cross-version API diffing.
44
+ - 🧩 **15 commands** — From prop lookup to project-wide lint, from design token queries to cross-version API diffing.
44
45
  - 🔌 **MCP server** — `antd mcp` starts a stdio server for native IDE integration (Claude Desktop, Cursor).
45
46
 
46
47
  <br>
@@ -103,12 +104,16 @@ This exposes 7 tools (`antd_list`, `antd_info`, `antd_doc`, `antd_demo`, `antd_t
103
104
  ## 🚀 Quick Start
104
105
 
105
106
  ```bash
107
+ antd list # All components with versions
106
108
  antd info Button # Component props, types, defaults
109
+ antd doc Button # Full markdown documentation
107
110
  antd demo Select basic # Runnable demo source code
108
111
  antd token DatePicker # Design Token values (v5+)
109
112
  antd semantic Table # classNames / styles structure
110
113
  antd changelog 4.24.0 5.0.0 Select # API diff across versions
111
114
  antd doctor # Diagnose project issues
115
+ antd env # Collect env info for bug reports
116
+ antd usage ./src # Analyze antd imports in project
112
117
  antd lint ./src # Check deprecated APIs & best practices
113
118
  antd migrate 4 5 --apply ./src # Agent-ready migration prompt
114
119
  ```
@@ -134,6 +139,7 @@ antd migrate 4 5 --apply ./src # Agent-ready migration prompt
134
139
  | Command | Description |
135
140
  |---|---|
136
141
  | [`antd doctor`](#antd-doctor) | 10 diagnostic checks: React compat, duplicates, peer deps, SSR, babel plugins |
142
+ | [`antd env [dir]`](#antd-env-dir) | Collect all antd-related environment info for bug reporting or AI diagnosis |
137
143
  | [`antd usage [dir]`](#antd-usage-dir) | Import stats, sub-component breakdown (`Form.Item`), non-component exports |
138
144
  | [`antd lint [target]`](#antd-lint-target) | Deprecated APIs, accessibility gaps, performance issues, best practices |
139
145
  | [`antd migrate <from> <to>`](#antd-migrate-from-to) | Migration checklist with auto-fixable/manual split and `--apply` agent prompt |
@@ -271,6 +277,55 @@ antd doctor
271
277
  antd doctor --format json
272
278
  ```
273
279
 
280
+ ### `antd env [dir]`
281
+
282
+ Collect all antd-related environment information — system, Node, package managers, browsers, dependencies, ecosystem packages (`@ant-design/*`, `rc-*`), and build tools — in one shot.
283
+
284
+ ```bash
285
+ antd env # text output (paste into GitHub Issues)
286
+ antd env --format json # structured JSON for AI consumption
287
+ antd env --format markdown # markdown tables
288
+ antd env ./my-project # scan a specific project directory
289
+ ```
290
+
291
+ <details>
292
+ <summary>Example output</summary>
293
+
294
+ ```text
295
+ Environment
296
+
297
+ System:
298
+ OS macOS 15.3
299
+
300
+ Binaries:
301
+ Node 20.11.0
302
+ pnpm 9.1.0
303
+ Registry https://registry.npmmirror.com/
304
+
305
+ Browsers:
306
+ Chrome 131.0.6778.86
307
+ Safari 18.3
308
+
309
+ Dependencies:
310
+ antd 5.22.0
311
+ react 18.3.1
312
+ react-dom 18.3.1
313
+ dayjs 1.11.13
314
+ @ant-design/cssinjs 1.22.1
315
+ @ant-design/icons 5.5.2
316
+
317
+ Ecosystem:
318
+ @ant-design/pro-components 2.8.1
319
+ rc-field-form 2.7.0
320
+
321
+ Build Tools:
322
+ umi 4.3.0
323
+ typescript 5.6.3
324
+ less 4.2.0
325
+ ```
326
+
327
+ </details>
328
+
274
329
  ### `antd usage [dir]`
275
330
 
276
331
  ```bash
@@ -287,8 +342,11 @@ Four rule categories: `deprecated`, `a11y`, `performance`, `best-practice`. Depr
287
342
  antd lint ./src
288
343
  antd lint ./src --only deprecated
289
344
  antd lint ./src --only a11y
345
+ antd lint ./src --only deprecated --format json --antd-alias @shared-components
290
346
  ```
291
347
 
348
+ Use `--antd-alias <source>` to treat additional package names as aliases of `antd`. Repeat the flag for multiple wrapper packages; `antd` remains enabled by default.
349
+
292
350
  ### `antd migrate <from> <to>`
293
351
 
294
352
  v4→v5 covers 25+ migration steps; v5→v6 covers 30+. Each step includes component name, breaking flag, search pattern, and before/after code.
@@ -343,6 +401,14 @@ antd bug-cli --title "..." --submit
343
401
 
344
402
  **Version auto-detection**: `--version` flag → `node_modules/antd` → `package.json` dependencies → fallback `5.24.0`
345
403
 
404
+ ### Environment Variables
405
+
406
+ | Variable | Description |
407
+ |---|---|
408
+ | `ANTD_NO_AUTO_REPORT=1` | Disable bug-reporting suggestions from AI agents (see [#82](https://github.com/ant-design/ant-design-cli/issues/82)) |
409
+ | `NO_UPDATE_CHECK=1` | Skip the silent version update check |
410
+ | `CI=1` | Skip the silent version update check (same as `NO_UPDATE_CHECK=1`) |
411
+
346
412
  <br>
347
413
 
348
414
  ## 📄 License
package/README.zh-CN.md CHANGED
@@ -14,6 +14,7 @@
14
14
  [![npm version](https://img.shields.io/npm/v/@ant-design/cli?color=blue&label=npm)](https://www.npmjs.com/package/@ant-design/cli)
15
15
  [![npm downloads](https://img.shields.io/npm/dm/@ant-design/cli?color=blue)](https://www.npmjs.com/package/@ant-design/cli)
16
16
  [![CI](https://github.com/ant-design/ant-design-cli/actions/workflows/ci.yml/badge.svg)](https://github.com/ant-design/ant-design-cli/actions/workflows/ci.yml)
17
+ [![codecov](https://codecov.io/gh/ant-design/ant-design-cli/branch/main/graph/badge.svg)](https://codecov.io/gh/ant-design/ant-design-cli)
17
18
  [![install size](https://packagephobia.com/badge?p=@ant-design/cli)](https://packagephobia.com/result?p=@ant-design/cli)
18
19
  [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](./LICENSE)
19
20
 
@@ -40,7 +41,7 @@ npx skills add ant-design/ant-design-cli # 安装为 Agent Skill
40
41
  - 🤖 **Agent 优化** — 所有命令支持 `--format json`。结构化错误码与修复建议。stdout/stderr 严格分离。
41
42
  - 🌍 **双语输出** — 每个组件名、描述和文档均有中英文。通过 `--lang zh` 切换。
42
43
  - 🔮 **智能纠错** — 输入 `Buttn`?CLI 基于 Levenshtein 距离建议 `Button`,优先匹配首字母相同的候选。
43
- - 🧩 **14 条命令** — 从 Prop 查询到项目级 Lint,从 Design Token 到跨版本 API 对比。
44
+ - 🧩 **15 条命令** — 从 Prop 查询到项目级 Lint,从 Design Token 到跨版本 API 对比。
44
45
  - 🔌 **MCP 服务** — `antd mcp` 启动 stdio 服务,原生集成 Claude Desktop、Cursor 等 IDE。
45
46
 
46
47
  <br>
@@ -103,12 +104,16 @@ Agent 会自动完成 `npm install`、`npx skills add`,并开始使用 CLI。
103
104
  ## 🚀 快速开始
104
105
 
105
106
  ```bash
107
+ antd list # 所有组件及版本信息
106
108
  antd info Button # 组件 Props、类型、默认值
109
+ antd doc Button # 完整 Markdown 文档
107
110
  antd demo Select basic # 可运行的 Demo 源码
108
111
  antd token DatePicker # Design Token 值(v5+)
109
112
  antd semantic Table # classNames / styles 结构
110
113
  antd changelog 4.24.0 5.0.0 Select # 跨版本 API 差异对比
111
114
  antd doctor # 诊断项目配置问题
115
+ antd env # 收集环境信息用于 Bug 报告
116
+ antd usage ./src # 分析项目中的 antd 导入
112
117
  antd lint ./src # 检查废弃 API 和最佳实践
113
118
  antd migrate 4 5 --apply ./src # 生成 Agent 迁移提示
114
119
  ```
@@ -134,6 +139,7 @@ antd migrate 4 5 --apply ./src # 生成 Agent 迁移提示
134
139
  | 命令 | 说明 |
135
140
  |---|---|
136
141
  | [`antd doctor`](#antd-doctor) | 10 项诊断检查:React 兼容性、重复安装、peer 依赖、SSR、babel 插件 |
142
+ | [`antd env [dir]`](#antd-env-dir) | 一键收集 antd 相关环境信息,用于 Bug 报告或 AI 辅助诊断 |
137
143
  | [`antd usage [dir]`](#antd-usage-dir) | 导入统计、子组件分布(`Form.Item`)、非组件导出 |
138
144
  | [`antd lint [target]`](#antd-lint-target) | 废弃 API、无障碍缺陷、性能问题、最佳实践 |
139
145
  | [`antd migrate <from> <to>`](#antd-migrate-from-to) | 迁移清单,区分自动修复/手动处理,`--apply` 生成 Agent 提示 |
@@ -271,6 +277,55 @@ antd doctor
271
277
  antd doctor --format json
272
278
  ```
273
279
 
280
+ ### `antd env [dir]`
281
+
282
+ 一键收集 antd 相关的所有环境信息 — 系统、Node、包管理器、浏览器、依赖包、生态包(`@ant-design/*`、`rc-*`)和构建工具。
283
+
284
+ ```bash
285
+ antd env # 文本输出(粘贴到 GitHub Issue)
286
+ antd env --format json # 结构化 JSON,供 AI 消费
287
+ antd env --format markdown # Markdown 表格输出
288
+ antd env ./my-project # 扫描指定项目目录
289
+ ```
290
+
291
+ <details>
292
+ <summary>示例输出</summary>
293
+
294
+ ```text
295
+ Environment
296
+
297
+ System:
298
+ OS macOS 15.3
299
+
300
+ Binaries:
301
+ Node 20.11.0
302
+ pnpm 9.1.0
303
+ Registry https://registry.npmmirror.com/
304
+
305
+ Browsers:
306
+ Chrome 131.0.6778.86
307
+ Safari 18.3
308
+
309
+ Dependencies:
310
+ antd 5.22.0
311
+ react 18.3.1
312
+ react-dom 18.3.1
313
+ dayjs 1.11.13
314
+ @ant-design/cssinjs 1.22.1
315
+ @ant-design/icons 5.5.2
316
+
317
+ Ecosystem:
318
+ @ant-design/pro-components 2.8.1
319
+ rc-field-form 2.7.0
320
+
321
+ Build Tools:
322
+ umi 4.3.0
323
+ typescript 5.6.3
324
+ less 4.2.0
325
+ ```
326
+
327
+ </details>
328
+
274
329
  ### `antd usage [dir]`
275
330
 
276
331
  ```bash
@@ -287,8 +342,11 @@ antd usage -f Button # 过滤特定组件
287
342
  antd lint ./src
288
343
  antd lint ./src --only deprecated
289
344
  antd lint ./src --only a11y
345
+ antd lint ./src --only deprecated --format json --antd-alias @shared-components
290
346
  ```
291
347
 
348
+ 使用 `--antd-alias <source>` 可以把额外包名视为 `antd` 的别名;可重复传入多个包装包名,且默认仍会匹配 `antd`。
349
+
292
350
  ### `antd migrate <from> <to>`
293
351
 
294
352
  v4→v5 包含 25+ 迁移步骤,v5→v6 包含 30+。每个步骤包含组件名、破坏性标记、搜索正则和前后代码对比。
@@ -343,6 +401,14 @@ antd bug-cli --title "..." --submit
343
401
 
344
402
  **版本自动检测**:`--version` 参数 → `node_modules/antd` → `package.json` 依赖声明 → 回退 `5.24.0`
345
403
 
404
+ ### 环境变量
405
+
406
+ | 变量 | 说明 |
407
+ |---|---|
408
+ | `ANTD_NO_AUTO_REPORT=1` | 禁用 AI Agent 的 Bug 上报建议(详见 [#82](https://github.com/ant-design/ant-design-cli/issues/82)) |
409
+ | `NO_UPDATE_CHECK=1` | 跳过静默版本更新检查 |
410
+ | `CI=1` | 跳过静默版本更新检查(同 `NO_UPDATE_CHECK=1`) |
411
+
346
412
  <br>
347
413
 
348
414
  ## 📄 开源协议
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
package/data/v4.json.gz CHANGED
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
package/data/v5.json.gz CHANGED
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
package/data/v6.json.gz CHANGED
Binary file
@@ -1,4 +1,7 @@
1
1
  {
2
+ "v3": {
3
+ "3.26": "3.26.20"
4
+ },
2
5
  "v4": {
3
6
  "4.24": "4.24.16",
4
7
  "4.0": "4.0.4",
@@ -59,7 +62,7 @@
59
62
  "5.9": "5.9.4"
60
63
  },
61
64
  "v6": {
62
- "6.3": "6.3.4",
65
+ "6.3": "6.3.6",
63
66
  "6.0": "6.0.1",
64
67
  "6.1": "6.1.4",
65
68
  "6.2": "6.2.3"