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

inkdrift

v0.1.4

Published

WeChat public account article knowledge distiller bot

Readme

inkdrift

微信文章知识蒸馏机器人。从 FlowUs 剪藏的文章中自动提取知识点,经 LLM 提炼后存入 nmem 记忆库。

架构

FlowUs 剪藏 → flowus-source → extractor → distiller → memorizer → nmem
                (API 读取)     (清洗)     (LLM提炼)    (CLI写入)

快速开始

环境要求

  • Node.js 20+
  • nmem CLI(运行 nmem serve 启动本地服务)

安装

git clone <repo-url> && cd inkdrift
cp .env.example .env
# 编辑 .env 填写配置(见下方配置说明)
npm install

配置

~/.inkdrift 文件中配置以下环境变量:

| 变量 | 必填 | 说明 | |------|------|------| | FLOWUS_TOKEN | 是 | FlowUs API Token | | FLOWUS_DATABASE_ID | 是 | FlowUs 多维表 ID | | GLM_API_KEY | 是 | GLM API Key(OpenAI 兼容格式) | | GLM_BASE_URL | 否 | LLM API 地址,默认 https://aiping.cn/api/v1 | | GLM_MODEL | 否 | 模型名称,默认 GLM-4.7 | | FLOWUS_BASE_URL | 否 | FlowUs API 地址,默认 https://api.flowus.cn | | WEB_PORT | 否 | Web 状态页端口,默认 3000 | | RETRY_MAX | 否 | 最大重试次数,默认 3 | | RETRY_INTERVAL_MS | 否 | 重试间隔(毫秒),默认 60000 | | LOG_LEVEL | 否 | 日志级别,默认 info | | LOG_DIR | 否 | 日志目录,默认 ./logs | | POLL_INTERVAL_MS | 否 | 轮询间隔(毫秒),仅常驻模式,默认 10000 |

使用

本地开发

npm run dev          # 常驻轮询(默认)
npm run dev:once     # 单次执行
# 自定义间隔(30 秒)
POLL_INTERVAL_MS=30000 npm run dev

Ctrl+C 优雅退出。

部署

1. 创建配置文件

cat > ~/.inkdrift << 'EOF'
FLOWUS_TOKEN=xxx
FLOWUS_DATABASE_ID=xxx
GLM_API_KEY=xxx
EOF

2. 启动

nmem serve &
npx inkdrift

项目结构

src/
├── index.ts                # 常驻轮询入口(默认)
├── index-once.ts            # 单次执行入口
├── utils/
│   ├── config.ts           # 集中配置(读取 .env)
│   └── logger.ts           # 日志工具
├── modules/
│   ├── flowus-source/      # FlowUs API 客户端(读取文章、更新状态)
│   ├── extractor/          # Markdown 清洗 + 元数据提取
│   ├── distiller/          # LLM 知识提炼(GLM-4.7)
│   ├── memorizer/          # nmem CLI 写入 + JSONL 日志
│   ├── queue/              # 串行处理队列(串联所有模块)
│   ├── bot/                # [二期] wechaty 方案(已弃用)
│   ├── fetcher/            # [一期跳过] flowus-source 已含内容提取
│   ├── webhook/            # [预留]
│   └── wechat-client/      # [预留]
├── scripts/
│   └── reset-one.ts        # 重置一篇文章为"未处理"(测试用)
└── web/
    └── server.ts           # Web 状态页
docs/
├── architecture.md         # 整体架构
├── adr/                    # 架构决策记录
└── modules/                # 各模块设计文档

两阶段规划

Phase 1(当前)

  • FlowUs 作为文章数据源
  • 用户在微信中手动剪藏文章到 FlowUs 多维表
  • 机器人通过 FlowUs API 读取、处理、提炼知识点
  • 零封号风险

Phase 2(规划中)

  • 接入 WeChatPadPro(iPad 协议)实现全自动监听
  • 自动接收微信文章、处理、存储,无需手动剪藏
  • 详见 docs/adr/003-wechatpadpro-phase2.md