
Security News
The Code You Didn't Write Is Still Yours to Defend
AI agents are pulling packages into environments no scanner is watching, creating exposure before security teams can see it.
@wot-ui/cli
Advanced tools
open-wot 是 wot-ui 的 AI 工具链仓库,当前对外发布的核心包为 @wot-ui/cli。它提供命令行工具、MCP Server、离线组件知识库与数据提取脚本,用于把 wot-ui v2 的组件知识接入编辑器、AI Agent 和本地工程分析流程。
list、info、doc、demo、token、changelogdoctor、usage、lintwot mcpwot-ui/wot-ui 源码生成本地 v2.jsonnpm install -g @wot-ui/cli
安装完成后可直接使用 wot 命令。
如果你在仓库内本地调试,推荐直接运行源码入口,而不是依赖全局命令:
pnpm exec tsx src/index.ts list
wot list
wot info Button
wot demo Button basic
wot doc Button
wot token Button
wot changelog
wot doctor ./my-project
wot usage ./my-project
wot lint ./my-project
wot mcp
wot list [keyword]:列出可用的 wot-ui 组件,支持按名称过滤wot info <component>:查看组件 props、events、slots、CSS 变量wot doc <component>:输出组件 markdown 文档wot demo <component> [name]:查看 demo 列表或指定 demo 源码wot token [component]:查看组件 CSS 变量与默认值wot changelog [version] [component]:查看版本更新记录wot doctor [dir]:检查项目依赖、运行环境与基础集成情况wot usage [dir]:统计 .vue 文件中的 wd-* 使用情况wot lint [dir]:检查未知组件、空按钮等规则多数查询命令支持以下参数:
--format text(默认)或 --format json:输出格式--version <ver>:指定 wot-ui 版本,支持以下格式:
2.0(minor,自动解析到最新 patch)2.0.4(exact patch)latest(始终使用最新稳定版)node_modules/@wot-ui/ui 或 package.json 依赖声明检测,检测不到则回退到最新版示例:
wot info Button --version 2.0.0
wot doc Button --version 2.0
wot list --format json --version latest
将以下配置加入支持 MCP 的客户端:
{
"mcpServers": {
"wot-ui": {
"command": "wot",
"args": ["mcp"]
}
}
}
当前 MCP Server 提供以下 tools:
wot_listwot_infowot_docwot_demowot_tokenwot_changelogwot_lint当前版本聚焦 wot-ui v2。仓库内的离线数据来自 wot-ui/wot-ui 源码,主要提取自:
docs/component/*.mddocs/guide/changelog.mdsrc/uni_modules/wot-ui/components/*/index.scssdata/ 目录保存每个 stable patch 版本的独立快照(v2.0.0.json、v2.0.1.json、…),以及一个始终指向最新版的 v2.json。
全量同步所有历史 tag(推荐,首次或需要补全历史版本时使用):
pnpm sync:clone
克隆 wot-ui 仓库(--filter=tree:0 --no-checkout,不下载文件树),按所有 stable tag 逐一 checkout + 提取,已有快照自动跳过。
仅更新最新版本(快速,CI 单版本触发时使用):
pnpm extract:clone
使用本地已有的 wot-ui 仓库:
# 全量多版本
pnpm sync --wot-dir ../wot-ui
# 单个版本,手动指定 checkout 后提取
pnpm extract --wot-dir ../wot-ui --output data/v2.0.4.json
当前根目录就是主发布包,核心源码位于 src,离线数据位于 data,提取脚本位于 scripts。
>= 2010.xpnpm install
pnpm lint # ESLint 检查
pnpm typecheck # TypeScript 类型检查
pnpm test # 单元测试
pnpm build # 构建产物到 dist/
pnpm compress # 压缩 data/*.json → data/*.json.gz(发布前自动执行)
直接运行源码入口最方便:
pnpm exec tsx src/index.ts list
pnpm exec tsx src/index.ts info Button
pnpm exec tsx src/index.ts info Button --version 2.0.0
pnpm exec tsx src/index.ts doc Button --version 2.0
如果要调试构建产物:
pnpm build
node dist/index.mjs list
node dist/index.mjs info Button --version 2.0.0
pnpm exec tsx src/index.ts mcp
MCP 走 stdio,终端无交互输出属于正常现象。若要查看 tools 与 prompts 的调用过程,建议配合 MCP Inspector 或编辑器内置 MCP 客户端调试。
.github/workflows/ci.yml:在 push/PR 时执行 lint、typecheck、build、test(多 OS × Node 版本矩阵).github/workflows/sync.yml:每日 02:00 UTC 自动检测 @wot-ui/ui 最新版本,有更新时拉取全量多版本快照并创建同步 PR;也可手动触发单版本提取.github/workflows/release.yml:v* tag 触发自动发布 @wot-ui/cli 到 npm(发布前自动运行 pnpm compress && pnpm build,npm 包只含 .json.gz).github/workflows/coverage-upload.yml:v* tag 触发,上传测试覆盖率到 Codecovwot-ui v2usage 与 lint 当前聚焦 .vue 文件中的 <wd-*> 标签及相关 importMIT License © wot-ui
FAQs
面向 wot-ui 的 CLI、MCP 与数据提取工具集
We found that @wot-ui/cli demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
AI agents are pulling packages into environments no scanner is watching, creating exposure before security teams can see it.

Security News
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.