driftnet 0.7.1 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -7,7 +7,9 @@
7
7
 
8
8
  **English** · [繁體中文](https://github.com/KevinChu1110/driftnet/blob/main/README.zh-TW.md)
9
9
 
10
- [📖 What it is](#-what-it-is) · [🎥 See it work](#-see-it-work) · [✨ Core features](#-core-features) · [🚀 Quick start](#-quick-start) · [How links are handled](#how-your-links-are-handled) · [Ways in](#ways-in) · [Web page](#the-web-page) · [Models](#models) · [Agents](#agents) · [Settings](#settings) · [Online](#putting-it-online-optional) · [Your data](#where-your-data-goes) · [Contributing](#contributing)
10
+ [📖 What it is](#-what-it-is) · [🎥 See it work](#-see-it-work) · [✨ Core features](#-core-features) · [🚀 Quick start](#-quick-start) · [How links are handled](#how-your-links-are-handled) · [Ways in](#ways-in) · [Command line](#command-line) · [Web page](#the-web-page) · [Models](#models) · [Agents](#agents) · [Settings](#settings) · [Online](#putting-it-online-optional) · [Your data](#where-your-data-goes) · [Contributing](#contributing)
11
+
12
+ [![Try the demo](https://img.shields.io/badge/%E2%96%B6%20Try%20the%20demo-no%20install-2459e0)](https://kevinchu1110.github.io/driftnet/)   **[Try the demo](https://kevinchu1110.github.io/driftnet/)**: the real page with sample cards, right in your browser. Nothing to install, nothing leaves your machine.
11
13
 
12
14
  [![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/KevinChu1110/driftnet/blob/main/LICENSE)
13
15
  [![npm](https://img.shields.io/npm/v/driftnet.svg)](https://www.npmjs.com/package/driftnet)
@@ -23,15 +25,15 @@
23
25
 
24
26
  ## 📖 What it is
25
27
 
26
- You see a great AI tool on Threads, Facebook, X or YouTube and paste it somewhere "to look at
27
- later". Two hundred links later, nobody looks.
28
+ Every day your feed carries great articles, open-source repos and tools past you. You paste them
29
+ into a chat "for later", and like everything else in the current, they drift out of sight.
28
30
 
29
- **driftnet catches those links.** Your feed is a current: good finds drift past once and are gone.
30
- driftnet is the net you leave in it. Drop links in a chat (LINE, Slack, Discord, Telegram), send
31
- them with a Chrome button, or hand them to your agent. driftnet follows each one to the actual
32
- tool, sorts it, writes a short explanation in your language, and puts it on a searchable page.
33
- Repos, articles and videos get the same treatment. It runs on your own computer, works with any model or none at all, and your agents read the same catalogue
34
- over MCP.
31
+ **driftnet is the net you leave in that current.** Drop links in a group chat (LINE, Slack, Discord,
32
+ Telegram), click the Chrome button, import your old bookmarks or use the command line. driftnet
33
+ catches each one, follows a post to the project it is really about, boils it down to a short summary
34
+ in your language, and files it in your own folders, in a local catalogue with full-text search
35
+ (Chinese included). Your agents haul in the same catalogue over MCP. It runs on your own computer
36
+ and works with any model, or none.
35
37
 
36
38
  ## 🎥 See it work
37
39
 
@@ -82,7 +84,15 @@ bot ▸ 📌 This week in AI (3/11)|News + Paperclip, RealWonder
82
84
 
83
85
  ## 🚀 Quick start
84
86
 
85
- No server, no cloud account. Needs Node.js 22.13+.
87
+ No server, no cloud account. Needs Node.js 22.13+. Want a look first? **[Try the demo](https://kevinchu1110.github.io/driftnet/)** runs the real page in your browser, no install.
88
+
89
+ ### Let your agent set it up
90
+
91
+ Paste this to Claude Code, Cursor, Codex or any agent that can run commands:
92
+
93
+ > Read https://raw.githubusercontent.com/KevinChu1110/driftnet/main/docs/llms-install.txt and set up driftnet for me.
94
+
95
+ Or do it yourself: `npx driftnet` to start, then `npx driftnet init` to connect the agents on this machine.
86
96
 
87
97
  ### 1. One command
88
98
 
@@ -154,6 +164,8 @@ Most links never reach a model; the ones that do arrive as a short outline.
154
164
  6. **Filed in your folders.** The AI uses each folder's path and description; new links wait in the Inbox with two or three suggested folders, and one tap files them.
155
165
  7. **Shown, and offered to agents.** It appears on the web page, and agents get it over MCP, `/llms.txt`, `/feed.xml` or the outgoing webhook. Export takes it all with you.
156
166
 
167
+ **Reels and shorts.** Many shared reels only say the tool's name out loud. When a link on Instagram, Facebook, Threads, TikTok, YouTube Shorts or X is a video whose page text says almost nothing, driftnet reads the video itself with tools already on your machine, cheapest first and stopping as soon as there is enough text: (1) captions, title and description from `yt-dlp`, no download; (2) the video at low quality (at most 60 MB and the first 3 minutes), one frame every 2 seconds, read by `tesseract` (English and Chinese if installed); (3) only if still thin, the audio through `whisper` (`whisper-cli` from whisper.cpp also works, with `DRIFTNET_WHISPER_MODEL` set). What it finds is added to the text as labelled `[captions]`, `[on-screen text]` and `[speech]` sections (6,000 characters at most) and goes through the same guard as page text; the card gets a "read from video" mark. Every tool is optional: whatever is missing is skipped, and `DRIFTNET_VIDEO=off` turns it all off. Tools run without a shell, in a private temp folder that is always deleted, with your driftnet secrets removed from their environment, a time limit per step, links to private or local addresses refused, and one video at a time.
168
+
157
169
  <details>
158
170
  <summary><b>All eight steps</b></summary>
159
171
 
@@ -173,26 +185,69 @@ without running one: on real links, a Chinese article went from 831 to 404 token
173
185
 
174
186
  </details>
175
187
 
188
+ ## Link health
189
+
190
+ Links rot and repos get archived. Set `DRIFTNET_HEALTH=weekly` (recommended; it is off by default because it makes network requests) and driftnet re-checks each card about once a week, a few at a time. GitHub repos go through the API (stars, archived, last push; set `GITHUB_TOKEN` for a higher limit, and it pauses on a rate limit); other links get a quiet `HEAD` through the same private-address guard. A card is marked `dead` (404 / gone, or a name that no longer resolves), `archived`, `stale` (no push for 18 months) or `moved` (repo renamed); server errors and timeouts change nothing and are retried. Marked cards show a badge, appear under **Needs review** on the page and in `driftnet_search_items` with `view=needs_review`, and the card's check button (or `POST /api/items/:id/health`) tests one link right now.
191
+
176
192
  ## Ways in
177
193
 
178
194
  | | Set up | On a laptop? | Sent while it was off |
179
195
  |---|---|---|---|
180
- | **Chrome extension** | Load `apps/chrome-extension` | ✅ | — |
196
+ | **Chrome extension** | Load `apps/chrome-extension`, or the zip from `pnpm build:extension` | ✅ | — |
181
197
  | Telegram | `TELEGRAM_BOT_TOKEN`; privacy mode off for groups (`/setprivacy`) | ✅ | caught up on start (24 h) |
182
198
  | Discord | `DISCORD_BOT_TOKEN`; Message Content intent on | ✅ | read back per channel, quietly |
183
- | Slack | `SLACK_APP_TOKEN` (Socket Mode) + `SLACK_BOT_TOKEN` | ✅ | missed |
199
+ | Slack | `SLACK_APP_TOKEN` (Socket Mode) + `SLACK_BOT_TOKEN` (+ `reactions:read` and the `reaction_added` event for voting) | ✅ | missed |
184
200
  | LINE | `LINE_CHANNEL_SECRET` + `LINE_CHANNEL_ACCESS_TOKEN`, webhook `/webhooks/line` | needs a [public URL](#putting-it-online-optional) | missed |
185
201
  | Your agent | MCP, OpenAPI or `/llms.txt`, see [Agents](#agents) | ✅ | — |
186
202
  | Anything else | `POST /api/chat {"text": "…"}` returns the reply | ✅ | — |
187
203
 
188
- **In a chat**, messages without a link are ignored. Each link gets one line back: what it is and
189
- where to read it on the web page. Want the summary in the chat instead, or no reply at all? Set
190
- `DRIFTNET_REPLY=full` or `off`. Vote with `👍12` or `👎12 reason` (`+#12` / `-#12` work too; a message with a link is never a vote).
204
+ **In a chat**, messages without a link are ignored. Each link gets a reply that says what it is and where to read it on the web page,
205
+ shaped for the platform (`DRIFTNET_REPLY_STYLE=rich`, the default): a Discord embed per item, Slack Block Kit, a LINE Flex card (one bubble, or a
206
+ carousel of up to 12) and a Telegram message with links. Pictures appear only when a public `DRIFTNET_PUBLIC_URL` is set (never a localhost or
207
+ private address, and never with the share key). Want the summary in the chat instead, or no reply at all? Set `DRIFTNET_REPLY=full` or `off`;
208
+ `DRIFTNET_REPLY_STYLE=text` brings back plain messages. If a platform refuses the rich message (a missing permission), driftnet sends the plain
209
+ text and logs it once.
210
+
211
+ **Vote** with `👍12` or `👎12 reason` (`+#12` / `-#12` work too; a message with a link is never a vote), or with one tap:
212
+
213
+ | | How | Needs |
214
+ |---|---|---|
215
+ | Discord | React 👍 / 👎 on the bot's reply (it adds both for you; 👍 or 👎 votes on every card in that reply) | Message Reactions intent (not privileged; discord.js asks for it); *Embed Links* and *Add Reactions* in the channel |
216
+ | Slack | React 👍 / 👎 (`+1`, `-1`) on the bot's reply | Scope `reactions:read`; event subscription `reaction_added` |
217
+ | Telegram | Tap 👍 / 👎 under a card (a toast confirms), or react to the bot's message | Nothing extra for buttons; for emoji reactions the bot must be an admin of the group |
218
+ | LINE | Tap 👍 / 👎 on the card (LINE has no reactions API) | Rich reply style |
219
+
220
+ One vote per person per card; voting again changes it. Removing a reaction does **not** take the vote back (react with the other emoji instead).
221
+ Driftnet remembers which cards a Discord, Slack or Telegram reply was about for 30 days.
222
+
223
+ **Weekly digest.** Set `DRIFTNET_DIGEST=weekly` (or `daily`) and `DRIFTNET_DIGEST_TO` (or use ⚙ Settings → General) and driftnet posts one short
224
+ message at the chosen time: how many cards are new, how many wait in the Inbox, the five best new cards (worth, then shares) and what was shared
225
+ 2+ times. Nothing new, nothing sent. Times are the **server's local time** (set `TZ` to change it). If driftnet was off at the scheduled time it
226
+ sends one catch-up digest on the next start, never more. Links in it are your plain public URL (`DRIFTNET_PUBLIC_URL`), never the read-only share key,
227
+ since the text lands in a group. Try it with `POST /api/digest/send {"dryRun": true}`. A webhook also gets a `digest.sent` event.
228
+
191
229
  Bot tokens are read when driftnet starts: put them in `~/.driftnet/.env`, then stop and start it again.
192
230
 
193
231
  <p align="center"><img src="https://raw.githubusercontent.com/KevinChu1110/driftnet/main/assets/discord-zh-TW.jpg" alt="driftnet answering a Discord message with two links: one line per link, each pointing to its page" width="80%"></p>
194
232
  <sub>A real run in Discord (<code>DRIFTNET_LANGUAGE=Traditional Chinese (Taiwan)</code>): two links in one message, one line back for each. Name and server address hidden.</sub>
195
233
 
234
+ ## Command line
235
+
236
+ With driftnet running (`npx driftnet`), the same command talks to it. `search` and `export` also work when it is not running (they read `~/.driftnet/driftnet.db` directly); `add` and `import` need it running.
237
+
238
+ | Command | Example |
239
+ |---|---|
240
+ | `driftnet add <url> [--note "…"]` | `npx driftnet add https://github.com/acme/widget --note "for the demo"` |
241
+ | `driftnet search [query…] [--folder id] [--kind …] [--view inbox\|favorites\|trash] [--limit N] [--json]` | `npx driftnet search vector database --kind repo --limit 5` |
242
+ | `driftnet open [id]` | `npx driftnet open 12` |
243
+ | `driftnet export [--format json\|md\|vault] [-o file]` | `npx driftnet export --format vault -o links.zip` |
244
+ | `driftnet import <file or pack link> [--keep-folders] [--yes]` | `npx driftnet import bookmarks.html --keep-folders` |
245
+ | `driftnet status` | `npx driftnet status` |
246
+ | `driftnet completion bash\|zsh` | `eval "$(driftnet completion zsh)"` |
247
+ | `driftnet init [--client claude-code\|claude-desktop\|cursor\|windsurf\|codex\|all] [--remote URL --token T] [--yes] [--dry-run]` | `npx driftnet init --yes` |
248
+
249
+ For a server elsewhere, add `--url http://host:8787 --token <password>` (or set `DRIFTNET_URL` and `DRIFTNET_TOKEN`; the password is also read from `~/.driftnet/.env`).
250
+
196
251
  ## The web page
197
252
 
198
253
  <p align="center"><img src="https://raw.githubusercontent.com/KevinChu1110/driftnet/main/assets/screenshot-en.jpg" alt="The driftnet web page: your folder tree on the left, summarised tools on the right" width="100%"></p>
@@ -246,6 +301,21 @@ phone the sidebar folds into a ☰ drawer, and a line under the search box says
246
301
  newest, most shared), compact cards, tags, chat text, light or dark.
247
302
  - **Export** everything as one Markdown file, or as a zip of Markdown files with front matter that
248
303
  Obsidian opens as a vault and Notion imports (Import → Markdown & CSV).
304
+ - **Import bookmarks.** ⚙ Settings → *Import bookmarks* takes a browser bookmarks file (Chrome, Firefox,
305
+ Safari, Edge: HTML), a Pocket export (HTML or CSV), a Raindrop CSV, a JSON list of links, or any text
306
+ or Markdown with links in it. It shows how many are new before anything starts; tick *Keep my bookmark
307
+ folders* to mirror them under an **Imported** folder, otherwise the classifier sorts as usual. Links you
308
+ already have, repeats, non-web and private addresses are skipped, up to 5,000 per import. With a model
309
+ set up, each new link is one model call, so hundreds of links mean hundreds of calls.
310
+ - **Share a folder.** A folder's ⋯ menu → *Share as pack…* turns that folder, its sub-folders and the cards
311
+ in them into one JSON file (`"driftnet_pack": 1`, at most 1,000 cards and 2 MB): links, summaries, tags
312
+ and original picture URLs. Your notes, chat text, who shared what, counters, tokens and the share key never
313
+ go in, and neither do trashed or flagged cards. Download it, or copy a link (needs `DRIFTNET_PUBLIC_URL` or a
314
+ tunnel); on a private catalogue the link is signed for that one pack, so it opens without the share key and
315
+ shows nothing else. To pull one in, use Settings → Import → *From a pack link* (or `driftnet import <link>`,
316
+ or import the file): the folders are recreated under a top-level folder named after the pack and the cards
317
+ are stored as summarised, with no model call. Cards you already have keep your summary, text that looks like
318
+ instructions to an AI drops the card, and importing the same pack twice adds nothing.
249
319
  - **Shared links open read-only.** A card link from a chat bot or an agent carries the read-only share
250
320
  key, so it opens on a phone without a password; edit buttons appear after **Unlock** with the admin
251
321
  password. Forgot it? Open driftnet on the computer it runs on: Settings there sets a new one.
@@ -291,9 +361,24 @@ comments, and a reel's "link in the comments" turned into its GitHub repo.
291
361
  - **Right-click a link**: send it with the text of the post around it.
292
362
  - **Right-click a selection**: send just that.
293
363
 
294
- Install: `chrome://extensions` → Developer mode → **Load unpacked** → `apps/chrome-extension`. It
295
- talks to `http://localhost:8787`; for a remote server, set the URL and token in its settings. It
296
- reads a tab only when you click, and sends only to your own server.
364
+ **What it reads on Threads, X and Instagram.** Only on your click, only what is on screen, never a
365
+ fetch on the side; if a site's markup changes it falls back to the generic reader above.
366
+
367
+ | Site | Captured |
368
+ |---|---|
369
+ | **Threads** | The post and its author, quoted / reposted posts, up to 20 replies (it opens "View replies", 3 s at most), and the links in them with redirects removed |
370
+ | **X / Twitter** | The tweet with `t.co` links shown as their real targets (from the link's own title, never fetched), the quoted tweet, the card link, and the author's own thread (their later tweets; other people's replies are left out) |
371
+ | **Instagram** (`/p/`, `/reel/`) | The caption ("more" expanded), the author, the first 20 comments and the links in them. Links in bio and Story link stickers are not on the page, so they are skipped; a "link in comments" is found |
372
+
373
+ **Install**
374
+
375
+ - **Chrome Web Store**: coming soon.
376
+ - **From the zip** (a [release build](https://github.com/KevinChu1110/driftnet/actions/workflows/extension.yml), or `pnpm build:extension` → `dist/driftnet-extension-<version>.zip`): unzip it, open `chrome://extensions`, turn on Developer mode, **Load unpacked**, pick the unzipped folder.
377
+ - **From the source**: the same, picking `apps/chrome-extension`.
378
+
379
+ It talks to `http://localhost:8787`; for a remote server, set the URL and token in its settings. It
380
+ reads a tab only when you click, and sends only to your own server. See the
381
+ [privacy policy](https://github.com/KevinChu1110/driftnet/blob/main/apps/chrome-extension/store/PRIVACY.md).
297
382
 
298
383
  ## Models
299
384
 
@@ -302,21 +387,45 @@ driftnet asks a model for one thing: fill in a JSON schema. Pick who answers.
302
387
  | `DRIFTNET_LLM_PROVIDER` | Uses | Key |
303
388
  |---|---|---|
304
389
  | `anthropic` | Claude through the official SDK | `DRIFTNET_LLM_API_KEY` |
305
- | `openai` | Anything OpenAI-compatible: OpenAI, Gemini, Grok, DeepSeek, OpenRouter, LiteLLM, **Ollama / LM Studio** | `DRIFTNET_LLM_API_KEY` (none for local) |
390
+ | `openai` | Anything OpenAI-compatible: OpenAI, Grok, DeepSeek, OpenRouter, LiteLLM, **Ollama / LM Studio** | `DRIFTNET_LLM_API_KEY` (none for local) |
391
+ | `gemini` | Google's Gemini API directly (JSON-schema output) | `DRIFTNET_LLM_API_KEY` or `GEMINI_API_KEY` |
392
+ | `bedrock` | Amazon Bedrock, Converse API, signed with SigV4 (no AWS SDK) | `AWS_ACCESS_KEY_ID` + `AWS_SECRET_ACCESS_KEY` (+ `AWS_SESSION_TOKEN`), or `AWS_BEARER_TOKEN_BEDROCK` |
393
+ | `vertex` | Gemini on Google Cloud (Vertex AI) | A service-account JSON file (`GOOGLE_APPLICATION_CREDENTIALS`), or an access token in `DRIFTNET_LLM_API_KEY` |
306
394
  | `claude-cli` | **Your Claude subscription**, via Claude Code logged in on the same machine | none |
307
395
  | `gemini-cli` | **Your Google account**, via Gemini CLI logged in on the same machine | none |
308
396
  | *(empty)* | No model. Links are still extracted and listed (judged too if Jev is on), and wait in the [agent queue](#let-your-agent-do-the-reading) | none |
309
397
 
310
398
  ```bash
311
- DRIFTNET_LLM_PROVIDER=openai
312
- DRIFTNET_LLM_MODEL=gemini-3.8-flash
399
+ # Gemini API. The model is optional (default: gemini-flash-latest, which tracks the current Flash model)
400
+ DRIFTNET_LLM_PROVIDER=gemini
313
401
  DRIFTNET_LLM_API_KEY=...
314
- DRIFTNET_LLM_BASE_URL=https://generativelanguage.googleapis.com/v1beta/openai
402
+
403
+ # Amazon Bedrock: a model or inference-profile id from your Bedrock console, in a region you have access to
404
+ DRIFTNET_LLM_PROVIDER=bedrock
405
+ DRIFTNET_LLM_MODEL=<model id>
406
+ DRIFTNET_LLM_REGION=us-east-1 # or AWS_REGION
407
+ AWS_ACCESS_KEY_ID=... AWS_SECRET_ACCESS_KEY=... # + AWS_SESSION_TOKEN for temporary credentials
408
+ # …or, instead of the three AWS variables: AWS_BEARER_TOKEN_BEDROCK=<Bedrock API key>
409
+
410
+ # Google Vertex AI: a Gemini model id that exists in your region
411
+ DRIFTNET_LLM_PROVIDER=vertex
412
+ DRIFTNET_LLM_MODEL=<model id>
413
+ DRIFTNET_LLM_REGION=us-central1 # default; "global" also works
414
+ GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account.json
415
+ GOOGLE_CLOUD_PROJECT=my-project # optional if the key file names its project
315
416
  ```
316
417
 
317
418
  > [!NOTE]
318
419
  > driftnet never reads `ANTHROPIC_API_KEY` or `OPENAI_API_KEY`. Exporting those changes how other
319
- > tools bill you: Claude Code, for one, switches from your subscription to API billing.
420
+ > tools bill you: Claude Code, for one, switches from your subscription to API billing. The cloud
421
+ > providers do read their own cloud's standard variables (`AWS_*`, `GOOGLE_*`, `GEMINI_API_KEY`),
422
+ > because that is where those credentials live.
423
+
424
+ `gemini`, `bedrock` and `vertex` talk to fixed vendor hosts, sign and cache tokens themselves (no
425
+ cloud SDK is installed), time out after 30 s, retry 429 / 5xx once, and show the vendor's own error
426
+ message without ever printing a key. Bedrock has no schema-enforced output that every model supports,
427
+ so the schema goes in the prompt and the reply is validated like any other. driftnet keeps no count
428
+ of tokens or spend, whichever provider you pick.
320
429
 
321
430
  Whatever the provider, replies are validated against the schema; truncated or refused answers are
322
431
  retried once, and a link the model gives is kept only if it appears in what was fetched.
@@ -345,6 +454,35 @@ plan's limits.
345
454
 
346
455
  </details>
347
456
 
457
+ ### Judges
458
+
459
+ A judge files each link (folder, kind, worth) before the model is asked. `DRIFTNET_JUDGE` picks one:
460
+
461
+ | `DRIFTNET_JUDGE` | Does |
462
+ |---|---|
463
+ | *(empty)* | [Jev](https://console.typesafe.ai) if a TypeSafe key is set, otherwise the model files it |
464
+ | `jev` | Jev only |
465
+ | `rules` | **Free, no model.** Your rules file first, then word overlap with your folder names and descriptions. When it isn't sure it steps aside and the model (or "other") decides |
466
+ | `llm` / `heuristic` / `off` | No separate judge: the model files it, or "other" when there is no model |
467
+ | *a name* | A judge added by a plugin |
468
+
469
+ The rules file is `DRIFTNET_JUDGE_RULES`, one rule per line, first match wins:
470
+
471
+ ```text
472
+ # pattern -> folder (an id or the folder's name)
473
+ github.com/* -> coding # host + path, * matches anything
474
+ youtube.com -> videos # a bare host also covers its subdomains
475
+ kind:repo -> coding # repo, product, video, article, post or other
476
+ contains:sourdough -> cooking # a word in the title or text
477
+ ```
478
+
479
+ ### Plugins
480
+
481
+ A file in `~/.driftnet/plugins` may export `{ extractors, providers, judges }` (all optional; a lone
482
+ extractor or a list of extractors still works). A provider is `name: (env) => ({ label, complete })`
483
+ and is chosen with `DRIFTNET_LLM_PROVIDER=name`; a judge is `name: (env) => ({ name, judge })` chosen
484
+ with `DRIFTNET_JUDGE=name`. See [`examples/plugins/rainbow-judge.mjs`](https://github.com/KevinChu1110/driftnet/blob/main/examples/plugins/rainbow-judge.mjs).
485
+
348
486
  ## Agents
349
487
 
350
488
  ### Read, save and vote
@@ -449,9 +587,15 @@ set by the environment itself (systemd, Docker, your shell) wins and shows there
449
587
 
450
588
  | Variable | Default | Purpose |
451
589
  |---|---|---|
452
- | `DRIFTNET_LLM_PROVIDER` | *(off)* | `anthropic`, `openai`, `claude-cli`, `gemini-cli` or empty |
453
- | `DRIFTNET_LLM_MODEL` | — | Model name. Required for `anthropic` and `openai`; `claude-cli` defaults to `haiku` |
454
- | `DRIFTNET_LLM_API_KEY` | — | Key for that provider (none for Ollama / LM Studio) |
590
+ | `DRIFTNET_LLM_PROVIDER` | *(off)* | `anthropic`, `openai`, `gemini`, `bedrock`, `vertex`, `claude-cli`, `gemini-cli`, a plugin's name, or empty |
591
+ | `DRIFTNET_LLM_MODEL` | — | Model name. Required for `anthropic`, `openai`, `bedrock` and `vertex`; `gemini` defaults to `gemini-flash-latest`; `claude-cli` to `haiku` |
592
+ | `DRIFTNET_LLM_API_KEY` | — | Key for that provider (none for Ollama / LM Studio; for `vertex`, an access token instead of a key file) |
593
+ | `DRIFTNET_LLM_REGION` | `us-central1` (vertex) | Region for `bedrock` (falls back to `AWS_REGION`) and `vertex` |
594
+ | `AWS_ACCESS_KEY_ID` · `AWS_SECRET_ACCESS_KEY` · `AWS_SESSION_TOKEN` | — | `bedrock` credentials |
595
+ | `AWS_BEARER_TOKEN_BEDROCK` | — | `bedrock` with a Bedrock API key instead of the three above |
596
+ | `GOOGLE_APPLICATION_CREDENTIALS` · `DRIFTNET_VERTEX_CREDENTIALS` | — | `vertex`: service-account key file (or its JSON text in the second) |
597
+ | `GOOGLE_CLOUD_PROJECT` | from the key file | `vertex` project |
598
+ | `GEMINI_API_KEY` | — | `gemini` key when `DRIFTNET_LLM_API_KEY` is empty |
455
599
  | `DRIFTNET_LLM_BASE_URL` | OpenAI | Endpoint for the `openai` provider |
456
600
  | `DRIFTNET_LLM_EFFORT` | `anthropic`: `low` | `anthropic`: `low`–`xhigh`; `openai`: `reasoning_effort`; `claude-cli`: `--effort` |
457
601
  | `DRIFTNET_CLI_PATH` | `claude` / `gemini` | CLI binary for `claude-cli` / `gemini-cli` |
@@ -460,18 +604,28 @@ set by the environment itself (systemd, Docker, your shell) wins and shows there
460
604
  | `DRIFTNET_SUMMARY_DEPTH` | `standard` | How much each card says: `brief`, `standard` or `detailed` |
461
605
  | `DRIFTNET_LOCALE` | from `DRIFTNET_LANGUAGE` | Force the bot's own words to `en` or `zh-TW` |
462
606
  | `DRIFTNET_REPLY` | `link` | Chat replies: `link` (one line + web link), `full` (the summary in chat) or `off` |
607
+ | `DRIFTNET_REPLY_STYLE` | `rich` | `rich` (embeds, Block Kit, Flex cards, vote buttons) or `text` (plain messages) |
463
608
  | `TYPESAFE_API_KEY` | `~/.typesafe/api_key` | Enables the Jev judge; `DRIFTNET_JUDGE=off` disables it |
609
+ | `DRIFTNET_JUDGE` | Jev if keyed | `jev`, `rules`, `llm`, `heuristic`, `off` or a plugin's judge ([Judges](#judges)) |
610
+ | `DRIFTNET_JUDGE_RULES` | — | Rules file for the `rules` judge |
464
611
  | `DRIFTNET_MIN_CONFIDENCE` | `0.4` | Below this, the model classifies instead of Jev |
465
612
  | `DRIFTNET_DIGEST_TOKENS` | `350` | Token budget of the page outline |
466
613
  | `DRIFTNET_FOLDERS` | `ai` | Starting folder template on a new database: `ai` (AI & coding), `research` (papers, articles, datasets…) or `everyday` (cooking, travel, money…). An empty catalogue also offers the choice on the page |
467
- | `DRIFTNET_WEBHOOK_URL` | — | POST each card change here as JSON (`item.added` / `item.updated` / `item.trashed` / `item.restored`), 5 s timeout, one retry after 1 s, redirects not followed |
614
+ | `DRIFTNET_DIGEST` | `off` | Scheduled digest into your chats: `off`, `daily` or `weekly` ([Weekly digest](#ways-in)) |
615
+ | `DRIFTNET_DIGEST_AT` | `09:00` | Time of day, `HH:MM`, in the server's local time (the `TZ` variable is respected) |
616
+ | `DRIFTNET_DIGEST_DAY` | `mon` | Day of the week for `weekly`: `mon`…`sun` |
617
+ | `DRIFTNET_DIGEST_TO` | — | Where it goes, comma separated: `telegram:<chat id>`, `discord:<channel id>`, `slack:<channel id>`, `line:<user, group or room id>`; uses the bot tokens already set |
618
+ | `DRIFTNET_WEBHOOK_URL` | — | POST each card change here as JSON (`item.added` / `item.updated` / `item.trashed` / `item.restored`, plus `digest.sent`), 5 s timeout, one retry after 1 s, redirects not followed |
468
619
  | `DRIFTNET_WEBHOOK_SECRET` | — | Signs each delivery: `X-Driftnet-Signature: sha256=<hmac of "<X-Driftnet-Timestamp>.<body>">`. Reject old timestamps to stop replays; `X-Driftnet-Delivery` stays the same on the retry |
469
620
  | `DRIFTNET_WEBHOOK_ALLOW_LOCAL` | — | `1` allows a webhook on a private address (n8n on your LAN), for that exact host only |
470
621
  | `DRIFTNET_CATEGORIES` | built-in | JSON file of starting folders, `{ "id": "description" }`, used once on a new database; after that, edit folders on the page |
471
622
  | `GITHUB_TOKEN` | — | GitHub API limit from 60 to 5,000 requests per hour |
472
623
  | `DRIFTNET_SUMMARY_RULES` | — | Your own instructions for every summary, e.g. “Say whether it is free.” Agents get them too |
473
624
  | `DRIFTNET_BLOCK_DOMAINS` | — | Domains never catalogued (subdomains included), comma separated |
474
- | `DRIFTNET_PLUGINS` | `~/.driftnet/plugins` | Folder of extractor plugins (`.js` / `.mjs`), see [`examples/plugins`](https://github.com/KevinChu1110/driftnet/blob/main/examples/plugins) |
625
+ | `DRIFTNET_HEALTH` | `off` | `weekly` re-checks links about once a week and marks dead, archived and stale cards (see Link health). Off by default: it makes network requests |
626
+ | `DRIFTNET_VIDEO` | `auto` | `off` never reads videos; `auto` uses whichever of `yt-dlp`, `ffmpeg`, `tesseract` and `whisper` are installed (see Reels and shorts) |
627
+ | `DRIFTNET_YTDLP`, `DRIFTNET_FFMPEG`, `DRIFTNET_TESSERACT`, `DRIFTNET_WHISPER` | found on `PATH` | Full path of a tool that is not on `PATH` (`whisper` may also be `whisper-cli`; whisper.cpp needs `DRIFTNET_WHISPER_MODEL`, a model file) |
628
+ | `DRIFTNET_PLUGINS` | `~/.driftnet/plugins` | Folder of plugins: extractors, providers, judges (`.js` / `.mjs`), see [`examples/plugins`](https://github.com/KevinChu1110/driftnet/blob/main/examples/plugins) |
475
629
  | `DRIFTNET_TOKEN` | — | Admin password: writes, settings, agent tokens, MCP with every tool, the agent queue. Settable on the page |
476
630
  | `DRIFTNET_READ_KEY` | — | Read-only share key (header or `?key=`): reading and the read-only MCP tools |
477
631
  | `DRIFTNET_ACCESS` | `public` | `public`: anyone can read. `private`: reads need the password, the share key or an agent token |
@@ -493,10 +647,10 @@ set by the environment itself (systemd, Docker, your shell) wins and shows there
493
647
  | `LINE_CHANNEL_SECRET` · `LINE_CHANNEL_ACCESS_TOKEN` | — | LINE |
494
648
 
495
649
  **HTTP:** `GET /` · `GET /api/items[/:id]` (`?view=favorites|trash`) · `POST /api/items/:id/feedback` ·
496
- `POST /api/items/:id/{trash,restore,favorite,unfavorite,move}` · `GET|POST /api/folders` · `PATCH|DELETE /api/folders/:id` · `POST /api/ingest` ·
497
- `POST /api/chat` · `POST /api/pending` · `POST /api/items/:id/enrich` · `GET /api/stats` ·
498
- `PUT /api/items/:id/note` · `GET|POST /api/notes` · `PUT|DELETE /api/notes/:id` · `GET /api/export` (`?format=vault`) ·
499
- `GET|PUT /api/settings` (this machine, or with the token) · `GET|POST /api/agent-tokens` · `DELETE /api/agent-tokens/:id[?purge=1]` (revoke, or remove a revoked one; admin password only) · `GET /api/categories` · `POST /api/items/:id/refresh` · `POST /api/folders/template` · `GET /llms.txt` · `GET /feed.xml` · `GET /openapi.json` · `/mcp`
650
+ `POST /api/items/:id/{trash,restore,favorite,unfavorite,move}` · `GET|POST /api/folders` · `PATCH|DELETE /api/folders/:id` · `GET /api/folders/:id/pack` (`?s=` signed link) · `GET /api/folders/:id/pack-link` · `POST /api/ingest` ·
651
+ `POST /api/chat` · `POST /api/digest/send` (`{"dryRun": true}` shows the text) · `POST /api/pending` · `POST /api/items/:id/enrich` · `GET /api/stats` ·
652
+ `PUT /api/items/:id/note` · `GET|POST /api/notes` · `PUT|DELETE /api/notes/:id` · `GET /api/export` (`?format=vault`) · `POST /api/import` (`{content}` or `{url}` of a pack) · `GET /api/import/:job` ·
653
+ `GET|PUT /api/settings` (this machine, or with the token) · `GET|POST /api/agent-tokens` · `DELETE /api/agent-tokens/:id[?purge=1]` (revoke, or remove a revoked one; admin password only) · `GET /api/categories` · `POST /api/items/:id/refresh` · `POST /api/items/:id/health` · `POST /api/folders/template` · `GET /llms.txt` · `GET /feed.xml` · `GET /openapi.json` · `/mcp`
500
654
 
501
655
  </details>
502
656
 
@@ -576,14 +730,8 @@ Extend it: a site (a plugin file in `~/.driftnet/plugins`, like
576
730
  [`examples/plugins/hackernews.mjs`](https://github.com/KevinChu1110/driftnet/blob/main/examples/plugins/hackernews.mjs), or `registerExtractor()`), a model (`LlmProvider`), a judge (`Judge`), a chat
577
731
  platform (`handleChatText()`), browser capture (`collect.js`), or a bot language (`i18n.ts`).
578
732
 
579
- **Good first issues**, found by running driftnet on links people actually share:
580
-
581
- - [ ] **Video.** Captions and on-screen text with local OCR first, local speech-to-text second; many
582
- reels only say the tool's name out loud.
583
- - [ ] **Rich replies.** LINE Flex, Slack Block Kit, Discord embeds, voting by reaction.
584
- - [ ] **Weekly digest** posted back to the chat.
585
- - [ ] **Extension polish.** Threads / X / Instagram capture, a Chrome Web Store build.
586
- - [ ] **More adapters.** Native Gemini, Bedrock, Vertex; more judges.
733
+ **Want to help?** Look for [`good first issue`](https://github.com/KevinChu1110/driftnet/labels/good%20first%20issue) on GitHub, or open an issue with
734
+ a link driftnet handled badly: real links people share are how every feature here was found.
587
735
 
588
736
  ## Support
589
737