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

han-song-cli

v1.0.3

Published

Java CLI example packaged for npm global install

Readme

han-cli

han-cli 是一个 Java CLI(npm 分发),用于:

  • 设备码登录授权(auth
  • 通过 STS 执行 OSS 上传/下载/查看(oss
  • OpenClaw skills 安装/卸载

快速开始

1) 安装 CLI

npm install -g han-song-cli

2) 安装 skills(给 OpenClaw 用)

han-cli-skills-install

如果 OpenClaw 使用自定义 skills 目录:

han-cli-skills-install --dir /path/to/openclaw/skills

3) 登录授权

han-cli auth login
han-cli auth status --verify

4) 开始使用 OSS

# 上传
han-cli oss upload --file ./a.png --key knowledge/images/2026/03/31/a.png

# 查看
han-cli oss list --prefix knowledge/images/2026/03/31/ --max-keys 20

# 下载
han-cli oss download --key knowledge/images/2026/03/31/a.png --output ./downloads/a.png

常用命令

han-cli --help
han-cli auth --help
han-cli oss --help
# 登录状态
han-cli auth status
han-cli auth status --verify

# 退出登录
han-cli auth logout

# 只看 STS 返回
han-cli oss sts

本地会话文件

默认目录:~/.han-cli

  • auth-session.json:登录 token 会话
  • device-login-session.json:设备码登录会话
  • auth-login.lock:登录锁文件
  • auth-login-cancel.flag:登录接管取消信号

可通过环境变量覆盖目录:

export HAN_CLI_CONFIG_DIR=/your/custom/dir

OpenClaw 使用

安装完成后,在 OpenClaw 中可直接使用:

  • han-image-memory
  • han-knowledge-capture

完整手册见:INSTALL_OPENCLAW.md

发布到 npm

# 1) 登录并确认账号
npm login
npm whoami

# 2) 预检查(会自动构建并校验打包内容)
npm pack --dry-run

# 3) 升版本
npm version patch

# 4) 发布
npm publish --access public

如果发布报 2FA/权限相关错误(E403),使用:

  • npm publish --access public --otp=<6位验证码>
  • 或使用支持发布的 granular access token(可 bypass 2FA)

卸载

# 卸载 CLI
npm uninstall -g han-song-cli

# 卸载 skills
han-cli-skills-uninstall

自定义 skills 目录:

han-cli-skills-uninstall --dir /path/to/openclaw/skills

本地开发(仓库内)

# 构建
mvn -q clean package

# 本地全局覆盖安装
npm run prepack
npm install -g .

# 验证
han-cli --help