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

mpdev

v0.1.0

Published

OpenClaw Marketplace CLI client

Readme

mpdev

这是一个 Node.js CLI 项目,采用 CommonJS + 自研命令分发器结构:

  • bin/mpdev.js:CLI 入口
  • lib/cli-parser.js:轻量参数解析
  • lib/api.js:零依赖 API 封装
  • lib/commands/publish.js:发布命令

当前真正实现的是 publish 命令,已经接好以下发布链路:

  1. createUpload
  2. signUploadPartUrl
  3. completeUpload
  4. createAssetSemver
  5. 失败时自动尝试 abortUpload

当前也已实现 search 命令,搜索链路为:

  1. searchAssets
  2. 按类型、作者、安装量、简述格式化输出

当前也已实现 install 命令,安装链路为:

  1. getAsset
  2. listAssetSemvers
  3. getReversionDownloadUrl
  4. 下载归档并解压到本地 OpenClaw 目录
  5. GetAsset(assetId) 返回值写入安装目录下的 .metadata.json

安装目标格式:

  • <type>/<assetId>
  • <type>/<assetId>@<semver>

其中 @<semver> 用来指定版本;也可以继续使用 --version <semver>

运行要求

  • Node.js >=18.0.0
  • 零运行时依赖

凭证

默认读取:

  • macOS / Linux: ~/.openclaw/hub-credentials.json
  • Windows: %USERPROFILE%\\.openclaw\\hub-credentials.json

文件最少需要:

{
  "token": "your-credential-token"
}

请求头约定:

  • Authorization: Bearer <credential token>:受保护接口必需;search 可匿名调用
  • X-Request-ID:自动生成,也可通过 --request-id 显式指定
  • Cli-Version:自动带当前 package 版本

用法

npm install -g mpdev
mpdev publish /path/to/asset

示例:

mpdev publish ./my-skill \
  --type skill \
  --category productivity \
  --tags agent,automation \
  --version 1.0.0 \
  --yes

更新已有资产版本:

mpdev publish ./my-skill --version 1.0.1 --yes

如果目录根部已存在 .assetid,会自动把该值透传为 assetId;也可显式传入 --asset-id <id>

只做本地校验和打包:

mpdev publish ./my-skill --dry-run

安装示例:

mpdev install skill/7c19dc4c3244418096f1dcb59c93f795
mpdev install skill/[email protected]

搜索示例:

mpdev search 天气 --page-size 10

命令结构

入口采用懒加载:

  • publish
  • search
  • install
  • uninstall
  • list

其中当前可用的是 publishsearchinstall

发布命令参数

  • --type <skill|experience|plugin|trigger|channel>
  • --asset-id <id>:未传时会尝试读取目录根部 .assetid
  • --name <slug>
  • --display-name <name>
  • --description <text>
  • --version <semver>
  • --category <category>
  • --tags <a,b,c>
  • --tag <value>:可重复
  • --long-description <text>
  • --base-url <url>
  • --token-file <path>
  • --part-size-mb <number>
  • --ttl-seconds <number>
  • --request-id <id>
  • --dry-run
  • --yes, -y
  • --verbose

目录发布打包规则

  • 目录发布会默认跳过 .gitnode_modules__MACOSX.DS_StoreThumbs.db
  • 根目录可通过 .openclawmpignore 补充忽略规则,也会读取根目录 .gitignore / .npmignore 的常见规则
  • 子路径遇到无权限读取的目录或文件时会自动跳过;使用 --verbose 可查看具体跳过项

Metadata 提取规则

  • 优先级:CLI 显式参数 > .metadata.json > README.md > package.json > openclaw.plugin.json > SKILL.md
  • .metadata.json 存在时会优先使用,适合显式固定 typenamedisplayNamedescriptionversioncategorytagslongDescription
  • SKILL.mdnamedisplay-namedescriptionversiontags 只从 frontmatter(------)提取,不会把正文内容混进 description
  • README.md 支持 YAML frontmatter 和前置 key: value 形式字段提取 namedisplay-namedescriptionversiontypecategorytags
  • trigger / experience 会把 README 标题后的第一段作为描述兜底
  • 发布必填规则:assetTypenamedisplayNamesemver
  • version 必须是严格的 x.x.x 形式,例如 1.2.11.1.10
  • assetId 为可选字段;有就透传,没有就省略,由后端判断是新建还是已有资产发新版
  • objectId 由上传完成后自动生成,登录态始终必需
  • 调用发布接口前会打印 CreateAssetSemver 请求预览;真正发网请求前会打印对应 request body

默认配置来源

baseUrl 优先级:

  1. --base-url
  2. OPENCLAWMP_API_BASE_URL
  3. OPENCLAWMP_BASE_URL
  4. API_BASE_URL
  5. NEXT_PUBLIC_API_BASE_URL
  6. 仓库根目录 .env.local / .env / .env.prod
  7. https://seafood.c.stepfun-inc.net