npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@wagq/wa-cli

v0.6.63

Published

wa的脚手架

Readme

wa-cli

基于 Commander 的本地脚手架(@wagq/wa-cli)。

安装

npm i -g @wagq/wa-cli

全局安装后使用 wa <命令> 调用。

wa --help

命令一览

以下命令以 config/command.js 为准(含别名/参数)。

init

  • 作用:项目初始化工具,交互式选择模板创建项目
  • 用法:wa init
  • 别名:wa i
  • 可选模板
    • vue单页面后台 — 从 GitHub 仓库 sdmu-gaoqi/vite-vue 克隆
    • vue多页面项目 — 从 GitHub 仓库 sdmu-gaoqi/vite-vue-multiple 克隆
    • React — 支持 SPA / 微前端基座 / 微前端子应用
    • vite — 调用 npm create vite@latest
    • uniapp(unibest) — 调用 npm create unibest
    • vscode插件-vue版 / vscode插件-react版
    • umi — 调用 npx create-umi@latest
    • react-native — 调用 npx create-expo-app --template
wa init
wa i

server

  • 作用:启动本地静态服务(基于 http-server)
  • 用法:wa server [path]
  • 别名:wa s [path]
  • 位置参数
    • path:文件路径,默认 dist
  • 选项
    • -P, --port <port>:端口(默认 3000)
    • -S, --https <boolean>:是否开启 https,开启后会提示输入证书/私钥路径(也可使用 CLI 自带证书)
wa server
wa s dist -P 3000 -S true

xlsx2Config

  • 作用:xlsx 文件转多语言配置
  • 用法:wa xlsx2Config [path] [name] [ext]
  • 别名:wa l [path] [name] [ext]
  • 位置参数
    • path:文件路径
    • name:xlsx 文件名称
    • ext:转换文件格式(ts 或 json)
wa xlsx2Config ./locale excel.xlsx json

daml

  • 作用:交互式同步低代码逻辑器文件(需在项目根目录提供 scripts/asyncDamlFetch.js)
  • 用法:wa daml
  • 别名:wa d
  • 交互选项
    • 备注信息(文件夹名称,默认 asyncData)
    • 同步数据类型:逻辑编辑器 / 变量编辑器 / 变量与逻辑
wa daml
wa d

damls

  • 作用:从应用同步所有页面的逻辑器与变量值
  • 用法:wa damls
  • 别名:wa da
  • 配置:在项目根目录创建 .damlrc.json(数组形式),初次执行会自动生成模板文件

.damlrc.json 示例:

[
  {
    "appName": "my-app",
    "origin": "https://example.com",
    "appId": "xxx",
    "branchid": "yyy",
    "token": "zzz"
  }
]
  • 字段说明
    • origin:低代码平台域名
    • appId / branchid / token:接口鉴权参数
    • appName:应用名称(生成的文件会放在以 appName 命名的文件夹下)
  • 交互选项
    • 是否将目录加入 .gitignore
    • 是否使用 prettier 格式化代码
wa damls
wa da

batchUpdate

  • 作用:批量升级依赖包,可指定组织范围
  • 用法:wa batchUpdate [prefix]
  • 别名:wa bu
  • 交互:输入需要更新的包组织前缀(如 @wagq),会自动更新 dependencies 中匹配该前缀的依赖
  • 直接指定:可在命令后直接传入组织前缀,如 wa batchUpdate @wagq
wa batchUpdate
wa batchUpdate @wagq
wa bu
wa bu @wagq

web2exe

  • 作用:将网页打包成 exe(内部调用 nativefier)
  • 用法:wa web2exe <name> <path> [icon]
  • 别名:wa we <name> <path> [icon]
  • 参数说明
    • name:应用名称
    • path:网页地址或本地 html 文件路径(透传给 nativefier)
    • icon:图标路径(可选)
wa web2exe MyApp https://example.com ./icon.ico

skills

  • 作用:交互选择并执行 openskills 相关命令
  • 用法:wa skills
  • 别名:wa sk
  • 交互选项
    • getList — 执行 npx openskills install anthropics/skills
    • sync — 执行 npx openskills sync
wa skills
wa sk

generateIcon2Tsx

  • 作用:将 SVG 图标文件批量生成 TSX React 组件与配置文件
  • 用法:wa generateIcon2Tsx <svgPath>
  • 别名:wa gitsx <svgPath>
  • 参数说明
    • svgPath:SVG 文件夹地址(需包含 outline/、fill/、multipleTone/ 子目录)
    • output: 导出文件输出文件地址
  • 输出
    • svgConfig/ — SVG 数据配置文件
    • icons/ — 生成的 TSX 组件
    • index.ts — 所有图标统一导出入口
  • 命名规范:SVG 文件需按 outline、multipleTone、fill 风格分类存放,并规范后缀命名,如 AuctionMenuMultipleTone.svg、AddCircleOutlined.svg
