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

@supsub/cli

v0.3.6

Published

supsub command-line tool

Readme

SupSub CLI

npm version npm downloads license node

SupSub 的命令行工具,让你在终端里直接管理订阅源、搜索内容、追踪公众号、网站。


安装

npm i -g @supsub/cli

支持 macOS / Linux / Windows(x64 / arm64)。


三步开始用

第一步:安装(如上)

第二步:登录

supsub auth login

会自动打开浏览器走 OAuth 设备授权流程完成登录。

第三步:开始用

# 看看自己的订阅源
supsub sub list

# 搜一个公众号订上
supsub mp search "阮一峰"

# 搜全站内容
supsub search "RAG"

使用场景

场景 1:订阅一个公众号

# 先搜公众号,拿到 mpId(base64 字符串,例如 MzkyNTYzODk0NQ==)
supsub mp search "阮一峰的网络日志"

# 用 --mp-id 添加订阅(不需要 --type,默认 MP)
supsub sub add --mp-id "MzkyNTYzODk0NQ=="

# 之后想看这个公众号的未读文章,从 sub list 拿到内部 sourceId 即可
supsub sub list --type MP
supsub sub contents --source-id 12345 --type MP

场景 2:搜索内容

# 全量搜索(源 + 文章)
supsub search "AI"

# 仅搜公众号
supsub search "Agent" --type MP

# 仅搜文章正文
supsub search "Claude" --type CONTENT

场景 3:管理订阅

# 列出所有订阅源
supsub sub list

# 仅看已订阅的网站
supsub sub list --type WEBSITE

# 取消订阅
supsub sub remove --source-id 12345 --type MP

完整命令参考

认证

supsub auth login                   OAuth 登录(浏览器授权)
supsub auth status                  查看当前登录状态
supsub auth logout                  退出登录(清除本地凭证)

订阅源

supsub sub list                     列出全部订阅源
  --type <MP|WEBSITE>               按类型过滤

supsub sub add                      添加订阅(--source-id 与 --mp-id 二选一)
  --source-id <id>                  内部信息源 ID(正整数,来自 search / sub list)
  --mp-id <mpId>                    公众号 mpId(base64,来自 mp search)
  --type <MP|WEBSITE>               --source-id 模式必填;--mp-id 模式可省,默认 MP
  --group <gid>                     分组 ID(可重复指定)

supsub sub remove                   取消订阅
  --source-id <id>                  必填
  --type <MP|WEBSITE>               必填

supsub sub contents                 查看订阅源内的文章
  --source-id <id>                  必填
  --type <MP|WEBSITE>               必填
  --unread                          仅未读(默认)
  --all                             全部文章(与 --unread 互斥)

搜索

supsub search <keyword>             全量搜索(订阅源 + 文章)
  --type <ALL|MP|WEBSITE|CONTENT>   搜索范围,默认 ALL

公众号

supsub mp search <name>             搜索公众号(异步,自动轮询 30s)
supsub mp search-cancel <searchId>  取消正在执行的搜索任务

自更新

supsub update                       检查并更新到最新版本(下载新 binary 原地替换,并同步本地 skills)
  --check                           只检查是否有新版本,不实际更新
  --force                           即使已是最新也重新下载安装(修复损坏的 binary)
  --skip-skills                     本次更新不同步本地 skills

自更新从 npm registry 查最新版本,再从 GitHub Release 下载对应平台的预编译 binary、 原地替换正在运行的可执行文件。若全局安装目录无写权限(如装在需 sudo 的路径), 会提示改用 npm i -g @supsub/cli@latest 或加 sudo 重试。

二进制替换完成后会顺带把本地 Agent Skills 同步到新版本(best-effort,失败只警告不阻断)。 详见下方 Skills(AI agent 集成)docs/self-update-flow.md

Skills 同步

supsub skills sync                  把本仓库的 skills 同步/更新到本地 agent 配置
  --project                         装到当前项目(./.agents/skills),默认装到全局(~/.claude/skills)
  --force                           即使本地已是当前版本也重新同步
supsub skills status                查看本地 skills 版本 vs 当前 CLI 版本、是否漂移
supsub skills list                  列出本仓库提供的 skills

CLI 自更新只换二进制,本地 skills 不会自动跟着升级。supsub 在 ~/.supsub/skills-state.json 记录「上次同步到的 CLI 版本」,每次运行命令做一次零网络的本地比对——一旦本地 skills 落后于 当前二进制,就在 stderr 提示运行 supsub skills sync。设 SUPSUB_NO_SKILLS_NOTIFIER=1 可关闭该提示。


全局参数

| 参数 | 说明 | |------|------| | --api-url <url> | 指定 API 基地址,默认 https://supsub.net | | -o, --output table\|json | 输出格式,默认 table |

环境变量

| 变量 | 说明 | |------|------| | SUPSUB_API_URL | API 基地址(同 --api-url,命令行 flag 优先级更高) | | SUPSUB_NO_BROWSER | 设为真值时 auth login 不自动打开浏览器(无头 / e2e 环境用) | | SUPSUB_NO_SPINNER | 设为真值时关闭所有 loading 动画(非 TTY 下本就不渲染) | | SUPSUB_NO_SKILLS_NOTIFIER | 设为真值时关闭「本地 skills 落后」的启动提示 | | SUPSUB_CONFIG_DIR | 覆盖配置 / 状态文件目录(默认 ~/.supsub) |

Skills(AI agent 集成)

skills/ 遵循 Agent Skills 规范,可在 Claude Code、Cursor、Gemini CLI、Codex、Copilot 等兼容 agent 中使用。

| Skill | 覆盖命令 | |-------|----------| | supsub-auth | auth login / auth status / auth logout | | supsub-sub | sub list / sub add / sub remove / sub contents | | supsub-search | search <keyword> | | supsub-mp | mp search / mp search-cancel | | supsub-focus | focus list / focus contents / focus remove |

安装

Claude Code(推荐):

/plugin marketplace add SupSub-AI/supsub-cli
/plugin install supsub-cli@supsub

或装好 CLI 后用 supsub 自带的同步命令(装到全局 ~/.claude/skills,并登记同步版本):

supsub skills sync

其他 agent,用 skills CLI

# 静默安装仓库内全部 skills 到当前项目(--skill '*' 选全部,-y 跳过确认;项目级,落在 ./.agents/skills/)
npx -y skills add SupSub-AI/supsub-cli --skill '*' -y

升级后想让本地 skills 跟上:supsub update 会自动同步,或随时手动 supsub skills syncsupsub skills status 可查看本地 skills 是否与当前 CLI 版本一致。完整流程见 docs/self-update-flow.md

使用

装完后直接用自然语言即可,agent 会自动调用对应的 skill:

帮我订阅「阮一峰的网络日志」这个公众号

搜一下最近关于 RAG 的文章,挑 3 条给我


License

MIT