@ant-design/cli 6.3.5 → 6.3.7

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 CHANGED
@@ -26,7 +26,7 @@ Query component knowledge, analyze project usage, and guide migrations — fully
26
26
 
27
27
  ## 🤔 Why
28
28
 
29
- Code agents (Claude Code, Codex, Gemini CLI) write better antd code when they have instant access to the right API data. This CLI gives them exactly that — **every prop, token, demo, and changelog entry for antd v4 / v5 / v6**, bundled locally, queryable in milliseconds.
29
+ Code agents (Claude Code, Codex, Gemini CLI) write better antd code when they have instant access to the right API data. This CLI gives them exactly that — **every prop, token, demo, and changelog entry for antd v3 / v4 / v5 / v6**, bundled locally, queryable in milliseconds.
30
30
 
31
31
  ```bash
32
32
  npx skills add ant-design/ant-design-cli # install as an agent skill
@@ -37,7 +37,7 @@ npx skills add ant-design/ant-design-cli # install as an agent skill
37
37
  ## ✨ Highlights
38
38
 
39
39
  - 📦 **Fully offline** — All metadata ships with the package. No network calls, no latency, no API keys.
40
- - 🎯 **Version-accurate** — 55+ per-minor snapshots across v4/v5/v6. Query the exact API surface of `antd@5.3.0`, not just "latest v5".
40
+ - 🎯 **Version-accurate** — 55+ per-minor snapshots across v3/v4/v5/v6. Query the exact API surface of `antd@5.3.0`, not just "latest v5".
41
41
  - 🤖 **Agent-optimized** — `--format json` on every command. Structured errors with codes and suggestions. Clean stdout/stderr separation.
42
42
  - 🌍 **Bilingual** — Every component name, description, and doc has both English and Chinese. Switch with `--lang zh`.
43
43
  - 🔮 **Smart matching** — Typo `Buttn`? The CLI suggests `Button` using Levenshtein distance, with first-letter preference.
@@ -104,13 +104,18 @@ This exposes 7 tools (`antd_list`, `antd_info`, `antd_doc`, `antd_demo`, `antd_t
104
104
  ## 🚀 Quick Start
105
105
 
106
106
  ```bash
107
+ antd list # All components with versions
107
108
  antd info Button # Component props, types, defaults
109
+ antd doc Button # Full markdown documentation
108
110
  antd demo Select basic # Runnable demo source code
109
111
  antd token DatePicker # Design Token values (v5+)
110
112
  antd semantic Table # classNames / styles structure
111
113
  antd changelog 4.24.0 5.0.0 Select # API diff across versions
112
114
  antd doctor # Diagnose project issues
115
+ antd env # Collect env info for bug reports
116
+ antd usage ./src # Analyze antd imports in project
113
117
  antd lint ./src # Check deprecated APIs & best practices
118
+ antd migrate 3 4 # v3 → v4 migration guide
114
119
  antd migrate 4 5 --apply ./src # Agent-ready migration prompt
115
120
  ```
116
121
 
@@ -338,13 +343,17 @@ Four rule categories: `deprecated`, `a11y`, `performance`, `best-practice`. Depr
338
343
  antd lint ./src
339
344
  antd lint ./src --only deprecated
340
345
  antd lint ./src --only a11y
346
+ antd lint ./src --only deprecated --format json --antd-alias @shared-components
341
347
  ```
342
348
 
349
+ 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.
350
+
343
351
  ### `antd migrate <from> <to>`
344
352
 
345
- v4→v5 covers 25+ migration steps; v5→v6 covers 30+. Each step includes component name, breaking flag, search pattern, and before/after code.
353
+ v3→v4 covers 15+ migration steps; v4→v5 covers 25+ migration steps; v5→v6 covers 30+. Each step includes component name, breaking flag, search pattern, and before/after code.
346
354
 
347
355
  ```bash
356
+ antd migrate 3 4 # v3 → v4 migration
348
357
  antd migrate 4 5 # full checklist
349
358
  antd migrate 4 5 --component Select # component-specific
350
359
  antd migrate 4 5 --apply ./src # generate agent migration prompt
@@ -394,6 +403,14 @@ antd bug-cli --title "..." --submit
394
403
 
395
404
  **Version auto-detection**: `--version` flag → `node_modules/antd` → `package.json` dependencies → fallback `5.24.0`
396
405
 
