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

@omni-api/cli

v0.0.2

Published

OmniAPI: 开发时 CLI(list / doctor / openapi)

Downloads

261

Readme

@omni/cli

OmniAPI 开发期 CLI:让你一眼看懂业务暴露面 + 自动发现配置漏洞 + 一键导出文档

安装

pnpm add -D @omni/cli

业务方接入

package.json

{
  "scripts": {
    "omni": "omni --app ./dist/app.js"
  }
}

./dist/app.js 是构建产物,需要 export { registry }export default registry

命令

omni list

列出所有 procedure 的暴露状态:

Procedures (6):

NAME                                HTTP  MCP   DANGER       SUMMARY
──────────────────────────────────────────────────────────────────────────────────────────
user.get                            yes   yes   read         按 ID 查询用户
user.profile                        yes   yes   read         当前用户信息
order.create                        yes   yes   write        创建订单
order.get                           yes   yes   read         查询订单
order.list                          yes   yes   read         我的订单列表
order.cancel                        yes   yes   destructive  取消订单

Summary: 6 via HTTP, 6 via MCP (stdio).
Destructive procedures hidden from MCP HTTP transport: 1 (set meta.mcp.allowRemote=true).

omni doctor

静态检查,发现常见漏洞:

omni doctor: 1 error(s), 2 warning(s).

[ERROR] admin.delete_user: description is empty (required for OpenAPI / MCP)
[warn]  order.cancel: destructive tool will be HIDDEN from MCP HTTP transport by default…
[warn]  admin.delete_user: name suggests a mutation but meta.mcp.dangerLevel is unset

退出码:error 数 > 0 → 1,否则 0(可作 CI gate)。

omni openapi

pnpm omni openapi                       # 打到 stdout
pnpm omni openapi --out openapi.json    # 写文件
pnpm omni openapi --title "My API"      # 自定义元信息

设计原则

  • 零大依赖:手写 50 行 argv parser,不引入 commander / yargs
  • 可作库使用:所有命令都导出函数(renderList / runDoctor / runCli),方便嵌入业务自有运维工具
  • CI 友好:退出码语义清晰,doctor 有 error 时返回 1