@wrenautomation/read

中文文档
0.30.6发布于 2026/11/03PolyForm-Strict-1.0.0TypeScriptES Module构建来源已验证

The web and files in, text out. Polite HTTP fetching with robots and a fetch ladder up to a browser; HTML and PDF to text, a page to title, text and links; a video or podcast from a URL or a file (captions, ffmpeg and a vision model, audio to markdown, wh

原始使用文档

read

The web and files in, text out. No database, no accounts, no business rules: a library that fetches and reads. Until 0.29.0 this was falcon (files, markup, media) and the fetch and video halves of weaver; the research engine on top is @wrenautomation/birdwatch, whose birdwatch CLI carries these readers (fetch, read, list, text, page, watch).

ImportDoes
@wrenautomation/read/fetchPoliteFetcher (one request at a time per host, a contact in the User-Agent, retries on 429 and 5xx, a byte cap), robots in warn mode, fetchLadder (plain GET up to a browser through a LadderClient: autobrowse's web GET /fetch)
@wrenautomation/read/texthtmlText, pdfText, decodeHtml, decodeEntities; readPage (HTML to title, text, links, mailtos, tels)
@wrenautomation/read/videowatchFile a video file: ffmpeg cuts and frames, an ear for the speech (cohereSpeech), an eye for the frames (cohereEye), and a video model's read of the whole file when given (geminiVideo, or geminiReader with no key check, for a proxy that holds the keys); shot labels. Over a URL: readYoutube (captions and chapters by yt-dlp, plus a video model's read of the screen in clips), readYoutubeByUrl (the video model alone, no download), readVideo (any other video: yt-dlp, then watchFile), readAudio (a podcast by its audio URL, then hearAudio), watch over a URL or a file, flatPlaylist (what a profile, channel or search holds), download. Every reader returns the one VideoRead shape
@wrenautomation/read/studya study's synthesis reader: the quote gate (pageQuoted, numbersQuoted), the passages a page is shown by, drafts that cite claims, the markdown report

Everything is a function of what you pass: a URL, bytes, text, a file path, models, tools. What searches, stores, schedules or knows a customer belongs to the caller. Every model call goes through @wrenautomation/models. watch and the readers over a URL need ffmpeg and yt-dlp.

import { PoliteFetcher, userAgent } from "@wrenautomation/read/fetch";
import { readPage } from "@wrenautomation/read/text";

const fetcher = new PoliteFetcher(userAgent("[email protected]"));
const res = await fetcher.get(url);
const page = readPage(res.text, res.url);

Develop

pnpm install
pnpm lint && pnpm typecheck && pnpm test

A v* tag publishes to npm (.github/workflows/release.yml, trusted publishing: no stored token).

License: PolyForm Strict 1.0.0 (LICENSE.md).

版本与发布记录

@wrenautomation/read 共发布 9 个版本,首次发布于 2026/10/30;过去 12 个月发布了 9 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.30.6latest2026/11/03今天
0.30.52026/11/03今天
0.30.42026/11/03今天
0.30.32026/11/03今天
0.30.22026/11/02今天
0.30.12026/11/02今天

关于 @wrenautomation/read 的常见问题

@wrenautomation/read 是什么?

网页和文件输入,文本输出。礼貌的HTTP抓取机器人和抓取梯子到浏览器;HTML和PDF以文字为主,一页以标题、文字和链接为主;来自URL或文件的视频或播客(字幕,ffmpeg和视觉模型,音频标记,等等)

如何安装 @wrenautomation/read?

在项目目录运行 npm install @wrenautomation/read,或使用 pnpm add / yarn add / bun add。

@wrenautomation/read 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@wrenautomation/read 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@wrenautomation/read 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=24。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@wrenautomation/read 可以商用吗?

@wrenautomation/read 使用 PolyForm-Strict-1.0.0 许可。声明的许可为 PolyForm-Strict-1.0.0,请阅读许可原文确认使用条件。以上为概括,不构成法律意见,请以许可原文为准。

@wrenautomation/read 还在维护吗?

最新版本 0.30.6 发布于 2026/11/03(今天);至今共发布 9 个版本,其中过去 12 个月发布了 9 个;首次发布于 2026/10/30。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。