406
+ ### Environment Variables
407
+
408
+ | Variable | Description |
409
+ |---|---|
410
+ | `ANTD_NO_AUTO_REPORT=1` | Disable bug-reporting suggestions from AI agents (see [#82](https://github.com/ant-design/ant-design-cli/issues/82)) |
411
+ | `NO_UPDATE_CHECK=1` | Skip the silent version update check |
412
+ | `CI=1` | Skip the silent version update check (same as `NO_UPDATE_CHECK=1`) |
413
+
397
414
  <br>
398
415
 
399
416
  ## 📄 License
package/README.zh-CN.md CHANGED
@@ -26,7 +26,7 @@
26
26
 
27
27
  ## 🤔 为什么
28
28
 
29
- Code Agent(Claude Code、Codex、Gemini CLI)在拥有即时 API 数据访问能力时,能写出更好的 antd 代码。这个 CLI 正是为此而生 — **antd v4 / v5 / v6 的每个 Prop、Token、Demo 和 Changelog 条目**,本地打包,毫秒级查询。
29
+ Code Agent(Claude Code、Codex、Gemini CLI)在拥有即时 API 数据访问能力时,能写出更好的 antd 代码。这个 CLI 正是为此而生 — **antd v3 / v4 / v5 / v6 的每个 Prop、Token、Demo 和 Changelog 条目**,本地打包,毫秒级查询。
30
30
 
31
31
  ```bash
32
32
  npx skills add ant-design/ant-design-cli # 安装为 Agent Skill
@@ -37,7 +37,7 @@ npx skills add ant-design/ant-design-cli # 安装为 Agent Skill
37
37
  ## ✨ 亮点
38
38
 
39
39
  - 📦 **完全离线** — 所有元数据随包安装,无需网络请求,无延迟,无 API Key。
40
- - 🎯 **版本精确** — 跨 v4/v5/v6 的 55+ 小版本快照。查询 `antd@5.3.0` 的精确 API,而非仅 "最新 v5"。
40
+ - 🎯 **版本精确** — 跨 v3/v4/v5/v6 的 55+ 小版本快照。查询 `antd@5.3.0` 的精确 API,而非仅 "最新 v5"。
41
41
  - 🤖 **Agent 优化** — 所有命令支持 `--format json`。结构化错误码与修复建议。stdout/stderr 严格分离。
42
42
  - 🌍 **双语输出** — 每个组件名、描述和文档均有中英文。通过 `--lang zh` 切换。
43
43
  - 🔮 **智能纠错** — 输入 `Buttn`?CLI 基于 Levenshtein 距离建议 `Button`,优先匹配首字母相同的候选。
@@ -104,13 +104,18 @@ Agent 会自动完成 `npm install`、`npx skills add`,并开始使用 CLI。
104
104
  ## 🚀 快速开始
105
105
 
106
106
  ```bash
107
+ antd list # 所有组件及版本信息
107
108
  antd info Button # 组件 Props、类型、默认值
109
+ antd doc Button # 完整 Markdown 文档
108
110
  antd demo Select basic # 可运行的 Demo 源码
109
111
  antd token DatePicker # Design Token 值(v5+)
110
112
  antd semantic Table # classNames / styles 结构
111
113
  antd changelog 4.24.0 5.0.0 Select # 跨版本 API 差异对比
112
114
  antd doctor # 诊断项目配置问题
115
+ antd env # 收集环境信息用于 Bug 报告
116
+ antd usage ./src # 分析项目中的 antd 导入
113
117
  antd lint ./src # 检查废弃 API 和最佳实践
118
+ antd migrate 3 4 # v3 → v4 迁移指南
114
119
  antd migrate 4 5 --apply ./src # 生成 Agent 迁移提示
115
120
  ```
116
121
 
@@ -338,13 +343,17 @@ antd usage -f Button # 过滤特定组件
338
343
  antd lint ./src
339
344
  antd lint ./src --only deprecated
340
345
  antd lint ./src --only a11y
346
+ antd lint ./src --only deprecated --format json --antd-alias @shared-components
341
347
  ```
342
348
 
349
+ 使用 `--antd-alias <source>` 可以把额外包名视为 `antd` 的别名;可重复传入多个包装包名,且默认仍会匹配 `antd`。
350
+
343
351
  ### `antd migrate <from> <to>`
344
352
 
345
- v4→v5 包含 25+ 迁移步骤,v5→v6 包含 30+。每个步骤包含组件名、破坏性标记、搜索正则和前后代码对比。
353
+ v3→v4 包含 15+ 迁移步骤,v4→v5 包含 25+ 迁移步骤,v5→v6 包含 30+。每个步骤包含组件名、破坏性标记、搜索正则和前后代码对比。
346
354
 
347
355
  ```bash
356
+ antd migrate 3 4 # v3 → v4 迁移
348
357
  antd migrate 4 5 # 完整迁移清单
349
358
  antd migrate 4 5 --component Select # 指定组件
350
359
  antd migrate 4 5 --apply ./src # 生成 Agent 迁移提示
@@ -394,6 +403,14 @@ antd bug-cli --title "..." --submit
394
403
 
395
404
  **版本自动检测**:`--version` 参数 → `node_modules/antd` → `package.json` 依赖声明 → 回退 `5.24.0`
396
405
 
406
+ ### 环境变量
407
+
408
+ | 变量 | 说明 |
409
+ |---|---|
410
+ | `ANTD_NO_AUTO_REPORT=1` | 禁用 AI Agent 的 Bug 上报建议(详见 [#82](https://github.com/ant-design/ant-design-cli/issues/82)) |
411
+ | `NO_UPDATE_CHECK=1` | 跳过静默版本更新检查 |
412
+ | `CI=1` | 跳过静默版本更新检查(同 `NO_UPDATE_CHECK=1`) |
413
+
397
414
  <br>
398
415
 
399
416
  ## 📄 开源协议
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.5",
65
+ "6.3": "6.3.7",
63
66
  "6.0": "6.0.1",
64
67
  "6.1": "6.1.4",
65
68
  "6.2": "6.2.3"