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

ai-weekly

v0.1.2

Published

从 GitHub Trending 与 Bilibili 候选视频生成本地 AI 周报的命令行工具。

Readme

AI 周报

一个本地优先的命令行工具:从 GitHub Trending 发现本周项目,收集 Bilibili 的相关视频与站内已有字幕,调用本机已登录的 Codex CLI 生成结构化摘要,最后输出可离线打开的中文周报。

默认不下载音频、不转写。只有明确选择 Groq Whisper 或本地 faster-whisper 时,才会为缺少字幕的视频下载临时音频。没有字幕、需要登录或处理失败的视频都会保留在运行记录中,不会被编造成摘要。

你能获得什么

  • 本周 GitHub Trending 项目快照,并自动跳过历史周报已出现的仓库。
  • 每个项目的 Bilibili 候选、已有字幕、来源链接和可复核的结构化摘要。
  • 本地博主复核页;被标记为营销号的博主会在后续发现中排除并自动补位。
  • 按项目与博主筛选的离线 HTML 周报,视频封面也下载到本地。

快速开始

需要 Node.js 20+、可访问 GitHub 与 Bilibili 的网络,以及已安装并登录的 Codex CLI。首次使用还需要安装 Playwright Chromium:

npx --package=ai-weekly playwright install chromium
npx ai-weekly

完整流程会在需要 Bilibili 登录或验证码时打开专用浏览器窗口;登录完成后按 Enter 继续。博主复核页保存后也会等待 Enter,再生成最终报告。

# 指定本次运行日期;同一日期会复用同一份工件目录
npx ai-weekly --date 2026-08-30

# 查看完整命令说明
npx ai-weekly --help

从源码目录开发时:

npm ci
npm run weekly -- --date 2026-08-30

发布给他人的打包方式、保密排除项和离线环境的边界,见交付与安装说明。

完整流程与产物

发现项目 → 获取字幕 → Codex 摘要 → 汇总项目 → 人工复核博主
→ 再次汇总 → 下载封面 → 生成离线报告

默认完整流程会以 --concurrency 2 运行摘要步骤;单独运行 summarize 时默认并发为 1(最多 2)。所有运行数据都写到执行命令时的当前目录,不会写入 npm 的安装目录:

| 路径 | 内容 | | --- | --- | | data/runs/<日期>/github-trending.json | 本周项目快照;会排除历史运行已出现的仓库,再补足默认 10 个项目。 | | data/runs/<日期>/discovery.json | 原始视频卡片、时长过滤结果、候选评分与每项目入选视频。 | | data/runs/<日期>/subtitles.json、subtitles/ | 字幕工件和每条候选的获取状态。 | | data/runs/<日期>/summaries.json、summaries/ | 结构化视频摘要与处理状态。 | | data/runs/<日期>/synthesis/ | 项目汇总、博主档案及报告内容。 | | data/runs/<日期>/report/index.html | 可离线打开的最终周报;封面位于 report/covers/。 |

github-trending.html 与 bilibili-raw/ 是追溯用的原始页面快照;后者可能含登录态响应,已被 .gitignore 排除,不应提交到公开仓库。

按阶段运行

| 目标 | 命令 | 说明 | | --- | --- | --- | | 发现项目和视频 | npx ai-weekly discover | GitHub 周榜 + Bilibili 候选。 | | 仅验证 GitHub 周榜 | npx ai-weekly discover --github-only | 不打开浏览器,也不访问 Bilibili。 | | 获取站内字幕 | npx ai-weekly subtitles --headless | 已登录 profile 时直接运行。 | | 生成视频摘要 | npx ai-weekly summarize --date 2026-08-29 | 只读保存的字幕,不下载音频、不转写。 | | 汇总项目和博主 | npx ai-weekly synthesize --date 2026-08-29 | 只读本次的发现和摘要工件。 | | 人工复核博主 | npx ai-weekly review-creators --date 2026-08-29 | 启动本地复核页。 | | 下载视频封面 | npx ai-weekly covers --date 2026-08-29 | 写入离线报告目录。 | | 生成报告 | npx ai-weekly report --date 2026-08-29 | macOS 会自动打开生成的 HTML。 |

