@steipete/summarize 0.21.7 → 0.21.9

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/CHANGELOG.md CHANGED
@@ -1,5 +1,32 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.21.9 - 2026-08-08
4
+
5
+ ### Fixes
6
+
7
+ - Chrome extension: restore Video + Slides capture from toolbar-opened side panels by granting production builds the visible-tab access Chrome requires.
8
+ - Summaries: structure multi-point pages and discussion threads as scannable Markdown blocks instead of dense prose.
9
+ - Security: route remote asset classification and downloads through the daemon's SSRF-guarded fetcher (#380, thanks @bunlongheng).
10
+ - Chrome extension: stop cancelled or disconnected native-companion bridge requests before they can launch a stale native host (#379, thanks @vincent-peng).
11
+
12
+ ### Dependencies and maintenance
13
+
14
+ - Refresh policy-eligible runtime, extension, browser media, test, formatting, lint, and type dependencies.
15
+
16
+ ### Documentation
17
+
18
+ - Rewrite the README as a concise front door to the CLI, browser extension, and task-focused guides.
19
+
20
+ ## 0.21.8 - 2026-08-01
21
+
22
+ ### Fixes
23
+
24
+ - Chrome extension: reload stale service workers after granting Native Messaging so daemon requests recover on retry (#372, thanks @materemias).
25
+
26
+ ### Dependencies and maintenance
27
+
28
+ - Refresh policy-eligible runtime, browser media, test, formatting, and lint dependencies.
29
+
3
30
  ## 0.21.7 - 2026-07-27
4
31
 
5
32
  ### Highlights
@@ -11,6 +38,7 @@
11
38
 
12
39
  - Refresh the CLI, browser-media, test, formatting, lint, and GitHub Actions toolchain.
13
40
  - Sign and notarize the Bun macOS executables, verify both architectures without signing credentials, and publish only the verified artifacts.
41
+ - Embed the tokenizer vocabulary in standalone Bun executables so release binaries do not depend on checkout files.
14
42
 
15
43
  ## 0.21.6 - 2026-07-18
16
44
 
package/README.md CHANGED
@@ -1,900 +1,136 @@
1
- # Summarize 📝 — Chrome Side Panel + CLI
1
+ # Summarize 📝 — Link in, signal out.
2
2
 
3
- Fast summaries from URLs, files, and media. Works in the terminal, a Chrome Side Panel and Firefox Sidebar.
3
+ [![CI](https://img.shields.io/github/actions/workflow/status/steipete/summarize/ci.yml?branch=main&style=flat-square&label=ci)](https://github.com/steipete/summarize/actions/workflows/ci.yml)
4
+ [![npm](https://img.shields.io/npm/v/@steipete/summarize?style=flat-square)](https://www.npmjs.com/package/@steipete/summarize)
5
+ [![Node](https://img.shields.io/node/v/@steipete/summarize?style=flat-square)](https://nodejs.org/)
6
+ [![License](https://img.shields.io/github/license/steipete/summarize?style=flat-square)](LICENSE)
4
7
 
5
- ## Highlights
6
-
7
- - Chrome Side Panel **chat** (streaming agent + history) inside the sidebar.
8
- - **Video slides**: screenshots + OCR + transcript cards for YouTube, direct video URLs, and local video files.
9
- - Media-aware summaries: auto‑detect video/audio vs page content.
10
- - Coding CLI backends: Codex, Claude, Gemini, Cursor Agent, OpenClaw, OpenCode, GitHub Copilot, Antigravity, pi.
11
- - Streaming Markdown + metrics + cache‑aware status.
12
- - CLI supports URLs, files, podcasts, YouTube, audio/video, PDFs.
13
-
14
- ## Feature overview
15
-
16
- - URLs, files, and media: web pages, PDFs, images, audio/video, YouTube, podcasts, RSS.
17
- - Slide extraction for video sources (YouTube, direct video URLs, local video files) with OCR + timestamped cards.
18
- - Transcript-first media flow: published transcripts when available, then Groq/ONNX/whisper.cpp/AssemblyAI/Gemini/OpenAI/FAL/Deepgram transcription fallback when not.
19
- - Coding CLI providers: Claude, Codex, Gemini, Cursor Agent, OpenClaw, OpenCode, GitHub Copilot, Antigravity, pi.
20
- - Streaming output with Markdown rendering, metrics, and cache-aware status.
21
- - Local, paid, and free models: OpenAI‑compatible local endpoints, paid providers, plus an OpenRouter free preset.
22
- - Output modes: Markdown/text, JSON diagnostics, extract-only, metrics, timing, and cost estimates.
23
- - Smart default: if content is shorter than the requested length, we return it as-is (use `--force-summary` to override).
24
-
25
- ## Get the extension (recommended)
8
+ Summarize extracts clean text and produces summaries from web pages, files, YouTube videos, podcasts, and other audio or video. Use it from the Node.js CLI or from the Chrome Side Panel and Firefox Sidebar.
26
9
 
27
10
  ![Summarize extension screenshot](docs/assets/summarize-extension.png)
28
11
 
29
- One‑click summarizer for the current tab. Chrome Side Panel + Firefox Sidebar + local daemon for streaming Markdown.
30
-
31
- **Chrome Web Store:** [Summarize Side Panel](https://chromewebstore.google.com/detail/summarize/cejgnmmhbbpdmjnfppjdfkocebngehfg)
32
-
33
- YouTube slide screenshots (from the browser):
34
-
35
- ![Summarize YouTube slide screenshots](docs/assets/youtube-slides.png)
36
-
37
- ### Beginner quickstart (extension)
38
-
39
- 1. Install the extension (Chrome Web Store link above) and open the Side Panel.
40
- 2. Choose **Direct** or **Daemon**. Direct uses Gemini Nano by default when no provider key is configured, or calls your selected provider from Chrome.
41
- 3. Choose Browser media for daemonless transcription/slides. Optional: install the CLI and pair the daemon for native tools, CLI model fallbacks, OCR, and broader media support:
42
- - **npm** (cross-platform): `npm i -g @steipete/summarize`
43
- - **Homebrew** (Homebrew/core): `brew install summarize`
44
- - `summarize daemon install --token <TOKEN> --port 8787`
45
-
46
- Why a daemon/service?
47
-
48
- - Direct mode works without the daemon. Auto uses a configured OpenAI, OpenRouter, Anthropic, Gemini, xAI, Z.AI, NVIDIA, MiniMax, GitHub Models, or Ollama provider, otherwise Gemini Nano on-device; keys remain in extension-local storage.
49
- - The optional daemon adds CLI model fallbacks, shared caches/diagnostics, native ffmpeg, configurable transcription providers, OCR, and broader media support. Chrome reaches it through an explicitly enabled Native Messaging host; retained loopback network access is used only by configured Direct local providers.
50
- - The service autostarts (launchd/systemd/Scheduled Task) so the Side Panel is always ready.
51
-
52
- If you only want the **CLI**, you can skip the daemon install entirely.
53
-
54
- Notes:
55
-
56
- - Summarization only runs when the Side Panel is open.
57
- - Auto mode summarizes on navigation (incl. SPAs); otherwise use the button.
58
- - Daemon is localhost-only and requires a shared token; rerunning `summarize daemon install --token <TOKEN>` adds another paired browser token instead of invalidating the old one.
59
- - Chrome local-companion access is optional and browser-policy enforceable; Direct and Browser modes do not require it.
60
- - Non-default port: install with `summarize daemon install --token <TOKEN> --port <PORT>`, then set the same value in **Options → Runtime → Daemon → Port**.
61
- - Autostart: macOS (launchd), Linux (systemd user), Windows (Scheduled Task).
62
- - Windows containers: `summarize daemon install` starts the daemon for the current container session but does not register a Scheduled Task. Chrome Daemon mode also needs the pending packaged Windows native-host executable; Direct and Browser modes remain available.
63
- - Tip: configure `free` via `summarize refresh-free` (needs `OPENROUTER_API_KEY`). Add `--set-default` to set model=`free`.
64
-
65
- More:
66
-
67
- - Step-by-step install: [apps/chrome-extension/README.md](apps/chrome-extension/README.md)
68
- - Architecture + troubleshooting: [docs/chrome-extension.md](docs/chrome-extension.md)
69
- - Firefox compatibility notes: [apps/chrome-extension/docs/firefox.md](apps/chrome-extension/docs/firefox.md)
70
-
71
- ### Slides (extension)
72
-
73
- - Select **Video + Slides** in the Summarize picker.
74
- - Slides render at the top; expand to full‑width cards with timestamps.
75
- - Click a slide to seek the video; toggle **Transcript/OCR** when OCR is significant.
76
- - Browser mode uses MediaBunny with native WebCodecs and ranged network reads for fetchable videos, then falls back to visible-tab capture when the source or codec is unavailable.
77
- - Daemon mode adds `yt-dlp`, native ffmpeg, and optional `tesseract` OCR.
78
-
79
- ### Advanced (unpacked / dev)
80
-
81
- 1. Build + load the extension (unpacked):
82
- - Chrome: `pnpm -C apps/chrome-extension build`
83
- - `chrome://extensions` → Developer mode → Load unpacked
84
- - Pick: `apps/chrome-extension/.output/chrome-mv3`
85
- - Firefox: `pnpm -C apps/chrome-extension build:firefox`
86
- - `about:debugging#/runtime/this-firefox` → Load Temporary Add-on
87
- - Pick: `apps/chrome-extension/.output/firefox-mv3/manifest.json`
88
- 2. Open Side Panel/Sidebar → copy token.
89
- 3. Install daemon in dev mode:
90
- - `pnpm summarize daemon install --token <TOKEN> --dev --extension-id <UNPACKED_ID>`
91
-
92
- ## CLI
93
-
94
- ![Summarize CLI screenshot](docs/assets/summarize-cli.png)
95
-
96
- ### Install
97
-
98
- Requires Node 24+.
99
-
100
- - npx (no install):
101
-
102
- ```bash
103
- npx -y @steipete/summarize "https://example.com"
104
- ```
105
-
106
- - npm (global):
107
-
108
- ```bash
109
- npm i -g @steipete/summarize
110
- ```
111
-
112
- - npm (library / minimal deps):
113
-
114
- ```bash
115
- npm i @steipete/summarize-core
116
- ```
117
-
118
- ```ts
119
- import { createLinkPreviewClient } from "@steipete/summarize-core/content";
120
- ```
121
-
122
- - Homebrew:
123
-
124
- ```bash
125
- brew install summarize
126
- ```
127
-
128
- Homebrew ships from `homebrew/core` via `brew install summarize`.
129
- If Homebrew is unavailable in your environment, use the npm global install above.
130
-
131
- ### Optional local dependencies
132
-
133
- Install these if you want media-heavy features:
134
-
135
- - `ffmpeg`: optional native accelerator with broader codec support; bundled WebAssembly is the fallback
136
- - `yt-dlp`: required for YouTube slide extraction and some remote media flows
137
- - `tesseract`: optional OCR for `--slides-ocr`
138
- - Optional cloud transcription providers:
139
- - `GROQ_API_KEY`
140
- - `ASSEMBLYAI_API_KEY`
141
- - `ELEVENLABS_API_KEY` (speaker diarization)
142
- - `GEMINI_API_KEY` / `GOOGLE_GENERATIVE_AI_API_KEY` / `GOOGLE_API_KEY`
143
- - `OPENAI_API_KEY`
144
- - `FAL_KEY`
145
- - `DEEPGRAM_API_KEY`
146
-
147
- macOS (Homebrew):
148
-
149
- ```bash
150
- brew install ffmpeg yt-dlp
151
- brew install tesseract # optional, for --slides-ocr
152
- ```
153
-
154
- If native `ffmpeg`/`ffprobe` are unavailable, Summarize uses the bundled WebAssembly build. Native ffmpeg remains recommended for speed and broader codec/filter support.
155
-
156
- ### CLI vs extension
157
-
158
- - **CLI only:** just install via npm/Homebrew and run `summarize ...` (no daemon needed).
159
- - **Chrome extension:** Direct mode defaults to Gemini Nano without a key and supports provider-backed summaries/chat/automation/hover when configured; Browser media provides daemonless transcription and slides. Install the daemon for CLI fallbacks and native media tools.
160
- - **Firefox extension:** install the CLI and daemon for media extraction.
161
-
162
- ### Quickstart
163
-
164
- ```bash
165
- summarize "https://example.com"
166
- ```
167
-
168
- Inspect the effective model setup. Status only lists configured or usable providers; it never prints
169
- keys or missing-provider noise.
170
-
171
- ```bash
172
- summarize status
173
- summarize status --verbose
174
- summarize status --probe
175
- summarize status --json
12
+ ```console
13
+ $ summarize "https://example.com" --extract --plain
14
+ This domain is for use in documentation examples without needing permission. Avoid use in operations.
15
+ [Learn more](https://iana.org/domains/example)
176
16
  ```
177
17
 
178
- `--probe` checks supported model-list endpoints without running paid inference. CLI providers are
179
- reported as available when their enabled executable is present; API providers are reported as
180
- configured when an effective key is present.
181
-
182
- ### Inputs
18
+ ## Install
183
19
 
184
- URLs or local paths:
20
+ Run it once without installing:
185
21
 
186
22
  ```bash
187
- summarize "/path/to/file.pdf" --model google/gemini-3-flash
188
- summarize "https://example.com/report.pdf" --model google/gemini-3-flash
189
- summarize "/path/to/audio.mp3"
190
- summarize "/path/to/video.mp4"
23
+ npx -y @steipete/summarize --version
191
24
  ```
192
25
 
193
- Stdin (pipe content using `-`):
26
+ Or install the CLI with npm or Homebrew:
194
27
 
195
28
  ```bash
196
- echo "content" | summarize -
197
- pbpaste | summarize -
198
- # binary stdin also works (PDF/image/audio/video bytes)
199
- cat /path/to/file.pdf | summarize -
29
+ npm install --global @steipete/summarize
200
30
  ```
201
31
 
202
- **Notes:**
203
-
204
- - Stdin has a 50MB size limit
205
- - The `-` argument tells summarize to read from standard input
206
- - Text stdin is treated as UTF-8 text (whitespace-only input is rejected as empty)
207
- - Binary stdin is preserved as raw bytes and file type is auto-detected when possible
208
- - Useful for piping clipboard content or command output
209
-
210
- YouTube (supports `youtube.com` and `youtu.be`):
211
-
212
32
  ```bash
213
- summarize "https://youtu.be/dQw4w9WgXcQ" --youtube auto
214
- ```
215
-
216
- Podcast RSS (transcribes latest enclosure):
217
-
218
- ```bash
219
- summarize "https://feeds.npr.org/500005/podcast.xml"
220
- ```
221
-
222
- Apple Podcasts episode page:
223
-
224
- ```bash
225
- summarize "https://podcasts.apple.com/us/podcast/2424-jelly-roll/id360084272?i=1000740717432"
226
- ```
227
-
228
- Spotify episode page (best-effort; may fail for exclusives):
229
-
230
- ```bash
231
- summarize "https://open.spotify.com/episode/5auotqWAXhhKyb9ymCuBJY"
232
- ```
233
-
234
- HLS playlist:
235
-
236
- ```bash
237
- summarize "https://example.com/master.m3u8"
238
- ```
239
-
240
- ### Output length
241
-
242
- `--length` controls how much output we ask for (guideline), not a hard cap.
243
- The built-in default is `long`.
244
-
245
- Set a default in `~/.summarize/config.json` with `output.length`.
246
-
247
- ```bash
248
- summarize "https://example.com" --length long
249
- summarize "https://example.com" --length 20k
250
- ```
251
-
252
- - Presets: `short|medium|long|xl|xxl`
253
- - Character targets: `1500`, `20k`, `20000`
254
- - Optional hard cap: `--max-output-tokens <count>` (e.g. `2000`, `2k`)
255
- - Provider/model APIs still enforce their own maximum output limits.
256
- - If omitted, no max token parameter is sent (provider default).
257
- - Prefer `--length` unless you need a hard cap.
258
- - Short content: when extracted content is shorter than the requested length, the CLI returns the content as-is.
259
- - Override with `--force-summary` to always run the LLM.
260
- - Minimums: `--length` numeric values must be >= 10 chars; `--max-output-tokens` must be >= 16.
261
- - Preset targets (source of truth: `packages/core/src/prompts/summary-lengths.ts`):
262
- - short: target ~900 chars (range 600-1,200)
263
- - medium: target ~1,800 chars (range 1,200-2,500)
264
- - long: target ~4,200 chars (range 2,500-6,000)
265
- - xl: target ~9,000 chars (range 6,000-14,000)
266
- - xxl: target ~17,000 chars (range 14,000-22,000)
267
-
268
- ### What file types work?
269
-
270
- Best effort and provider-dependent. These usually work well:
271
-
272
- - `text/*` and common structured text (`.txt`, `.md`, `.json`, `.yaml`, `.xml`, ...)
273
- - Text-like files are inlined into the prompt for better provider compatibility.
274
- - PDFs: `application/pdf` (provider support varies; Google is the most reliable here)
275
- - Images: `image/jpeg`, `image/png`, `image/webp`, `image/gif`
276
- - Audio/Video: `audio/*`, `video/*` (local audio/video files MP3/WAV/M4A/OGG/FLAC/MP4/MOV/WEBM automatically transcribed, when supported by the model)
277
-
278
- Notes:
279
-
280
- - If a provider rejects a media type, the CLI fails fast with a friendly message.
281
- - xAI models do not support attaching generic files (like PDFs) via the AI SDK; use Google/OpenAI/Anthropic for those.
282
-
283
- ### Model ids
284
-
285
- Use gateway-style ids: `<provider>/<model>`.
286
-
287
- Examples:
288
-
289
- - `openai/gpt-5.4`
290
- - `openai/gpt-5.4-mini`
291
- - `openai/gpt-5.4-nano`
292
- - `openai/gpt-5-mini`
293
- - `openai/gpt-5-nano`
294
- - `github-copilot/gpt-5.4`
295
- - `anthropic/claude-sonnet-4-5`
296
- - `xai/grok-4-fast-non-reasoning`
297
- - `google/gemini-3-flash`
298
- - `zai/glm-4.7`
299
- - `minimax/MiniMax-M3`
300
- - `openrouter/openai/gpt-5-mini` (force OpenRouter)
301
-
302
- Note: some models/providers do not support streaming or certain file media types. When that happens, the CLI prints a friendly error (or auto-disables streaming for that model when supported by the provider).
303
- `gpt-5.4-mini` and `gpt-5.4-nano` are treated as real model ids; the same shorthand also works under `github-copilot/...`.
304
-
305
- ### OpenAI fast mode and thinking
306
-
307
- Fast mode is a request option, not a model id:
308
-
309
- ```bash
310
- summarize "https://example.com" --model openai/gpt-5.5 --fast --thinking medium
311
- summarize "https://example.com" --model openai/gpt-5.4 --service-tier fast --thinking low
312
- ```
313
-
314
- - `--fast` is shorthand for `--service-tier fast`.
315
- - `--service-tier default|fast|priority|flex` controls OpenAI service tier. `fast` is the summarize/Codex-facing spelling and is sent to OpenAI as `service_tier="priority"`.
316
- - `--thinking none|low|medium|high|xhigh` controls OpenAI reasoning effort. Aliases: `off` → `none`, `min` → `low`, `mid` / `med` → `medium`, `x-high` / `extra-high` → `xhigh`.
317
- - `--service-tier default` clears a configured tier for one run.
318
-
319
- Config equivalent:
320
-
321
- ```json
322
- {
323
- "model": "openai/gpt-5.5",
324
- "openai": {
325
- "serviceTier": "fast",
326
- "thinking": "medium"
327
- }
328
- }
329
- ```
330
-
331
- Compatibility aliases still work, but prefer the explicit flags above:
332
-
333
- - `--model gpt-fast` / `--model fast` → `openai/gpt-5.5` + fast tier + medium thinking
334
- - `--model openai/gpt-5.5-fast` → `openai/gpt-5.5` + fast tier
335
-
336
- ### Limits
337
-
338
- - Text inputs over 10 MB are rejected before tokenization.
339
- - Text prompts are preflighted against the model input limit (LiteLLM catalog), using a GPT tokenizer.
340
-
341
- ### Common flags
342
-
343
- ```bash
344
- summarize <input> [flags]
345
- ```
346
-
347
- Use `summarize --help` or `summarize help` for the full help text.
348
-
349
- - `--model <provider/model>`: which model to use (defaults to `auto`)
350
- - `--model auto`: automatic model selection + fallback (default)
351
- - `--model <name>`: use a built-in or config-defined preset (see Configuration)
352
- - `--timeout <duration>`: `30s`, `2m`, `5000ms` (default `2m`)
353
- - `--retries <count>`: LLM retry attempts after timeouts or transient API failures (default `1`)
354
- - `--length short|medium|long|xl|xxl|s|m|l|<chars>`
355
- - `--language, --lang <language>`: output language (`auto` = match source)
356
- - `--max-output-tokens <count>`: hard cap for LLM output tokens
357
- - `--cli [provider]`: use a CLI provider (`--model cli/<provider>`). Supports `claude`, `gemini`, `codex`, `agent`, `openclaw`, `opencode`, `copilot`, `agy`, `pi`. If omitted, uses auto selection with CLI enabled.
358
- - `--stream auto|on|off`: stream LLM output (`auto` = TTY only; disabled in `--json` mode)
359
- - `--plain`: keep raw output (no ANSI/OSC Markdown rendering)
360
- - `--no-color`: disable ANSI colors
361
- - `--theme <name>`: CLI theme (`aurora`, `ember`, `moss`, `mono`)
362
- - `--format md|text`: website/file content format (default `text`)
363
- - `--markdown-mode off|auto|llm|readability`: HTML -> Markdown mode (default `readability`)
364
- - `--preprocess off|auto|always`: controls `uvx markitdown` usage (default `auto`)
365
- - Install `uvx`: `brew install uv` (or https://astral.sh/uv/)
366
- - Image-only PDFs can fall back to OpenAI vision OCR when `OPENAI_API_KEY` is set; override the OCR model with `MARKITDOWN_OCR_MODEL` or page render DPI with `MARKITDOWN_OCR_DPI`.
367
- - `--extract`: print extracted content and exit (URLs, YouTube/direct media, local audio/video, and local PDFs; stdin `-` is not supported)
368
- - Deprecated alias: `--extract-only`
369
- - `--slides`: extract slides for YouTube, direct video URLs, or local video files and render them inline in the summary narrative (auto-renders inline in supported terminals)
370
- - `--no-slides`: disable slide extraction enabled in `~/.summarize/config.json` for one run
371
- - `--slides-ocr`: run OCR on extracted slides (requires `tesseract`)
372
- - `--no-slides-ocr`: disable slide OCR enabled in `~/.summarize/config.json` for one run
373
- - `--slides-dir <dir>`: base output dir for slide images (default `./slides`)
374
- - `--slides-scene-threshold <value>`: scene detection threshold (0.1-1.0)
375
- - `--slides-max <count>`: maximum slides to extract (default `6`)
376
- - `--slides-min-duration <seconds>`: minimum seconds between slides
377
- - `--json`: machine-readable output with diagnostics, prompt, `metrics`, and optional summary
378
- - `--verbose`: debug/diagnostics on stderr
379
- - `--metrics off|on|detailed`: metrics output (default `on`)
380
-
381
- ### Coding CLIs (Codex, Claude, Gemini, Agent, OpenClaw, OpenCode, Copilot, Antigravity, pi)
382
-
383
- Summarize can use common coding CLIs as local model backends:
384
-
385
- - `codex` -> `--cli codex` / `--model cli/codex/<model>`
386
- - `claude` -> `--cli claude` / `--model cli/claude/<model>`
387
- - `gemini` -> `--cli gemini` / `--model cli/gemini/<model>`
388
- - `agent` (Cursor Agent CLI) -> `--cli agent` / `--model cli/agent/<model>`
389
- - `openclaw` -> `--cli openclaw` / `--model cli/openclaw/<model>` or `--model openclaw/<model>`
390
- - `opencode` -> `--cli opencode` / `--model cli/opencode/<model>` (`--model cli/opencode` uses the OpenCode runtime default)
391
- - `copilot` (GitHub Copilot CLI) -> `--cli copilot` / `--model cli/copilot/<model>` (`--model cli/copilot` uses the Copilot runtime default)
392
- - `agy` (Antigravity CLI) -> `--cli agy` / `--model cli/agy` (uses agy's active session model; per-call model selection is not supported by agy print mode)
393
- - `pi` (Pi Coding Agent) -> `--cli pi` / `--model cli/pi` or `--model cli/pi/<model>`
394
-
395
- Built-in preset:
396
-
397
- - `--model codex-fast` runs Codex with GPT-5.5 Fast mode and requires `codex login`.
398
-
399
- Requirements:
400
-
401
- - Binary installed and on `PATH` (or set `CODEX_PATH`, `CLAUDE_PATH`, `GEMINI_PATH`, `AGENT_PATH`, `OPENCLAW_PATH`, `OPENCODE_PATH`, `COPILOT_PATH`, `AGY_PATH`, `PI_PATH`)
402
- - Provider authenticated (`codex login`, `claude auth`, `gemini` login flow, `agent login` or `CURSOR_API_KEY`, `opencode auth login`, GitHub Copilot CLI authenticated, `agy` login flow or `ANTIGRAVITY_API_KEY`, `pi` uses configured provider API keys)
403
-
404
- Quick smoke test:
405
-
406
- ```bash
407
- printf "Summarize CLI smoke input.\nOne short paragraph. Reply can be brief.\n" >/tmp/summarize-cli-smoke.txt
408
-
409
- summarize --cli codex --plain --timeout 2m /tmp/summarize-cli-smoke.txt
410
- summarize --cli claude --plain --timeout 2m /tmp/summarize-cli-smoke.txt
411
- summarize --cli gemini --plain --timeout 2m /tmp/summarize-cli-smoke.txt
412
- summarize --cli agent --plain --timeout 2m /tmp/summarize-cli-smoke.txt
413
- summarize --cli openclaw --plain --timeout 2m /tmp/summarize-cli-smoke.txt
414
- summarize --cli opencode --plain --timeout 2m /tmp/summarize-cli-smoke.txt
415
- summarize --cli copilot --plain --timeout 2m /tmp/summarize-cli-smoke.txt
416
- summarize --cli agy --plain --timeout 2m /tmp/summarize-cli-smoke.txt
417
- summarize --cli pi --plain --timeout 2m /tmp/summarize-cli-smoke.txt
418
- ```
419
-
420
- Set explicit CLI allowlist/order:
421
-
422
- ```json
423
- {
424
- "cli": {
425
- "enabled": [
426
- "codex",
427
- "claude",
428
- "gemini",
429
- "agent",
430
- "openclaw",
431
- "opencode",
432
- "copilot",
433
- "agy",
434
- "pi"
435
- ]
436
- }
437
- }
438
- ```
439
-
440
- Configure implicit auto CLI fallback:
441
-
442
- ```json
443
- {
444
- "cli": {
445
- "autoFallback": {
446
- "enabled": true,
447
- "onlyWhenNoApiKeys": true,
448
- "order": ["claude", "gemini", "codex", "agent", "openclaw", "opencode", "copilot"]
449
- }
450
- }
451
- }
452
- ```
453
-
454
- More details: [`docs/cli.md`](docs/cli.md)
455
-
456
- ### Auto model ordering
457
-
458
- `--model auto` builds candidate attempts from built-in rules (or your `model.rules` overrides).
459
- CLI attempts are prepended when:
460
-
461
- - `cli.enabled` is set (explicit allowlist/order), or
462
- - implicit auto selection is active and `cli.autoFallback` is enabled.
463
-
464
- Default fallback behavior: only when no API keys are configured, order `claude, gemini, codex, agent, openclaw, opencode, copilot`, and remember/prioritize last successful provider (`~/.summarize/cli-state.json`). Antigravity and pi are opt-in unless you add them to `cli.autoFallback.order`.
465
-
466
- Set explicit CLI attempts:
467
-
468
- ```json
469
- {
470
- "cli": { "enabled": ["gemini"] }
471
- }
472
- ```
473
-
474
- Disable implicit auto CLI fallback:
475
-
476
- ```json
477
- {
478
- "cli": { "autoFallback": { "enabled": false } }
479
- }
480
- ```
481
-
482
- Note: explicit `--model auto` does not trigger implicit auto CLI fallback unless `cli.enabled` is set.
483
-
484
- ### Website extraction (Firecrawl + Markdown)
485
-
486
- Non-YouTube URLs go through a fetch -> extract pipeline. When direct fetch/extraction is blocked or too thin,
487
- `--firecrawl auto` can fall back to Firecrawl (if configured).
488
-
489
- - `--firecrawl off|auto|always` (default `auto`)
490
- - `--extract --format md|text` (default `text`; if `--format` is omitted, `--extract` defaults to `md` for non-YouTube URLs)
491
- - `--markdown-mode off|auto|llm|readability` (default `readability`)
492
- - `auto`: use an LLM converter when configured; may fall back to `uvx markitdown`
493
- - `llm`: force LLM conversion (requires a configured model key)
494
- - `off`: disable LLM conversion (still may return Firecrawl Markdown when configured)
495
- - Plain-text mode: use `--format text`.
496
-
497
- ### YouTube transcripts
498
-
499
- `--youtube auto` tries best-effort web transcript endpoints first. When captions are not available, it falls back to:
500
-
501
- 1. yt-dlp + Whisper (if `yt-dlp` is available): downloads audio, then tries Groq (`GROQ_API_KEY`)
502
- first when configured. If Groq is unavailable or fails, it uses configured local ONNX/`whisper.cpp`,
503
- then AssemblyAI (`ASSEMBLYAI_API_KEY`), Gemini (`GEMINI_API_KEY` / Google aliases), OpenAI
504
- (`OPENAI_API_KEY`), FAL (`FAL_KEY`), then Deepgram (`DEEPGRAM_API_KEY`).
505
- 2. Android VR direct audio + the same configured transcription chain when `yt-dlp` is unavailable or fails
506
- 3. Apify (if `APIFY_API_TOKEN` is set): uses a scraping actor (`faVsWy9VTSNVIhWpR`)
507
-
508
- Environment variables for yt-dlp mode:
509
-
510
- - `YT_DLP_PATH` - optional path to yt-dlp binary (otherwise `yt-dlp` is resolved via `PATH`)
511
- - `SUMMARIZE_WHISPER_CPP_MODEL_PATH` - optional override for the local `whisper.cpp` model file
512
- - `SUMMARIZE_WHISPER_CPP_BINARY` - optional override for the local binary (default: `whisper-cli`)
513
- - `SUMMARIZE_DISABLE_LOCAL_WHISPER_CPP=1` - disable local whisper.cpp (force remote)
514
- - `GROQ_API_KEY` - Groq Whisper transcription
515
- - `ASSEMBLYAI_API_KEY` - AssemblyAI transcription
516
- - `GEMINI_API_KEY` - Gemini transcription (`GOOGLE_GENERATIVE_AI_API_KEY` / `GOOGLE_API_KEY` also work)
517
- - `SUMMARIZE_GEMINI_TRANSCRIPTION_MODEL` - optional Gemini model override (default: `gemini-2.5-flash`)
518
- - `OPENAI_API_KEY` - OpenAI Whisper transcription
519
- - `OPENAI_WHISPER_BASE_URL` - optional OpenAI-compatible Whisper endpoint override
520
- - `FAL_KEY` - FAL AI Whisper fallback
521
- - `DEEPGRAM_API_KEY` - Deepgram Nova transcription fallback
522
- - `SUMMARIZE_DEEPGRAM_TRANSCRIPTION_MODEL` - optional Deepgram model override (default: `nova-3`)
523
-
524
- Apify costs money but tends to be more reliable when captions exist.
525
-
526
- Speaker-labelled transcripts for YouTube, local audio/video, and direct media URLs:
527
-
528
- ```bash
529
- summarize "https://www.youtube.com/watch?v=..." --extract --diarize
530
- summarize "./interview.mp3" --extract --diarize
531
- summarize "https://cdn.example.com/interview.mp4" --extract --diarize openai
532
- summarize "./interview.mp4" --extract --diarize openai \
533
- --identify-speakers --speaker-at "0:00=Host" --speaker-at "0:12=Guest"
534
- summarize "https://www.youtube.com/watch?v=..." --extract --diarize elevenlabs
535
- summarize "https://www.youtube.com/watch?v=..." --extract --diarize openai --timestamps
536
- summarize "https://www.youtube.com/watch?v=..." --extract --diarize elevenlabs \
537
- --identify-speakers --speaker-profile my-podcast \
538
- --speaker-at "0:12=Host Name" --remember-speakers
33
+ brew install summarize
539
34
  ```
540
35
 
541
- Bare `--diarize` prefers ElevenLabs Scribe v2 (`ELEVENLABS_API_KEY`) and falls back to OpenAI
542
- `gpt-4o-transcribe-diarize` (`OPENAI_API_KEY`). Speaker changes are emitted as `Speaker <label>: ...`;
543
- combine with `--timestamps` for `[mm:ss] Speaker <label>: ...`. Before upload, local video is reduced
544
- to mono 16 kHz MP3 with native or bundled FFmpeg and the same audio file is reused across provider
545
- fallbacks. Local audio is passed through unless OpenAI's upload limit requires compression. YouTube
546
- diarization downloads audio only. When combined with `--slides`, one yt-dlp invocation downloads
547
- separate audio and slide-quality video streams; diarization uploads the audio while slides reuse the
548
- video. Remote direct media uses its normal audio download path.
549
- YouTube transcript extraction also prints the current public view count and exposes the resolved
550
- video ID and observation timestamp in `extracted.sourceMetrics` in JSON output.
551
- Long OpenAI recordings are split into bounded chunks; timestamps are reassembled and
552
- chunk-local provider labels stay distinct so label resets cannot silently merge different voices.
553
-
554
- `--identify-speakers` replaces generic labels with names for YouTube and direct media. Repeat `--speaker-at <timestamp=name>`
555
- for authoritative examples; unresolved labels are inferred with OpenAI GPT-5.5 and only accepted above
556
- the configured confidence threshold. `--remember-speakers` stores the profile, anchors, and a
557
- transcript-hash-guarded mapping in `~/.summarize/config.json` for later runs. See
558
- [YouTube speaker identification](docs/youtube.md#speaker-identification).
36
+ The npm package requires Node.js 24 or newer. Homebrew/core and the [macOS archives on GitHub Releases](https://github.com/steipete/summarize/releases/latest) provide standalone builds. See the [installation guide](docs/install.md) for optional media tools and platform notes.
559
37
 
560
- ### Slide extraction (YouTube + direct video URLs + local video files)
38
+ ## Quick start
561
39
 
562
- Extract slide screenshots (scene detection via `ffmpeg`) and optional OCR:
563
-
564
- Requirements:
565
-
566
- - bundled FFmpeg WebAssembly, or native `ffmpeg` for faster extraction and broader codec support
567
- - `yt-dlp` for YouTube video download/stream resolution
568
- - `tesseract` only when using `--slides-ocr`
40
+ Extract readable content without an API key:
569
41
 
570
42
  ```bash
571
- summarize "https://www.youtube.com/watch?v=..." --slides
572
- summarize "https://www.youtube.com/watch?v=..." --slides --slides-ocr
573
- summarize "/path/to/video.webm" --slides
43
+ summarize "https://example.com" --extract --plain
574
44
  ```
575
45
 
576
- Outputs are written under `./slides/<sourceId>/` (or `--slides-dir`). OCR results are included in JSON output
577
- (`--json`) and stored in `slides.json` inside the slide directory. When scene detection is too sparse, the
578
- extractor also samples at a fixed interval to improve coverage.
579
- When using `--slides`, supported terminals (kitty/iTerm/Konsole) render inline thumbnails automatically inside the
580
- summary narrative (the model inserts `[slide:N]` markers). Timestamp links are clickable when the terminal supports
581
- OSC-8 (YouTube/Vimeo/Loom/Dropbox). If inline images are unsupported, Summarize prints a note with the on-disk
582
- slide directory. Local video files stay on the slide-aware path, transcribe in place, and avoid fake download labels.
583
-
584
- Use `--slides --extract` to print the full timed transcript and insert slide images inline at matching timestamps.
585
-
586
- Format the extracted transcript as Markdown (headings + paragraphs) via an LLM:
46
+ For a model-generated summary, configure a [supported provider](docs/llm.md) or use an authenticated coding CLI:
587
47
 
588
48
  ```bash
589
- summarize "https://www.youtube.com/watch?v=..." --extract --format md --markdown-mode llm
49
+ summarize "https://example.com" --cli codex
590
50
  ```
591
51
 
592
- ### Media transcription (Whisper)
593
-
594
- Local audio/video files are transcribed first, then summarized. `--video-mode transcript` forces
595
- direct media URLs (and embedded media) through Whisper first. Auto mode tries Groq first when configured,
596
- then local ONNX/`whisper.cpp`, then cloud fallbacks. Configure local ONNX/`whisper.cpp` for local-only
597
- transcription; otherwise set one of `GROQ_API_KEY`, `ASSEMBLYAI_API_KEY`, `GEMINI_API_KEY` (or Google
598
- aliases), `OPENAI_API_KEY`, `FAL_KEY`, or `DEEPGRAM_API_KEY`.
599
- Use `--diarize [auto|elevenlabs|openai]` for speaker-labelled MP3/MP4 and other supported media;
600
- diarization requires `ELEVENLABS_API_KEY` or `OPENAI_API_KEY`.
601
-
602
- ### Local ONNX transcription (Parakeet/Canary)
603
-
604
- Summarize can use NVIDIA Parakeet/Canary ONNX models via a local CLI you provide. Auto selection
605
- tries Groq first when configured, then ONNX before `whisper.cpp` and the remaining cloud fallbacks.
606
-
607
- - Setup helper: `summarize transcriber setup`
608
- - Install `sherpa-onnx` from upstream binaries/build (Homebrew may not have a formula)
609
- - Auto selection: set `SUMMARIZE_ONNX_PARAKEET_CMD` or `SUMMARIZE_ONNX_CANARY_CMD` (no flag needed)
610
- - Select the local transcription stage: `--transcriber parakeet|canary|whisper|auto`
611
- - Docs: `docs/nvidia-onnx-transcription.md`
612
-
613
- ### Verified podcast services (2026-07-17)
52
+ The default `auto` model chooses among configured providers. The [five-minute quickstart](docs/quickstart.md) covers API keys, local models, files, YouTube, podcasts, and JSON output.
614
53
 
615
- Run: `summarize <url>`
54
+ ## What it handles
616
55
 
617
- - Apple Podcasts
618
- - Spotify
619
- - Xiaoyuzhou
620
- - Amazon Music / Audible podcast pages
621
- - Podbean
622
- - Podchaser
623
- - RSS feeds (Podcasting 2.0 transcripts when available)
624
- - Embedded YouTube podcast pages (e.g. JREPodcast)
56
+ | Input | Processing path |
57
+ | ---------------------------- | ---------------------------------------------------------------------- |
58
+ | Web pages | Readability extraction, with optional Markdown and Firecrawl fallbacks |
59
+ | PDFs, images, and text files | File-aware extraction and model attachments where supported |
60
+ | YouTube and podcasts | Published transcripts first, then configured transcription fallbacks |
61
+ | Audio and video | Local or cloud transcription, with optional speaker labels |
62
+ | Video slides | Scene-based frames, optional OCR, and timestamped output |
625
63
 
626
- Transcription: tries Groq first when configured, then local ONNX/`whisper.cpp`, then AssemblyAI,
627
- Gemini, OpenAI, FAL, or Deepgram when keys are set.
64
+ Use `--extract` when you only need clean content, `--json` for a stable automation envelope, and `--slides` for video frames. The [command reference](docs/commands/index.md) documents every flag.
628
65
 
629
- ### Translation paths
630
-
631
- `--language/--lang` controls the output language of the summary (and other LLM-generated text). Default is `auto`.
632
-
633
- When the input is audio/video, the CLI needs a transcript first. The transcript comes from one of these paths:
634
-
635
- 1. Existing transcript (preferred)
636
- - YouTube: uses `youtubei` / `captionTracks` when available.
637
- - Podcasts: uses Podcasting 2.0 RSS `<podcast:transcript>` (JSON/VTT) when the feed publishes it.
638
- 2. Whisper transcription (fallback)
639
- - YouTube: prefers yt-dlp audio download, then Android VR direct audio, plus Whisper transcription when configured; Apify is a last resort.
640
- - Tries Groq (`GROQ_API_KEY`) first when configured.
641
- - Then uses configured local ONNX/`whisper.cpp`.
642
- - Then uses cloud transcription in this order: AssemblyAI (`ASSEMBLYAI_API_KEY`) → Gemini (`GEMINI_API_KEY` / Google aliases) → OpenAI (`OPENAI_API_KEY`) → FAL (`FAL_KEY`) → Deepgram (`DEEPGRAM_API_KEY`).
643
-
644
- For direct media URLs, use `--video-mode transcript` to force transcribe -> summarize:
645
-
646
- ```bash
647
- summarize https://example.com/file.mp4 --video-mode transcript --lang en
648
- ```
649
-
650
- ### Configuration
651
-
652
- Single config location:
653
-
654
- - `~/.summarize/config.json`
655
-
656
- Run `summarize status` to inspect the effective default model, configured presets, and model
657
- providers available from config, environment variables, local endpoints, or installed CLIs.
658
-
659
- Supported keys today:
660
-
661
- ```json
662
- {
663
- "model": { "id": "openai/gpt-5-mini" },
664
- "env": { "OPENAI_API_KEY": "sk-..." },
665
- "output": { "length": "long" },
666
- "ui": { "theme": "ember" }
667
- }
668
- ```
669
-
670
- Shorthand (equivalent):
671
-
672
- ```json
673
- {
674
- "model": "openai/gpt-5-mini"
675
- }
676
- ```
677
-
678
- Also supported:
679
-
680
- - `model: { "mode": "auto" }` (automatic model selection + fallback; see [docs/model-auto.md](docs/model-auto.md))
681
- - `model.rules` (customize candidates / ordering)
682
- - `models` (define presets selectable via `--model <preset>`; overrides built-ins like `free`)
683
- - `env` (generic env var defaults; process env still wins)
684
- - `apiKeys` (legacy shortcut, mapped to env names; prefer `env` for new configs)
685
- - `output.length` (default: `long`; accepts `short|medium|long|xl|xxl|20k`)
686
- - `cache.media` (media download cache: TTL 7 days, 2048 MB cap by default; `--no-media-cache` disables)
687
- - `media.videoMode: "auto"|"transcript"|"understand"`
688
- - `media.embeddedVideo: "auto"|"off"|"prefer"|"both"` (default `auto`: combine substantial articles with primary embedded YouTube captions)
689
- - `slides.enabled` / `slides.max` / `slides.ocr` / `slides.dir` (defaults for `--slides`)
690
- - `ui.theme: "aurora"|"ember"|"moss"|"mono"`
691
- - `openai.useChatCompletions: true` (force OpenAI-compatible chat completions)
692
- - `openai.serviceTier: "fast"|"priority"|"flex"` (use `"fast"` for the friendly alias)
693
- - `openai.thinking` / `openai.reasoningEffort: "none"|"low"|"medium"|"high"|"xhigh"`
694
- - `openai.textVerbosity: "low"|"medium"|"high"`
695
-
696
- Note: the config is parsed leniently (JSON5), but comments are not allowed. Unknown keys are ignored.
697
-
698
- Media cache defaults:
699
-
700
- ```json
701
- {
702
- "cache": {
703
- "media": { "enabled": true, "ttlDays": 7, "maxMb": 2048, "verify": "size" }
704
- }
705
- }
706
- ```
707
-
708
- Note: `--no-cache` bypasses summary caching only (LLM output). Extract/transcript caches still apply. Use `--no-media-cache` to skip media files.
709
-
710
- Precedence:
711
-
712
- 1. `--model`
713
- 2. `SUMMARIZE_MODEL`
714
- 3. `~/.summarize/config.json`
715
- 4. default (`auto`)
716
-
717
- Theme precedence:
718
-
719
- 1. `--theme`
720
- 2. `SUMMARIZE_THEME`
721
- 3. `~/.summarize/config.json` (`ui.theme`)
722
- 4. default (`aurora`)
723
-
724
- Environment variable precedence:
725
-
726
- 1. process env
727
- 2. `~/.summarize/config.json` (`env`)
728
- 3. `~/.summarize/config.json` (`apiKeys`, legacy)
729
-
730
- ### Environment variables
731
-
732
- Set the key matching your chosen `--model`:
733
-
734
- - Optional fallback defaults can be stored in config:
735
- - `~/.summarize/config.json` -> `"env": { "OPENAI_API_KEY": "sk-..." }`
736
- - process env always takes precedence
737
- - legacy `"apiKeys"` still works (mapped to env names)
738
-
739
- - `OPENAI_API_KEY` (for `openai/...`)
740
- - `NVIDIA_API_KEY` (for `nvidia/...`)
741
- - `MINIMAX_API_KEY` (for `minimax/...`)
742
- - `ANTHROPIC_API_KEY` (for `anthropic/...`)
743
- - `XAI_API_KEY` (for `xai/...`)
744
- - `Z_AI_API_KEY` (for `zai/...`; supports `ZAI_API_KEY` alias)
745
- - `GEMINI_API_KEY` (for `google/...`)
746
- - also accepts `GOOGLE_GENERATIVE_AI_API_KEY` and `GOOGLE_API_KEY` as aliases
747
-
748
- OpenAI-compatible chat completions toggle:
749
-
750
- - `OPENAI_USE_CHAT_COMPLETIONS=1` (or set `openai.useChatCompletions` in config)
751
-
752
- UI theme:
753
-
754
- - `SUMMARIZE_THEME=aurora|ember|moss|mono`
755
- - `SUMMARIZE_TRUECOLOR=1` (force 24-bit ANSI)
756
- - `SUMMARIZE_NO_TRUECOLOR=1` (disable 24-bit ANSI)
757
-
758
- OpenRouter (OpenAI-compatible):
759
-
760
- - Set `OPENROUTER_API_KEY=...`
761
- - Prefer forcing OpenRouter per model id: `--model openrouter/<author>/<slug>`
762
- - Built-in preset: `--model free` (uses a default set of OpenRouter `:free` models)
763
-
764
- ### `summarize refresh-free`
765
-
766
- Quick start: make free the default (keep `auto` available)
66
+ ![Summarize CLI screenshot](docs/assets/summarize-cli.png)
767
67
 
768
- ```bash
769
- summarize refresh-free --set-default
770
- summarize "https://example.com"
771
- summarize "https://example.com" --model auto
772
- ```
68
+ ## Browser extension
773
69
 
774
- Regenerates the `free` preset (`models.free` in `~/.summarize/config.json`) by:
70
+ Install [Summarize Side Panel from the Chrome Web Store](https://chromewebstore.google.com/detail/summarize/cejgnmmhbbpdmjnfppjdfkocebngehfg) to summarize the active tab, chat with its content, and work with video transcripts and slides.
775
71
 
776
- - Fetching OpenRouter `/models`, filtering `:free`
777
- - Skipping models that look very small (<27B by default) based on the model id/name
778
- - Testing which ones return non-empty text (concurrency 4, timeout 10s)
779
- - Picking a mix of smart-ish (bigger `context_length` / output cap) and fast models
780
- - Refining timings and writing the sorted list back
72
+ Direct mode runs without a companion service. Browser media uses Chrome capabilities for local transcription and slide extraction; the optional daemon adds CLI model backends, native media tools, OCR, shared caches, and Firefox media support.
781
73
 
782
- If `--model free` stops working, run:
74
+ To pair the installed CLI, copy the token shown by the extension and run:
783
75
 
784
76
  ```bash
785
- summarize refresh-free
77
+ summarize daemon install --token <TOKEN>
786
78
  ```
787
79
 
788
- Flags:
80
+ See the [extension setup](apps/chrome-extension/README.md) and [architecture and troubleshooting guide](docs/chrome-extension.md).
789
81
 
790
- - `--runs 2` (default): extra timing runs per selected model (total runs = 1 + runs)
791
- - `--smart 3` (default): how many smart-first picks (rest filled by fastest)
792
- - `--min-params 27b` (default): ignore models with inferred size smaller than N billion parameters
793
- - `--max-age-days 180` (default): ignore models older than N days (set 0 to disable)
794
- - `--set-default`: also sets `"model": "free"` in `~/.summarize/config.json`
82
+ ## Media and slides
795
83
 
796
- Example:
84
+ Summarize prefers existing captions and podcast transcripts before it transcribes media. Native `ffmpeg`, `yt-dlp`, and `tesseract` extend codec, YouTube slide, and OCR support; a bundled WebAssembly FFmpeg path covers common media without a native install.
797
85
 
798
- ```bash
799
- OPENROUTER_API_KEY=sk-or-... summarize "https://example.com" --model openrouter/meta-llama/llama-3.1-8b-instruct:free
800
- OPENROUTER_API_KEY=sk-or-... summarize "https://example.com" --model openrouter/minimax/minimax-m2.5
801
- ```
86
+ ![YouTube slide screenshots](docs/assets/youtube-slides.png)
802
87
 
803
- If your OpenRouter account enforces an allowed-provider list, make sure at least one provider
804
- is allowed for the selected model. When routing fails, `summarize` prints the exact providers to allow.
88
+ The focused guides describe [YouTube extraction](docs/youtube.md), [media routing](docs/media.md), [slides](docs/slides.md), and [local ONNX transcription](docs/nvidia-onnx-transcription.md).
805
89
 
806
- Legacy: `OPENAI_BASE_URL=https://openrouter.ai/api/v1` (and either `OPENAI_API_KEY` or `OPENROUTER_API_KEY`) also works.
90
+ ## Models and configuration
807
91
 
808
- NVIDIA API Catalog (OpenAI-compatible; free credits):
92
+ Model IDs use `provider/model` names. Summarize works with configured API providers, OpenAI-compatible endpoints, Ollama, OpenRouter free models, and authenticated coding CLIs such as Codex, Claude, Gemini, OpenClaw, and GitHub Copilot.
809
93
 
810
- - Set `NVIDIA_API_KEY=...`
811
- - Optional: `NVIDIA_BASE_URL=https://integrate.api.nvidia.com/v1`
812
- - Credits: API Catalog trial starts with 1000 free API credits on signup (up to 5000 total via “Request More” in the API Catalog profile)
813
- - Pick a model id from `/v1/models` (examples: fast `stepfun-ai/step-3.5-flash`, strong but slower `z-ai/glm5`)
94
+ Configuration lives at `~/.summarize/config.json`; command-line flags take precedence. Inspect the effective setup without exposing keys:
814
95
 
815
96
  ```bash
816
- export NVIDIA_API_KEY="nvapi-..."
817
- summarize "https://example.com" --model nvidia/stepfun-ai/step-3.5-flash
97
+ summarize status
818
98
  ```
819
99
 
820
- Z.AI (OpenAI-compatible):
821
-
822
- - `Z_AI_API_KEY=...` (or `ZAI_API_KEY=...`)
823
- - Optional base URL override: `Z_AI_BASE_URL=...`
100
+ Read the [model guide](docs/llm.md), [automatic selection rules](docs/model-auto.md), [CLI provider guide](docs/cli.md), and [configuration reference](docs/config.md) for the full setup.
824
101
 
825
- MiniMax (OpenAI-compatible):
102
+ ## Library
826
103
 
827
- - Set `MINIMAX_API_KEY=...`
828
- - Optional base URL override: `MINIMAX_BASE_URL=...` (default `https://api.minimax.io/v1`; use the
829
- China endpoint or a proxy if needed)
830
- - Pick a MiniMax model id (e.g. `MiniMax-M3`, `MiniMax-M2.5`) using MiniMax's exact casing
831
- - Reasoning is requested through MiniMax's separated response fields and omitted from summary text
104
+ For programmatic extraction without the CLI dependency surface, install [`@steipete/summarize-core`](https://www.npmjs.com/package/@steipete/summarize-core):
832
105
 
833
106
  ```bash
834
- export MINIMAX_API_KEY="..."
835
- summarize "https://example.com" --model minimax/MiniMax-M3
107
+ npm install @steipete/summarize-core
836
108
  ```
837
109
 
838
- Optional services:
839
-
840
- - `FIRECRAWL_API_KEY` (website extraction fallback)
841
- - `YT_DLP_PATH` (path to yt-dlp binary for audio extraction)
842
- - `GROQ_API_KEY` (Groq Whisper transcription)
843
- - `ASSEMBLYAI_API_KEY` (AssemblyAI transcription)
844
- - `ELEVENLABS_API_KEY` (ElevenLabs Scribe v2 speaker diarization)
845
- - `GEMINI_API_KEY` / `GOOGLE_GENERATIVE_AI_API_KEY` / `GOOGLE_API_KEY` (Gemini transcription)
846
- - `SUMMARIZE_GEMINI_TRANSCRIPTION_MODEL` (optional Gemini model override; default `gemini-2.5-flash`)
847
- - `OPENAI_API_KEY` / `OPENAI_WHISPER_BASE_URL` (OpenAI Whisper transcription)
848
- - `FAL_KEY` (FAL AI API key for audio transcription via Whisper)
849
- - `DEEPGRAM_API_KEY` (Deepgram API key for Nova transcription)
850
- - `SUMMARIZE_DEEPGRAM_TRANSCRIPTION_MODEL` (optional Deepgram model override; default `nova-3`)
851
- - `APIFY_API_TOKEN` (YouTube transcript fallback)
110
+ The package exports focused content and prompt entry points. See the [core package README](packages/core/README.md) for usage.
852
111
 
853
- ### Model limits
112
+ ## Documentation
854
113
 
855
- The CLI uses the LiteLLM model catalog for model limits (like max output tokens):
114
+ Start with the [documentation index](docs/README.md), then follow the guide for your task:
856
115
 
857
- - Downloaded from: `https://raw.githubusercontent.com/BerriAI/litellm/main/model_prices_and_context_window.json`
858
- - Cached at: `~/.summarize/cache/`
116
+ - [Installation](docs/install.md) and [quickstart](docs/quickstart.md)
117
+ - [Commands](docs/commands/index.md) and [configuration](docs/config.md)
118
+ - [Website extraction](docs/website.md) and [Firecrawl fallback](docs/firecrawl.md)
119
+ - [YouTube](docs/youtube.md), [media](docs/media.md), and [slides](docs/slides.md)
120
+ - [Agent skill](.agents/skills/summarize/SKILL.md) for automated workflows
859
121
 
860
- ### Library usage (optional)
122
+ ## Development
861
123
 
862
- Recommended (minimal deps):
863
-
864
- - `@steipete/summarize-core/content`
865
- - `@steipete/summarize-core/prompts`
866
-
867
- Compatibility (pulls in CLI deps):
868
-
869
- - `@steipete/summarize/content`
870
- - `@steipete/summarize/prompts`
871
-
872
- ### Development
124
+ Requires Node.js 24 and pnpm 10.34.5.
873
125
 
874
126
  ```bash
875
- pnpm install
127
+ pnpm install --frozen-lockfile
128
+ pnpm build
876
129
  pnpm check
877
130
  ```
878
131
 
879
- ## More
880
-
881
- - Canonical agent skill: [`.agents/skills/summarize/SKILL.md`](.agents/skills/summarize/SKILL.md). Summarize-specific CLI guidance lives here; downstream integrations should link to this source and keep only integration-specific notes.
882
- - Docs index: [docs/README.md](docs/README.md)
883
- - CLI providers and config: [docs/cli.md](docs/cli.md)
884
- - Auto model rules: [docs/model-auto.md](docs/model-auto.md)
885
- - Website extraction: [docs/website.md](docs/website.md)
886
- - YouTube handling: [docs/youtube.md](docs/youtube.md)
887
- - Media pipeline: [docs/media.md](docs/media.md)
888
- - Config schema and precedence: [docs/config.md](docs/config.md)
889
-
890
- ## Troubleshooting
132
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for repository layout and extension workflows.
891
133
 
892
- - "Receiving end does not exist": Chrome did not inject the content script yet.
893
- - Extension details -> Site access -> On all sites (or allow this domain)
894
- - Reload the tab once.
895
- - "Failed to fetch" / daemon unreachable:
896
- - `summarize daemon status`
897
- - For a non-default port, confirm **Options → Runtime → Daemon → Port** matches the daemon configuration.
898
- - Logs: `~/.summarize/logs/daemon.err.log`
134
+ ## License
899
135
 
900
- License: MIT
136
+ MIT. See [LICENSE](LICENSE).
@@ -21,7 +21,7 @@ export async function resolveInitialUrlInput({ input, request, isYoutubeUrl, ctx
21
21
  const route = await resolveUrlAssetRoute({
22
22
  url: input.url,
23
23
  isYoutubeUrl,
24
- fetchImpl: ctx.io.fetch,
24
+ fetchImpl: ctx.io.urlFetch ?? ctx.io.fetch,
25
25
  timeoutMs: ctx.flags.timeoutMs,
26
26
  detectUnknownAssetUrls: false,
27
27
  });
@@ -37,7 +37,7 @@ export async function resolveInitialUrlInput({ input, request, isYoutubeUrl, ctx
37
37
  emitLoading(input, emit);
38
38
  const acquired = await acquireRemoteAssetInput({
39
39
  url: input.url,
40
- fetchImpl: ctx.io.fetch,
40
+ fetchImpl: ctx.io.urlFetch ?? ctx.io.fetch,
41
41
  timeoutMs: ctx.flags.timeoutMs,
42
42
  });
43
43
  if (acquired) {
@@ -67,7 +67,7 @@ export async function executeUrlWithAssetFallback({ input, rawUrlInput, request,
67
67
  const fallbackRoute = await resolveUrlAssetRoute({
68
68
  url: rawUrlInput.url,
69
69
  isYoutubeUrl,
70
- fetchImpl: ctx.io.fetch,
70
+ fetchImpl: ctx.io.urlFetch ?? ctx.io.fetch,
71
71
  timeoutMs: ctx.flags.timeoutMs,
72
72
  detectUnknownAssetUrls: true,
73
73
  assumeAsset: true,
@@ -81,7 +81,7 @@ export async function executeUrlWithAssetFallback({ input, rawUrlInput, request,
81
81
  if (fallbackRoute === "asset" || (fallbackRoute === "video" && request.slides)) {
82
82
  const acquired = await acquireRemoteAssetInput({
83
83
  url: rawUrlInput.url,
84
- fetchImpl: ctx.io.fetch,
84
+ fetchImpl: ctx.io.urlFetch ?? ctx.io.fetch,
85
85
  timeoutMs: ctx.flags.timeoutMs,
86
86
  });
87
87
  if (acquired) {
@@ -1 +1 @@
1
- {"version":3,"file":"url-routing.js","sourceRoot":"","sources":["../../../src/application/url-routing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAsB,MAAM,0BAA0B,CAAC;AAG9E,OAAO,EACL,uBAAuB,EACvB,sBAAsB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C,UAAU,CAAC,QAAQ,CAAC,EAChE,CAAC;oBACD,MAAM,YAAY,GAAG,MAAM,6BAA6B,CAAC,QAAQ,CAAC,CAAC;oBACnE,IAAI,CAAC;wBACH,OAAO,MAAM,cAAc,CAAC;4BAC1B,GAAG;4BACH,GAAG,EAAE,aAAa,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,IAAI;4BAC9C,YAAY,EAAE,KAAK;yBACpB,CAAC,CAAC;oBACL,CAAC;4BAAS,CAAC;wBACT,MAAM,YAAY,CAAC,OAAO,EAAE,CAAC;oBAC/B,CAAC;gBACH,CAAC;gBACD,OAAO,MAAM,aAAa,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;YAC/C,CAAC;QACH,CAAC;QACD,IAAI,qBAAqB,CAAC,GAAG,CAAC,EAAE,CAAC;YAC/B,OAAO,MAAM,cAAc,CAAC;gBAC1B,GAAG,EAAE,sBAAsB,CAAC,GAAG,CAAC;gBAChC,GAAG,EAAE,KAAK,CAAC,GAAG;gBACd,YAAY;aACb,CAAC,CAAC;QACL,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import fs from "node:fs";
2
2
  import path from "node:path";
3
3
  import { fileURLToPath } from "node:url";
4
- export const FALLBACK_VERSION = "0.21.7";
4
+ export const FALLBACK_VERSION = "0.21.9";
5
5
  export function resolvePackageVersion(importMetaUrl) {
6
6
  const injected = typeof process !== "undefined" && typeof process.env.SUMMARIZE_VERSION === "string"
7
7
  ? process.env.SUMMARIZE_VERSION.trim()
@@ -1,4 +1,4 @@
1
- export declare const FALLBACK_VERSION = "0.21.7";
1
+ export declare const FALLBACK_VERSION = "0.21.9";
2
2
  export declare function resolvePackageVersion(importMetaUrl?: string): string;
3
3
  export declare function resolveGitSha(importMetaUrl?: string): string | null;
4
4
  export declare function formatVersionLine(importMetaUrl?: string): string;
Binary file
Binary file
Binary file
package/docs/llm.md CHANGED
@@ -80,7 +80,7 @@ installed, auto mode can use local CLI models via `cli.enabled` or implicit auto
80
80
  - `--model <preset>`
81
81
  - Uses a built-in or config-defined preset (see `docs/config.md` → “Presets”).
82
82
  - `--prompt <text>` / `--prompt-file <path>`
83
- - Overrides the built-in summary instructions (prompt becomes the instruction prefix).
83
+ - Replaces the built-in summary instructions, including the default structure and formatting guidance.
84
84
  - Prompts are wrapped in `<instructions>`, `<context>`, `<content>` tags.
85
85
  - When `--length` is numeric, we add `Output is X characters.` When `--language` is explicitly set, we add `Output should be <language>.`
86
86
  - `--no-cache`
@@ -96,7 +96,7 @@ installed, auto mode can use local CLI models via `cli.enabled` or implicit auto
96
96
  - Minimum numeric value: 50 chars.
97
97
  - Built-in default: `long`.
98
98
  - Config default: `output.length` in `~/.summarize/config.json`.
99
- - Output format is Markdown; use short paragraphs and only add bullets when they improve scanability.
99
+ - Output format is Markdown. Default URL summaries separate paragraphs, headings, and lists with blank lines; multi-point material uses descriptive headings or short bullets when they improve scanability.
100
100
  - `--force-summary`
101
101
  - Always run the LLM even when extracted content is shorter than the requested length.
102
102
  - `--max-output-tokens <count>`
@@ -117,6 +117,8 @@ installed, auto mode can use local CLI models via `cli.enabled` or implicit auto
117
117
 
118
118
  ## Prompt rules
119
119
 
120
+ - Default URL summaries lead with a concise overview and organize multi-point material by theme, chronology, or viewpoint. Short or simple sources stay compact instead of forcing headings or lists.
121
+ - Discussion and comment threads are synthesized around the main viewpoints, agreement, disagreement, evidence, and caveats rather than recapped comment by comment.
120
122
  - Video and podcast summaries omit sponsor/ads/promotional segments; do not include them in the summary.
121
123
  - Do not mention or acknowledge sponsors/ads, and do not say you skipped or ignored anything.
122
124
  - If a standout line is present, include 1-2 short exact excerpts formatted as Markdown italics with single asterisks. Do not use quotation marks of any kind (straight or curly). If a title or excerpt would normally use quotes, remove them and optionally italicize the text instead. Apostrophes in contractions are OK. Never include ad/sponsor/boilerplate excerpts and do not mention them. Avoid sponsor/ad/promo language, brand names like Squarespace, or CTA phrases like discount code.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steipete/summarize",
3
- "version": "0.21.7",
3
+ "version": "0.21.9",
4
4
  "description": "Link → clean text → summary.",
5
5
  "bin": {
6
6
  "summarize": "./dist/cli.js",
@@ -33,7 +33,7 @@
33
33
  }
34
34
  },
35
35
  "dependencies": {
36
- "@earendil-works/pi-ai": "^0.80.10",
36
+ "@earendil-works/pi-ai": "^0.83.0",
37
37
  "bpe-lite": "^0.5.2",
38
38
  "commander": "^15.0.0",
39
39
  "file-type": "^22.0.1",
@@ -41,19 +41,19 @@
41
41
  "markdansi": "^0.3.2",
42
42
  "mime": "^4.1.0",
43
43
  "osc-progress": "^0.3.2",
44
- "tokentally": "^0.1.2",
45
- "undici": "8.7.0",
46
- "@steipete/summarize-core": "0.21.7"
44
+ "tokentally": "^0.1.3",
45
+ "undici": "8.9.0",
46
+ "@steipete/summarize-core": "0.21.9"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@types/node": "^24.13.3",
50
50
  "@types/sanitize-html": "^2.16.1",
51
51
  "@typescript/native-preview": "7.0.0-dev.20260707.2",
52
52
  "@vitest/coverage-v8": "^4.1.10",
53
- "happy-dom": "^20.11.0",
54
- "oxfmt": "0.59.0",
55
- "oxlint": "^1.74.0",
56
- "oxlint-tsgolint": "^0.25.0",
53
+ "happy-dom": "^20.11.1",
54
+ "oxfmt": "0.61.0",
55
+ "oxlint": "^1.76.0",
56
+ "oxlint-tsgolint": "^7.0.2001",
57
57
  "typescript": "^6.0.3",
58
58
  "vitest": "^4.1.10"
59
59
  },