@ant-design/cli
Advanced tools
+4
-2
| { | ||
| "name": "@ant-design/cli", | ||
| "version": "6.3.4", | ||
| "version": "6.3.5-beta.0", | ||
| "description": "CLI tool for querying antd knowledge and analyzing antd usage in projects", | ||
@@ -46,3 +46,5 @@ "type": "module", | ||
| "dependencies": { | ||
| "commander": "~13.1.0" | ||
| "@modelcontextprotocol/sdk": "^1.27.1", | ||
| "commander": "~13.1.0", | ||
| "oxc-parser": "^0.121.0" | ||
| }, | ||
@@ -49,0 +51,0 @@ "devDependencies": { |
+22
-1
@@ -17,2 +17,3 @@ <div align="center"> | ||
| [](https://github.com/ant-design/ant-design-cli/actions/workflows/ci.yml) | ||
| [](https://packagephobia.com/result?p=@ant-design/cli) | ||
| [](./LICENSE) | ||
@@ -43,3 +44,4 @@ | ||
| - 🔮 **Smart matching** — Typo `Buttn`? The CLI suggests `Button` using Levenshtein distance, with first-letter preference. | ||
| - 🧩 **13 commands** — From prop lookup to project-wide lint, from design token queries to cross-version API diffing. | ||
| - 🧩 **14 commands** — From prop lookup to project-wide lint, from design token queries to cross-version API diffing. | ||
| - 🔌 **MCP server** — `antd mcp` starts a stdio server for native IDE integration (Claude Desktop, Cursor). | ||
@@ -82,2 +84,21 @@ <br> | ||
| ### MCP Server | ||
| For IDEs that support [Model Context Protocol](https://modelcontextprotocol.io), the CLI can run as an MCP server: | ||
| ```json | ||
| { | ||
| "mcpServers": { | ||
| "antd": { | ||
| "command": "antd", | ||
| "args": ["mcp"] | ||
| } | ||
| } | ||
| } | ||
| ``` | ||
| To pin a specific antd version, add `"--version", "5.20.0"` to the `args` array. | ||
| This exposes 7 tools (`antd_list`, `antd_info`, `antd_doc`, `antd_demo`, `antd_token`, `antd_semantic`, `antd_changelog`) and 2 prompts (`antd-expert`, `antd-page-generator`) for native IDE integration. | ||
| <br> | ||
@@ -84,0 +105,0 @@ |
+22
-1
@@ -17,2 +17,3 @@ <div align="center"> | ||
| [](https://github.com/ant-design/ant-design-cli/actions/workflows/ci.yml) | ||
| [](https://packagephobia.com/result?p=@ant-design/cli) | ||
| [](./LICENSE) | ||
@@ -43,3 +44,4 @@ | ||
| - 🔮 **智能纠错** — 输入 `Buttn`?CLI 基于 Levenshtein 距离建议 `Button`,优先匹配首字母相同的候选。 | ||
| - 🧩 **13 条命令** — 从 Prop 查询到项目级 Lint,从 Design Token 到跨版本 API 对比。 | ||
| - 🧩 **14 条命令** — 从 Prop 查询到项目级 Lint,从 Design Token 到跨版本 API 对比。 | ||
| - 🔌 **MCP 服务** — `antd mcp` 启动 stdio 服务,原生集成 Claude Desktop、Cursor 等 IDE。 | ||
@@ -80,2 +82,21 @@ <br> | ||
| ### MCP 服务 | ||
| 支持 [Model Context Protocol](https://modelcontextprotocol.io) 的 IDE 可直接将 CLI 作为 MCP 服务使用: | ||
| ```json | ||
| { | ||
| "mcpServers": { | ||
| "antd": { | ||
| "command": "antd", | ||
| "args": ["mcp"] | ||
| } | ||
| } | ||
| } | ||
| ``` | ||
| 如需固定 antd 版本,在 `args` 数组中添加 `"--version", "5.20.0"`。 | ||
| 提供 7 个工具(`antd_list`、`antd_info`、`antd_doc`、`antd_demo`、`antd_token`、`antd_semantic`、`antd_changelog`)和 2 个提示词(`antd-expert`、`antd-page-generator`)。 | ||
| 支持 [Claude Code](https://claude.ai/code)、[Cursor](https://cursor.sh)、[Codex](https://openai.com/codex)、[Gemini CLI](https://github.com/google-gemini/gemini-cli) 等所有兼容 [skills](https://github.com/nicepkg/agent-skills) 协议的 Agent。 | ||
@@ -82,0 +103,0 @@ |
+19
-0
@@ -28,3 +28,5 @@ --- | ||
| After running any command, if the output contains an "Update available" notice, run `npm install -g @ant-design/cli` to update before continuing. | ||
| **Always use `--format json` for structured output you can parse programmatically.** | ||
@@ -207,2 +209,19 @@ | ||
| ### 10. Using as MCP server | ||
| 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: | ||
| ```json | ||
| { | ||
| "mcpServers": { | ||
| "antd": { | ||
| "command": "antd", | ||
| "args": ["mcp", "--version", "5.20.0"] | ||
| } | ||
| } | ||
| } | ||
| ``` | ||
| 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. | ||
| ## Global Flags | ||
@@ -209,0 +228,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
25506829
0.13%3495
8%351
6.36%3
200%1
Infinity%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added