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

@scotthuang/news-knowledge-base

v0.1.9

Published

每日新闻知识库 - ripgrep + LLM 多轮探索

Downloads

1,083

Readme

News Knowledge Base

每日新闻知识库:抓取 RSS → LLM 生成 frontmatter → 存入 Obsidian,支持全文搜索和多轮探索。

插件功能

注册以下 Agent Tool:

| 工具 | 功能 | |------|------| | news_import | 抓取 RSS → 生成 frontmatter → 写入 Obsidian,支持 dry-run/limit | | news_search | 全文检索 + LLM 多轮探索,返回相关性排序的新闻列表 | | news_digest | 生成指定日期的新闻摘要(Phase 5 实现) |

本地安装

cd ~/github/news-knowledge-base

# 1. 编译 TypeScript
npm run build

# 2. 安装插件(本地路径)
openclaw plugins install ./

# 3. 重启 Gateway
openclaw gateway restart

# 4. 验证加载
openclaw plugins list | grep news

开发模式(link,不复制)

改动代码后不用重装,用 link 模式:

openclaw plugins install -l ~/github/news-knowledge-base
openclaw gateway restart

插件更新

发布新版本后,更新本地插件:

openclaw plugins update news-knowledge-base
openclaw gateway restart

CLI 命令(独立使用)

插件安装后,news-cli 也可独立使用:

news-cli import                  # 导入今天新闻
news-cli import --date 2026-03-31  # 导入指定日期
news-cli import --dry-run       # 仅预览,不写入
news-cli import --limit 5       # 限制条数
news-cli search "AI模型"         # 搜索新闻
news-cli digest                 # 生成摘要(Phase 5)

运行测试

npm test -- --run

项目结构

src/
  cli.ts                 # CLI 入口
  rss/fetcher.ts        # RSS 抓取
  metadata/generator.ts  # LLM frontmatter 生成
  obsidian/writer.ts    # Obsidian 写入
  search/               # 全文搜索(ripgrep + Router + Ranker + 多轮探索)
  plugin/index.ts        # OpenClaw 插件入口
tests/
  plugin.test.ts        # 单元测试(22 个用例)
openclaw.plugin.json    # 插件清单

Phase 进度

  • ✅ Phase 1:RSS 抓取 → frontmatter 生成 → Obsidian 写入 → CLI import
  • ✅ Phase 2:全文搜索 + 多轮探索 + CLI search
  • ✅ Phase 3:OpenClaw 插件注册 + 单元测试
  • ✅ Phase 4:engram 集成
  • 🔲 Phase 5:每日摘要
  • 🔲 Phase 6:收尾

已知问题

  • 36kr RSS 被 TTGCaptcha 验证码阻挡,需引入备用 RSS 源(Reuters、BBC News 等)— 见 Obsidian/news-source-diversity.md