每个子命令均可使用 --help 查看完整参数,例如 npx ai-weekly subtitles --help。

首次登录 Bilibili

发现阶段首次运行可显式打开浏览器:

npx ai-weekly discover --headed --wait-for-enter

程序使用独立 Chrome profile,默认位置是 data/browser-profiles/bilibili。请在打开的窗口完成登录或验证码后按 Enter;该 profile 已被 .gitignore 排除,Cookie 不会写入 JSON 或提交到仓库。

字幕访问也可能仅对登录用户可见。已确认登录后可使用无界面模式;若再次遇到登录限制,改回有界面模式:

npx ai-weekly subtitles --limit 3 --headless
npx ai-weekly subtitles --headed

字幕与可选转写

subtitles 优先获取 Bilibili 已提供的字幕轨。默认完整流程执行 --no-transcribe,保持只使用官方字幕。对应状态包括 downloaded、transcribed、no_subtitles、login_required 和 error。

如需处理缺失字幕,可明确选择本地或云端转写:

# 本地 faster-whisper;首次运行会创建 .venv 并安装所需 Python 依赖
npx ai-weekly subtitles --transcribe --transcription-model medium

# Groq 云端 Whisper;从环境变量读取密钥
GROQ_API_KEY=... npx ai-weekly subtitles --transcription-provider groq

# 明确关闭转写
npx ai-weekly subtitles --no-transcribe

本地转写默认使用 small 模型和中文提示。Groq 默认使用 whisper-large-v3-turbo,会将临时音频上传至 Groq;临时音频会在本机处理结束后删除。Groq 请求失败不会自动降级到本地转写,避免意外安装模型或消耗本机算力。

从字幕生成可审核摘要

npx ai-weekly summarize --date 2026-08-29 --all --concurrency 2

该步骤把已保存字幕的纯文本交给本机登录的 codex exec,默认使用 gpt-5.6-luna,输出固定 JSON 结构。每条摘要区分项目事实、视频观点、演示或使用结论和限制条件;视频介绍多个项目时,只提取与当前目标项目直接相关的内容。摘要阶段不打开浏览器、不下载音频、也不执行转写。

字幕内容会发送给 OpenAI 的 Codex 服务,请只处理你有权提交给该服务的字幕。已有且来源一致的摘要会默认跳过;使用 --force 才会重新调用 Codex。

人工复核与博主标签

项目汇总后运行:

npx ai-weekly review-creators --date 2026-08-29

打开终端显示的本地地址后,可标记“优质博主”或“营销号”并填写备注。标签保存到 creator-labels.json;重新运行 synthesize 后,项目汇总与博主档案会同步。后续 discover 可直接使用该标签文件:

npx ai-weekly discover --creator-labels data/runs/2026-08-29/creator-labels.json

营销号会在候选中排除并由同一批次的后续合格视频补位;若候选仍不足,运行结果会保留候选不足状态,而不会编造内容。

离线报告

npx ai-weekly covers --date 2026-08-29
npx ai-weekly report --date 2026-08-29

报告从 synthesis/report-content.json 的白名单内容生成,按项目展示“项目事实”和“视频观点”,并提供项目、博主筛选和仓库链接。它不会写入字幕、音频、视频文件、Cookie 或凭据。macOS 在生成完成后会自动用默认浏览器打开 data/runs/<日期>/report/index.html。

安装镜像(可选)

若 npm 官方源不可用或较慢,可临时使用 npmmirror;新版本同步可能有短暂延迟:

npm install ai-weekly --registry=https://registry.npmmirror.com
npx --registry=https://registry.npmmirror.com ai-weekly --help

本包仍通过 npm 官方 registry 发布;npmmirror 仅用于下载与安装。

本地开发

npm install
npm test

npm run discover
npm run subtitles -- --headless
npm run summarize -- --date 2026-08-29
npm run synthesize -- --date 2026-08-29
npm run report -- --date 2026-08-29

项目采用 MIT License。