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

@weisanju/rss-cli

v0.5.0

Published

Agent-friendly CLI for the RSS Reader server API

Readme

@weisanju/rss-cli

RSS Reader 服务端 API 的命令行客户端,Agent 友好:默认输出 JSON,--pretty 给人类看。

安装

npm install -g @weisanju/rss-cli

提供 rss 与 rss-reader 两个等价命令。

使用

rss login                       # 设备码授权,token 存入配置文件
rss whoami
rss subscriptions list
rss subscriptions add <url>
rss articles list --limit 20
rss articles read <id>
rss digests list
rss opml export > feeds.opml
rss search "关键词"

配置读取优先级:命令行参数 > 环境变量 > 配置文件。

| 项 | 环境变量 | 说明 | | -------- | ---------------- | ---------------------------------------- | | server | RSS_SERVER_URL | 服务端地址,默认 http://localhost:3000 | | token | RSS_TOKEN | API token(login 后自动写入配置) | | 配置路径 | RSS_CONFIG | 默认 ~/.config/rss-reader/config.json |

文件夹管理

文件夹可用 id 或名称引用(按名称解析为精确匹配;不存在或重名会报错)。所有命令默认输出 JSON,--pretty 输出人类可读文本。

rss folders list                          # 列出文件夹(id、position、名称)
rss folders create "News"                 # 新建
rss folders rename News "每日新闻"        # 重命名(id 或旧名称均可)
rss folders delete News                   # 删除:默认交互确认;非交互用 --yes
rss folders delete News --yes             # 删除后其中订阅自动变为未分类
rss folders reorder News Tech Fun         # 按给定顺序重排(必须列全所有文件夹)

订阅移动文件夹(--folder 可用文件夹 id 或名称;目标须已存在):

rss subscriptions update <id> --folder News   # 移入文件夹
rss subscriptions update <id> --no-folder     # 移出文件夹(变为未分类)

subscriptions add 的 --folder 同样接受 id 或名称,文件夹不存在时自动创建。

批量操作与 dry-run

subscriptions update / subscriptions rm 可一次处理多个订阅:多个 ID 作为参数传入,或用 --stdin 从标准输入读取(空白/逗号分隔,自动去重)。

rss subscriptions update <id1> <id2> <id3> --folder News
rss subscriptions list --fields id | jq -r '.subscriptions[].id' | rss subscriptions update --stdin --folder News
rss subscriptions rm <id1> <id2> --dry-run    # 只报告将删除哪些,不调用 API

输出统一为 { results, summary }(--dry-run 时含 dryRun: true):results 逐项给出 id / ok / action / title / from / to / error,部分失败不影响其余项,任一失败时退出码为 1。

subscriptions list 支持裁剪与过滤:

rss subscriptions list --folder News --limit 20           # 按文件夹(id 或名称)过滤
rss subscriptions list --fields id,title,url,folder       # 字段投影(始终输出 JSON)

可选字段见 rss subscriptions list --help 的 --fields 列表。

登录态与过期

  • 设备码登录(rss login)得到的是 90 天有效期的 API token,无静默续期;CLI 会记录过期时间,过期后直接报 TOKEN_EXPIRED,服务端返回 401 时错误信息也会提示重新执行 rss login。
  • 邮箱密码登录(rss login <email> --password)使用 refresh token 自动续期,无需重新登录。

日报

服务端日报:AI 汇总近 12 小时的文章,按分组分节,早/晚报各一份;配置了钉钉机器人则同时推送。CLI 可查看历史、手动生成、管理设置。

rss digests list                      # 历史日报(--q 搜索正文,--limit/--offset 分页)
rss digests get <id>                  # 查看某期日报
rss digests generate                  # 立即生成一份(近 12 小时,不入推送)
rss digests generate --wait           # 同上,等生成完成并直接输出日报内容
rss digests generating                # 是否有生成任务在跑
rss digests settings show             # 查看日报设置
rss digests settings set --enable --folders 车圈 --morning-time 08:00
rss digests settings set \
  --webhook-url "https://oapi.dingtalk.com/robot/send?access_token=..." \
  --webhook-secret "SEC..."           # 可选:配置推送渠道
  • --folders 支持 id 或名称,逗号分隔;--all-folders 清空过滤(全部分组参与)。
  • --morning-time 为早报时间(Asia/Shanghai,HH:mm),晚报自动为早报 +12 小时。
  • 推送渠道可选:不配 --webhook-url 也可启用,日报照常生成,仅在阅读器 / rss digests 中查看,pushStatus 为 skipped;配置后为钉钉机器人推送(可选签名 --webhook-secret)。
  • set 只更新传入的字段;--clear-webhook 清除已保存的 webhook URL 与 secret。
  • 某 12 小时窗口内参与分组的文章不足 5 篇时,该期日报会自动跳过(不产生记录)。

Agent 技能与自更新

CLI 内置一份给 agent 用的 SKILL.md(安装、认证、命令速查、输出约定),可打印、装进本地 agent 技能目录,或打成 .skill 归档导入 Multica 工作区:

rss skill show                                  # 打印内置 SKILL.md 全文(agent 快速上手)
rss skill install                               # 装进已存在的 ~/.claude/skills/rss-cli/ 与 ~/.qoder/skills/rss-cli/
rss skill install --dir ~/.config/agent-skills  # 追加其它技能根目录(可重复;写入 <dir>/rss-cli/SKILL.md)
rss skill install --target multica --output ./rss-cli.skill
                                                # 产出 Multica 可导入的归档,再执行:
                                                # multica skill import --file ./rss-cli.skill --on-conflict overwrite
rss skill install --dry-run                     # 只报告将写入哪些文件
  • skill show 直接输出 Markdown 原文(便于阅读与管道),不区分 JSON / --pretty。
  • 默认 --target all(claude + qoder)只装进已存在的技能目录,缺失的会跳过并说明;显式 --target multica 只产出归档及导入命令。
  • 重复安装按内容比对:相同为 unchanged,不同则覆盖更新为 updated,首次为 created。

rss update 把 CLI 自己更新到 npm 上的最新版:

rss update --check                            # 只比对版本,不安装
rss update                                    # 检测安装方式(npm / pnpm / yarn)并全局升级
rss update --force                            # 开发副本(npm link / 仓库检出)也强行装全局包
rss update --registry https://registry.npmmirror.com   # 换镜像源(或环境变量 RSS_CLI_REGISTRY)

处于开发副本时默认只提示、不安装;网络不可达或 registry 非 2xx 时输出 REGISTRY_UNREACHABLE / REGISTRY_ERROR 错误。

发布

版本号以 packages/cli/package.json 为唯一来源(rss --version 运行时读取)。改动合并进 main 后由 .forgejo/workflows/release-cli.yml 自动发布到 npm;版本号未变则跳过。发布需要仓库 Secret NPM_TOKEN。