mcpField
N
npm-axi

npm-axi

github.com/ssbrouhard开发1100 次安装1 周前更新
代码仓库

关于 npm-axi

npm-axi 是面向公共 npm registry 的只读命令行接口,以精简的 TOON 格式输出,供 Agent 使用。开发者和 Agent 可免认证搜索包并查看元数据、版本及下载量。

主要功能

  1. 01搜索包并显示匹配总数
  2. 02预览或查看完整 README
  3. 03查看近期版本和 latest 标签
  4. 04查询每周及每月下载量
  5. 05以结构化 TOON 返回错误和帮助

适用场景

  1. 01为项目查找 npm 包
  2. 02采纳前检查包元数据
  3. 03比较近期包版本
  4. 04查看包的下载情况

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/ssbrouhard/npm-axi --skill npm-axi

安装后在 Claude Code 中输入/npm-axi确认已加载。

详细介绍

npm-axi

npm-axi 是面向公共 npm 注册表的 AXI。它会返回为 Agent 设计的、节省 token 的 TOON 输出。只读,无需身份验证。

无需全局安装即可运行:

npx -y npm-axi <command> [args] [flags]

命令

search — 搜索包
npx -y npm-axi search "react router" --limit 20

返回包含 name,version,description 的精简表格,以及匹配总数:

count: 20 of 1240 total
packages[20]{name,version,description}:
  react-router,7.1.1,Declarative routing for React
  ...
view — 查看包详情
npx -y npm-axi view zod          # preview README
npx -y npm-axi view zod --full   # complete README

包含预先计算的汇总信息(依赖项数量、每周下载量)以及带有大小提示的截断版 README:

package:
  name: zod
  version: 3.24.1
  license: MIT
  description: TypeScript-first schema declaration and validation library
  dependencies: 0
  weeklyDownloads: 24500000
  homepage: https://zod.dev
  repository: https://github.com/colinhacks/zod
  published: 2024-12-30
  readme: First 800 chars...
    readmeChars: 5421
help[1]: Run `npm-axi view zod --full` to see complete README
versions — 查看近期版本
npx -y npm-axi versions typescript --limit 15

按从新到旧排序,包含 latest dist-tag 和版本总数。

downloads — 查看下载统计
npx -y npm-axi downloads express
downloads:
  package: express
  lastWeek: 30000000
  lastMonth: 120000000

说明

  • 错误会以结构化 TOON 的形式输出到 stdout,并附带可操作的 help 行。
  • 退出代码:0 表示成功,1 表示错误(例如找不到包),2 表示用法错误。
  • 对未知包会返回 NOT_FOUND 错误,并建议使用 search。

评论

支持 Markdown