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

rssany

v0.2.0

Published

Universal RSS/Atom/JSON Feed pipeline — fetches, extracts, parses and converts any web content into consumable feeds with plugin support

Readme

RSSAny - 把任何信息变成RSS订阅

按信源抓取网页 / RSS / 邮件等,解析、补全文、打标签与翻译后入库,再按需生成 RSS / Atom / JSON Feed 与 JSON API。

RSSAny 是一套自托管的订阅管线:列表 URL → 抓取与解析(规则 / LLM)→ 正文提取(自定义 / Readability / LLM)→ upsert 去重 → 固定 pipeline(打标签、翻译等)→ 对外提供 **/rss** 等输出。

界面预览

RSSAny Web 界面截图


功能概览

  • 统一订阅:在 .rssany/sources.json 中配置网站列表、标准 RSS、IMAP 邮件等,由调度器按 refresh 策略拉取。
  • 可插拔信源Site / Source 插件(.rssany.js / .rssany.ts),见 插件配置说明
  • 正文与解析:在信源 fetchItems(及需要的 ctx.extractItem 等)内完成;入库后跑 pipeline。
  • 固定 pipelineapp/pipeline/ 中打标签、翻译等,由 .rssany/config.jsonpipeline.steps 开关(不是用户目录下的 pipeline 插件)。
  • LLM 辅助:解析、提取、标签、翻译等可按配置走 OpenAI 兼容接口。
  • 站点登录:需登录的站点通过 Puppeteer 管理 Cookie(与产品用户账号无关)。
  • 可选远端投递:若 config.json**deliver.url** 非空,在写库与 pipeline 完成后将条目以 **{ sourceRef, items }** JSON POST 到该 URL(由 app/deliver/post.ts 发送);留空则仅本地消费。
  • Web 界面:SvelteKit 构建产物由后端托管;Feeds 等需 邮箱校验**/admin** 需 **users.role === 'admin'**(可从 **/me** 进入)。

技术栈(摘要)

| 层级 | 说明 | | --- | ------------------------------------------------------------ | | 运行时 | Node.js 20–23(见 package.json engines) | | 后端 | Hono、tsx 开发入口 | | 数据 | SQLite(Node.js 内置 node:sqlite,Node.js 20+),默认 ~/.rssany/data/rssany.db(Windows:%USERPROFILE%\.rssany\data\rssany.db) |


快速开始

日常使用只需 Node.js 20.x–23.x(与 package.jsonengines 一致):

全局安装(推荐)

npm install -g rssany   # 与 npm i -g rssany 相同
rssany

安装包内已包含构建好的后端与 Web 界面;启动后用浏览器打开终端里提示的地址(默认 http://127.0.0.1:18473/,端口可在运行命令时当前目录下的 .env 里设置 PORT)。

  • 数据目录:首次运行会在 ~/.rssany/(Windows:%USERPROFILE%\.rssany\)自动从包内 init/ 生成 sources.jsonconfig.json 等(已存在则不会覆盖)。
  • 可选配置:在启动 rssany 时的当前目录放置 .env(可参考仓库里的 .env.example),用于 JWT、OAuth、SMTP、LLM(如 OPENAI_API_KEY / OPENAI_BASE_URL / OPENAI_MODEL)等。
  • 重置全部本地数据(结束占用 PORT 的进程并删除用户目录,慎用):执行 rssany reset;在含 .env 的目录下运行可读取 PORT / RSSANY_USER_DIR,或事先在环境里导出这些变量。

等价于在项目里执行 node node_modules/rssany/dist/index.js;CLI 名为 rssany

从源码运行(开发 / 贡献)

需要 pnpm

pnpm install
pnpm run webui:install
cp .env.example .env   # 按需修改

开发(后端托管 webui 构建目录;改前端可 watch):

pnpm run dev:all

或分步:pnpm run webui:buildpnpm dev

仅调试 WebUI 热更新(可选):cd webui && pnpm dev(Vite 代理到本机后端,见 webui/vite.config.ts)。

生产(本仓库):pnpm run webui:build && pnpm start

重置本地数据(与全局安装的 rssany reset 逻辑相同):pnpm reset

发布到 npm 时 prepublishOnly 会执行 build:all(后端 vite build + webui:build)。


数据流(简图)

sources.json / 信源插件
  → 调度器触发 fetchItems
  → upsertItems
  → pipeline(每条一次)
  → [可选] deliver.url POST(出站,非入站 API)

消费侧:RSS/XML**/api/***、Web UI。


常用 HTTP 能力

RSS 输出

  • 按条件从库中生成:支持 searchtagslnglimit 等查询参数;可用 subscribed=1 限定为 sources.json 中出现的 ref。
  • 按 URL 即时抓取GET /rss/https://example.com/...(具体行为以路由实现为准)。

配置

信源插件(Site / Source):目录约定、listUrlPattern / patternfetchItems、与 sources.json 的关系等,见 docs/plugins.md

Pipeline(固定代码)

**app/pipeline/**,通过 **.rssany/config.json** 配置步骤,例如:

{
  "pipeline": {
    "steps": [
      { "id": "tagger", "enabled": true },
      { "id": "translator", "enabled": false }
    ]
  },
  "deliver": {
    "url": ""
  }
}

deliver.url 非空时会对处理完成的条目向该 URL 发起出站 POST;留空则不投递。

sources.json 片段示例

{
  "sources": [
    { "ref": "https://example.com/feed.xml", "label": "Example", "refresh": "1h" }
  ]
}

合法 refresh 取值包括:10min30min1h6h12h1day(默认)、3day7day


仓库目录(摘要)

├── app/                 # 后端:路由、feeder、scraper、pipeline、db、auth…
│   └── plugins/builtin/ # 内置信源 *.rssany.js
├── docs/                # 用户文档(如 plugins.md)
└── webui/               # SvelteKit 前端

~/.rssany/               # 运行时用户数据(首次启动创建;或 RSSANY_USER_DIR)
    ├── sources.json
    ├── config.json
    ├── tags.json
    ├── data/rssany.db   # SQLite 主库
    ├── cache/
    └── plugins/         # 用户插件覆盖内置

更细的模块说明见 AGENTS.md(与代码迭代同步,若有出入以代码为准)。


许可证

MIT