wa generateIcon2Tsx ./svgs
wa gitsx ./svgs ./index.ts

changesetDoc

  • 作用:包版本管理
  • 用法:wa changesetDoc <mode>
  • 别名:wa chd <mode>
  • 选项
    • -r, --registry <registry>:指定 npm 仓库地址(默认 https://registry.npmjs.org/)
  • mode 可选值
    • dev — 启动文档预览
    • doc — 构建文档
    • changeset — 收集changlog
    • ver — 更新包
    • tBuild — 打包包
    • enterBeta — 进入 beta 模式
    • exitBeta — 退出 beta 模式
    • pub — 构建并发布正式包
    • pubBeta — 构建并发布 beta 包
wa changesetDoc dev
wa chd pub

vsSetting

  • 作用:生成 .vscode/settings.json 配置文件(Prettier + ESLint 自动修复)
  • 用法:wa vsSetting
  • 别名:wa vs
wa vsSetting
wa vs

checkBranch

  • 作用:检查当前 git 分支是否为 目标分支,非目标分支则报错退出
  • 用法:wa checkBranch [目标分支名]
  • 别名:wa ckb [目标分支名]
wa checkBranch
wa ckb

clearLibrary

  • 作用:递归删除 packages/*/dist、packages/*/node_modules 及根目录 node_modules
  • 用法:wa clearLibrary
  • 别名:wa cle
wa clearLibrary
wa cle

registerNacos

  • 作用:把本地 MCP Server 注册到 Nacos 3.x 的 MCP Registry
  • 用法:wa registerNacos [path] [options]
  • 别名:wa rn [path] [options]
  • 位置参数
    • path:MCP 服务所在包目录,默认当前工作目录(读取该目录的 package.json)
  • 选项
    • -a, --addr <addr>:Nacos 地址(默认 http://127.0.0.1:8848,团队环境请显式传入或用 NACOS_ADDR)
    • -u, --username <username>:用户名(默认 nacos)
    • -p, --password <password>:密码(建议用 NACOS_PASSWORD 环境变量,别写进命令历史)
    • -n, --namespace <namespace>:命名空间 ID(默认 public)
    • --name <name>:Nacos 上的服务名(默认取 package.json 的 name 去掉 scope,@scope/pkg → scope-pkg)
    • --mcp-version <version>:注册版本(默认取 package.json 的 version)
    • --endpoint <npx|local>:启动方式(默认 npx,本地调试用 local)
    • --command <command> / --args <args>:自定义启动命令与参数(args 逗号分隔)
    • -r, --registry <registry>:npx 拉包用的 npm 仓库(拉私有包时用)
    • -e, --env <json>:写入 localServerConfig.env 的环境变量,形如 {"KEY":"value"}
    • --dry-run:只采集并打印待提交载荷,不实际提交(不需要密码)
  • 环境变量:NACOS_ADDR、NACOS_USERNAME、NACOS_PASSWORD、NACOS_NAMESPACE、MCP_NAME、MCP_VERSION、MCP_ENDPOINT、MCP_COMMAND、MCP_ARGS、MCP_REGISTRY、MCP_ENV;优先级为 命令行 > 环境变量 > 默认值
  • 说明
    • tools/resources 元信息通过 stdio 拉起真实 MCP 服务采集,不手写,避免 Nacos 上的元信息与代码漂移
    • 同一 name + version 重复提交即覆盖更新;改了工具名或参数结构要升 --mcp-version,否则 Nacos 会报 mcp server info is not compatible
    • 注册后控制台:<addr>/index.html#/mcp
    • 走 HTTP 代理时用 NODE_USE_ENV_PROXY=1 运行(Node 的 fetch 默认不读代理环境变量)
# 只采集、不提交,先看看载荷长什么样
wa rn ./packages/mcp-server --endpoint local --dry-run

# 注册到指定 Nacos(地址与密码都走环境变量,不要落到命令行或代码里)
NACOS_ADDR=https://nacos.example.com \
NACOS_PASSWORD=xxx \
  wa rn ./packages/mcp-server

# 私有 npm 源上已发布的包
NACOS_ADDR=https://nacos.example.com NACOS_PASSWORD=xxx \
  wa rn ./packages/mcp-server -r https://registry.example.com/

# 指定服务名与版本(默认取 package.json 的 name/version)
NACOS_ADDR=https://nacos.example.com NACOS_PASSWORD=xxx \
  wa rn ./packages/mcp-server --name my-mcp --mcp-version 1.2.3