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

@work2cn/cli

v0.3.3

Published

work2 CLI platform for skill install, initialization, and lifecycle management

Readme

@work2cn/cli

work2 技能市场 CLI。

项目边界请先阅读:CHARTER.md

安装

npm install -g @work2cn/cli@latest

命令分级

匿名可用(不需要 API Key)

work2 init
work2 market list
work2 skill info <slug>
work2 add <slug> [--source <work2|npm>]
work2 list
work2 remove <slug>

work2 init 会扫描本机技能目录(Claude/OpenClaw/Codex)并回填 ~/.work2cn.json,用于降低首次接入门槛。

可选参数:

  • work2 init --quiet:静默初始化(用于安装后自动执行)
  • work2 init --drop-missing:清理本机不存在的旧记录
  • work2 init --reset:先清空技能记录与技能配置,再按当前本机目录重建

work2 add <slug> 会在复制技能后立即执行依赖安装(npm install --omit=dev),避免首次调用时才临时装包。安装后技能状态由配置情况自动决定(见下方"技能状态模型")。

兼容约束:安装流程不强依赖 work2-core;当本地不存在官方清单时,CLI 仍可通过服务端下发的 installCommand 安装第三方包。

work2 add <slug> --source <work2|npm> 可显式指定来源:work2(官方源)或 npm(官方包)。

安全约束:source 只允许 work2 / npm 两个枚举值;不接受任意 URL 输入。

需要 API Key

work2 login
work2 api-key set <CLI_USER_API_KEY>
work2 api-key show
work2 logout
work2 whoami
work2 report upload [--org-id <ORG_ID>]

本地桥接

work2 bridge status
work2 bridge serve [--port <PORT>] [--api-base-url <URL>]

开发者备用登录方式:

work2 login --api-key <CLI_USER_API_KEY>

本地配置

配置文件路径:~/.work2cn.json

安装 @work2cn/cli 后会自动执行一次 work2 init --quiet。如需跳过,可设置环境变量:WORK2_SKIP_POSTINSTALL_INIT=1

技能安装目标目录(可用环境变量覆盖):

  • Claude Code:~/.claude/skillsWORK2_CLAUDE_SKILLS_DIR
  • OpenClaw:~/.openclaw/skillsWORK2_OPENCLAW_SKILLS_DIR
  • Codex:~/.codex/skillsWORK2_CODEX_SKILLS_DIR

兼容说明:如果你历史版本安装在 .../skills/work2/<slug>,执行 work2 init 时会自动迁移到一级目录结构 .../skills/<slug>

work2 init 扫描后的平台路径与状态会保存到本地配置(platforms / platformScanAt),供后续命令直接读取,避免每次都依赖重新扫描。

技能安装时默认只部署运行产物,不部署 src/ 开发目录。

work2 来源镜像可在 ~/.work2cn.json 中配置(可选):

{
  "work2Mirrors": [
    "https://mirror-a.work2.cn",
    "https://mirror-b.work2.cn"
  ]
}

技能状态模型

技能只有三种状态,没有独立的"启用/禁用"开关:

| 状态 | 值 | 含义 | |------|-----|------| | 未安装 | not_installed | 技能尚未安装 | | 待配置 | configuring | 已安装,需要配置但尚未完成 | | 可用 | ready | 已安装,配置已完成或无需配置 |

work2 list 输出示例:

- qq-mail-assistant [ready] [work2] (claude-code)
- my-tool [configuring] [external] (claude-code,openclaw)

登录流程

  1. 执行 work2 login
  2. CLI 自动打开浏览器
  3. 浏览器里登录 work2.cn
  4. 点击“授权本机”
  5. CLI 自动收到默认 API Key 并写入本地配置
  6. CLI 会自动拉起本地 bridge,供 work2.cn 网页直接安装技能