@ant-design/cli
Advanced tools
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
| { | ||
| "v3": { | ||
| "3.26": "3.26.20" | ||
| }, | ||
| "v4": { | ||
@@ -62,3 +65,3 @@ "4.24": "4.24.16", | ||
| "v6": { | ||
| "6.3": "6.3.5", | ||
| "6.3": "6.3.6", | ||
| "6.0": "6.0.1", | ||
@@ -65,0 +68,0 @@ "6.1": "6.1.4", |
+8
-8
| { | ||
| "name": "@ant-design/cli", | ||
| "version": "6.3.5", | ||
| "version": "6.3.6", | ||
| "description": "CLI tool for querying antd knowledge and analyzing antd usage in projects", | ||
@@ -27,3 +27,3 @@ "type": "module", | ||
| "engines": { | ||
| "node": ">=18.0.0" | ||
| "node": ">=20.0.0" | ||
| }, | ||
@@ -47,9 +47,9 @@ "keywords": [ | ||
| "dependencies": { | ||
| "oxc-parser": "^0.121.0" | ||
| "oxc-parser": "^0.123.0" | ||
| }, | ||
| "devDependencies": { | ||
| "@modelcontextprotocol/sdk": "^1.27.1", | ||
| "@modelcontextprotocol/sdk": "^1.29.0", | ||
| "@types/node": "^25.5.0", | ||
| "@vitest/coverage-v8": "^3.2.4", | ||
| "commander": "~13.1.0", | ||
| "@vitest/coverage-v8": "^4.1.2", | ||
| "commander": "^14.0.3", | ||
| "envinfo": "^7.21.0", | ||
@@ -59,5 +59,5 @@ "gray-matter": "^4.0.3", | ||
| "tsx": "^4.19.0", | ||
| "typescript": "^5.7.0", | ||
| "vitest": "^3.0.0" | ||
| "typescript": "^5.9.3", | ||
| "vitest": "^4.1.2" | ||
| } | ||
| } |
+15
-0
@@ -107,3 +107,5 @@ <div align="center"> | ||
| ```bash | ||
| antd list # All components with versions | ||
| antd info Button # Component props, types, defaults | ||
| antd doc Button # Full markdown documentation | ||
| antd demo Select basic # Runnable demo source code | ||
@@ -114,2 +116,4 @@ antd token DatePicker # Design Token values (v5+) | ||
| antd doctor # Diagnose project issues | ||
| antd env # Collect env info for bug reports | ||
| antd usage ./src # Analyze antd imports in project | ||
| antd lint ./src # Check deprecated APIs & best practices | ||
@@ -343,4 +347,7 @@ antd migrate 4 5 --apply ./src # Agent-ready migration prompt | ||
| antd lint ./src --only a11y | ||
| antd lint ./src --only deprecated --format json --antd-alias @shared-components | ||
| ``` | ||
| 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. | ||
| ### `antd migrate <from> <to>` | ||
@@ -400,2 +407,10 @@ | ||
| ### Environment Variables | ||
| | Variable | Description | | ||
| |---|---| | ||
| | `ANTD_NO_AUTO_REPORT=1` | Disable bug-reporting suggestions from AI agents (see [#82](https://github.com/ant-design/ant-design-cli/issues/82)) | | ||
| | `NO_UPDATE_CHECK=1` | Skip the silent version update check | | ||
| | `CI=1` | Skip the silent version update check (same as `NO_UPDATE_CHECK=1`) | | ||
| <br> | ||
@@ -402,0 +417,0 @@ |
+15
-0
@@ -107,3 +107,5 @@ <div align="center"> | ||
| ```bash | ||
| antd list # 所有组件及版本信息 | ||
| antd info Button # 组件 Props、类型、默认值 | ||
| antd doc Button # 完整 Markdown 文档 | ||
| antd demo Select basic # 可运行的 Demo 源码 | ||
@@ -114,2 +116,4 @@ antd token DatePicker # Design Token 值(v5+) | ||
| antd doctor # 诊断项目配置问题 | ||
| antd env # 收集环境信息用于 Bug 报告 | ||
| antd usage ./src # 分析项目中的 antd 导入 | ||
| antd lint ./src # 检查废弃 API 和最佳实践 | ||
@@ -343,4 +347,7 @@ antd migrate 4 5 --apply ./src # 生成 Agent 迁移提示 | ||
| antd lint ./src --only a11y | ||
| antd lint ./src --only deprecated --format json --antd-alias @shared-components | ||
| ``` | ||
| 使用 `--antd-alias <source>` 可以把额外包名视为 `antd` 的别名;可重复传入多个包装包名,且默认仍会匹配 `antd`。 | ||
| ### `antd migrate <from> <to>` | ||
@@ -400,2 +407,10 @@ | ||
| ### 环境变量 | ||
| | 变量 | 说明 | | ||
| |---|---| | ||
| | `ANTD_NO_AUTO_REPORT=1` | 禁用 AI Agent 的 Bug 上报建议(详见 [#82](https://github.com/ant-design/ant-design-cli/issues/82)) | | ||
| | `NO_UPDATE_CHECK=1` | 跳过静默版本更新检查 | | ||
| | `CI=1` | 跳过静默版本更新检查(同 `NO_UPDATE_CHECK=1`) | | ||
| <br> | ||
@@ -402,0 +417,0 @@ |
+8
-20
@@ -167,3 +167,3 @@ --- | ||
| When you encounter a confirmed antd component bug that can't be resolved locally: | ||
| When the user asks you to report an antd bug: | ||
@@ -194,19 +194,8 @@ ```bash | ||
| ### 10. Auto-reporting CLI issues | ||
| ### 10. Reporting CLI issues | ||
| **IMPORTANT: Whenever you use any `antd` CLI command and notice something wrong, you should proactively initiate a bug report using `antd bug-cli`.** | ||
| When the user asks you to report a CLI bug, or explicitly requests help filing one: | ||
| Trigger conditions — report a CLI bug when you observe any of these: | ||
| - A command **crashes or exits with an unexpected error** | ||
| - A command **returns clearly incorrect data** (e.g. `antd info Button` shows wrong props, missing props, or props from the wrong version) | ||
| - A command's **output doesn't match its documented behavior** (e.g. `--format json` returns non-JSON, `--version X` is ignored) | ||
| - A command **returns empty or missing data** when it shouldn't (e.g. `antd demo Button` returns no demos, `antd token Button` returns no tokens for v5+) | ||
| - **Inconsistencies between commands** (e.g. `antd list` shows a component but `antd info` says it doesn't exist) | ||
| **Workflow:** | ||
| 1. You notice something wrong while using the CLI | ||
| 2. Gather evidence: the exact command you ran, what was returned, and what you expected | ||
| 3. Preview the bug report for the user: | ||
| ```bash | ||
| # Preview the bug report for the user | ||
| antd bug-cli --title "antd info Button returns wrong props for v5.12.0" \ | ||
@@ -220,4 +209,3 @@ --description "When querying Button props for version 5.12.0, the output includes props that don't exist in that version" \ | ||
| 4. Show the report to the user: "I noticed an issue with the CLI while working. Here's a bug report — shall I submit it?" | ||
| 5. Submit after user confirms: | ||
| Show the report to the user and confirm before submitting: | ||
@@ -233,3 +221,3 @@ ```bash | ||
| **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. | ||
| **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. | ||
@@ -269,3 +257,3 @@ ### 11. Using as MCP server | ||
| 5. **Lint after changes** — After writing or modifying antd code, run `antd lint` on the changed files to catch deprecated or problematic usage. | ||
| 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. | ||
| 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. | ||
| 6. **Report antd bugs** — When the user asks to report an antd bug, use `antd bug`. Always preview first, get user confirmation, then submit. | ||
| 7. **Report CLI issues** — When the user asks about a CLI problem, use `antd bug-cli` to help them file a report. Always preview first, get user confirmation, then submit. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
28251451
4.74%76
4.11%32628
1.66%417
3.73%0
-100%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
Updated