@steipete/summarize 0.14.1 → 0.15.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.
Files changed (211) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/LICENSE +1 -1
  3. package/README.md +2 -1
  4. package/dist/cli.js +0 -1
  5. package/dist/esm/cli-main.js +6 -1
  6. package/dist/esm/cli-main.js.map +1 -1
  7. package/dist/esm/cli.js +1 -0
  8. package/dist/esm/cli.js.map +1 -1
  9. package/dist/esm/config/parse-helpers.js +2 -1
  10. package/dist/esm/config/parse-helpers.js.map +1 -1
  11. package/dist/esm/config/sections.js +13 -0
  12. package/dist/esm/config/sections.js.map +1 -1
  13. package/dist/esm/daemon/agent-model.js +3 -1
  14. package/dist/esm/daemon/agent-model.js.map +1 -1
  15. package/dist/esm/daemon/agent.js +1 -1
  16. package/dist/esm/daemon/agent.js.map +1 -1
  17. package/dist/esm/daemon/cli.js +32 -6
  18. package/dist/esm/daemon/cli.js.map +1 -1
  19. package/dist/esm/daemon/config.js +14 -2
  20. package/dist/esm/daemon/config.js.map +1 -1
  21. package/dist/esm/daemon/env-snapshot.js +1 -0
  22. package/dist/esm/daemon/env-snapshot.js.map +1 -1
  23. package/dist/esm/daemon/launchd.js.map +1 -1
  24. package/dist/esm/daemon/models.js +6 -1
  25. package/dist/esm/daemon/models.js.map +1 -1
  26. package/dist/esm/daemon/process-registry.js.map +1 -1
  27. package/dist/esm/daemon/server-summarize-request.js +5 -1
  28. package/dist/esm/daemon/server-summarize-request.js.map +1 -1
  29. package/dist/esm/daemon/server.js +29 -2
  30. package/dist/esm/daemon/server.js.map +1 -1
  31. package/dist/esm/flags.js +3 -0
  32. package/dist/esm/flags.js.map +1 -1
  33. package/dist/esm/llm/cli-exec.js +39 -1
  34. package/dist/esm/llm/cli-exec.js.map +1 -1
  35. package/dist/esm/llm/cli-provider-output.js +4 -1
  36. package/dist/esm/llm/cli-provider-output.js.map +1 -1
  37. package/dist/esm/llm/cli.js +91 -33
  38. package/dist/esm/llm/cli.js.map +1 -1
  39. package/dist/esm/llm/generate-text-stream.js +1 -1
  40. package/dist/esm/llm/generate-text-stream.js.map +1 -1
  41. package/dist/esm/llm/generate-text.js +1 -1
  42. package/dist/esm/llm/generate-text.js.map +1 -1
  43. package/dist/esm/llm/provider-profile.js +7 -2
  44. package/dist/esm/llm/provider-profile.js.map +1 -1
  45. package/dist/esm/llm/providers/anthropic.js +1 -1
  46. package/dist/esm/llm/providers/anthropic.js.map +1 -1
  47. package/dist/esm/llm/providers/google.js +10 -4
  48. package/dist/esm/llm/providers/google.js.map +1 -1
  49. package/dist/esm/llm/providers/openai.js +1 -1
  50. package/dist/esm/llm/providers/openai.js.map +1 -1
  51. package/dist/esm/llm/providers/shared.js +1 -1
  52. package/dist/esm/llm/providers/shared.js.map +1 -1
  53. package/dist/esm/markitdown.js +139 -10
  54. package/dist/esm/markitdown.js.map +1 -1
  55. package/dist/esm/model-auto-cli.js +3 -1
  56. package/dist/esm/model-auto-cli.js.map +1 -1
  57. package/dist/esm/model-auto.js +1 -1
  58. package/dist/esm/model-auto.js.map +1 -1
  59. package/dist/esm/model-spec.js +2 -1
  60. package/dist/esm/model-spec.js.map +1 -1
  61. package/dist/esm/pricing/litellm.js +30 -0
  62. package/dist/esm/pricing/litellm.js.map +1 -1
  63. package/dist/esm/refresh-free.js +6 -3
  64. package/dist/esm/refresh-free.js.map +1 -1
  65. package/dist/esm/run/cli-fallback-state.js +2 -1
  66. package/dist/esm/run/cli-fallback-state.js.map +1 -1
  67. package/dist/esm/run/env.js +13 -3
  68. package/dist/esm/run/env.js.map +1 -1
  69. package/dist/esm/run/fetch-with-timeout.js.map +1 -1
  70. package/dist/esm/run/finish-line-labels.js +2 -0
  71. package/dist/esm/run/finish-line-labels.js.map +1 -1
  72. package/dist/esm/run/flows/asset/extract.js +5 -3
  73. package/dist/esm/run/flows/asset/extract.js.map +1 -1
  74. package/dist/esm/run/flows/asset/preprocess.js +13 -10
  75. package/dist/esm/run/flows/asset/preprocess.js.map +1 -1
  76. package/dist/esm/run/flows/url/extraction-session.js.map +1 -1
  77. package/dist/esm/run/flows/url/flow.js +14 -1
  78. package/dist/esm/run/flows/url/flow.js.map +1 -1
  79. package/dist/esm/run/flows/url/markdown.js +2 -1
  80. package/dist/esm/run/flows/url/markdown.js.map +1 -1
  81. package/dist/esm/run/flows/url/slides-text-transcript.js +10 -1
  82. package/dist/esm/run/flows/url/slides-text-transcript.js.map +1 -1
  83. package/dist/esm/run/flows/url/summary-prompt.js +14 -3
  84. package/dist/esm/run/flows/url/summary-prompt.js.map +1 -1
  85. package/dist/esm/run/flows/url/summary-resolution.js +10 -2
  86. package/dist/esm/run/flows/url/summary-resolution.js.map +1 -1
  87. package/dist/esm/run/flows/url/summary-timestamps.js +90 -6
  88. package/dist/esm/run/flows/url/summary-timestamps.js.map +1 -1
  89. package/dist/esm/run/flows/url/types.js +2 -1
  90. package/dist/esm/run/flows/url/types.js.map +1 -1
  91. package/dist/esm/run/help.js +2 -1
  92. package/dist/esm/run/help.js.map +1 -1
  93. package/dist/esm/run/perf-trace.js +54 -0
  94. package/dist/esm/run/perf-trace.js.map +1 -0
  95. package/dist/esm/run/run-config.js +1 -1
  96. package/dist/esm/run/run-config.js.map +1 -1
  97. package/dist/esm/run/run-metrics.js +11 -4
  98. package/dist/esm/run/run-metrics.js.map +1 -1
  99. package/dist/esm/run/run-models.js +15 -11
  100. package/dist/esm/run/run-models.js.map +1 -1
  101. package/dist/esm/run/run-settings-parse.js +2 -0
  102. package/dist/esm/run/run-settings-parse.js.map +1 -1
  103. package/dist/esm/run/run-settings.js.map +1 -1
  104. package/dist/esm/run/runner-contexts.js +2 -1
  105. package/dist/esm/run/runner-contexts.js.map +1 -1
  106. package/dist/esm/run/runner-plan.js +7 -1
  107. package/dist/esm/run/runner-plan.js.map +1 -1
  108. package/dist/esm/run/runner-setup.js +2 -2
  109. package/dist/esm/run/runner-setup.js.map +1 -1
  110. package/dist/esm/run/runner.js +61 -44
  111. package/dist/esm/run/runner.js.map +1 -1
  112. package/dist/esm/run/slides-cli.js +1 -1
  113. package/dist/esm/run/slides-cli.js.map +1 -1
  114. package/dist/esm/run/summary-engine.js +15 -0
  115. package/dist/esm/run/summary-engine.js.map +1 -1
  116. package/dist/esm/slides/settings.js +8 -0
  117. package/dist/esm/slides/settings.js.map +1 -1
  118. package/dist/esm/tty/spinner.js +1 -1
  119. package/dist/esm/tty/spinner.js.map +1 -1
  120. package/dist/esm/version.js +73 -24
  121. package/dist/esm/version.js.map +1 -1
  122. package/dist/types/cli.d.ts +1 -0
  123. package/dist/types/config/sections.d.ts +10 -10
  124. package/dist/types/config/types.d.ts +3 -1
  125. package/dist/types/content/asset.d.ts +1 -1
  126. package/dist/types/daemon/agent-model.d.ts +3 -3
  127. package/dist/types/daemon/agent-request.d.ts +1 -1
  128. package/dist/types/daemon/agent.d.ts +1 -1
  129. package/dist/types/daemon/chat.d.ts +1 -1
  130. package/dist/types/daemon/env-snapshot.d.ts +1 -1
  131. package/dist/types/daemon/models.d.ts +1 -0
  132. package/dist/types/llm/cli-exec.d.ts +6 -0
  133. package/dist/types/llm/cli-provider-output.d.ts +1 -1
  134. package/dist/types/llm/generate-text-shared.d.ts +1 -1
  135. package/dist/types/llm/generate-text-stream.d.ts +1 -1
  136. package/dist/types/llm/prompt.d.ts +1 -1
  137. package/dist/types/llm/provider-profile.d.ts +1 -1
  138. package/dist/types/llm/providers/anthropic.d.ts +1 -1
  139. package/dist/types/llm/providers/google.d.ts +1 -1
  140. package/dist/types/llm/providers/models.d.ts +1 -1
  141. package/dist/types/llm/providers/openai.d.ts +1 -1
  142. package/dist/types/llm/providers/shared.d.ts +1 -1
  143. package/dist/types/markitdown.d.ts +6 -2
  144. package/dist/types/model-spec.d.ts +1 -1
  145. package/dist/types/pricing/litellm.d.ts +3 -0
  146. package/dist/types/run/flows/url/summary-json.d.ts +6 -6
  147. package/dist/types/run/flows/url/summary-timestamps.d.ts +5 -0
  148. package/dist/types/run/flows/url/types.d.ts +3 -0
  149. package/dist/types/run/perf-trace.d.ts +9 -0
  150. package/dist/types/run/runner-contexts.d.ts +2 -0
  151. package/dist/types/run/runner-plan.d.ts +2 -0
  152. package/dist/types/run/runner-setup.d.ts +2 -1
  153. package/dist/types/run/summary-engine.d.ts +2 -0
  154. package/dist/types/run/types.d.ts +1 -1
  155. package/dist/types/shared/sse-events.d.ts +1 -1
  156. package/dist/types/version.d.ts +1 -1
  157. package/docs/README.md +1 -1
  158. package/docs/agent.md +2 -0
  159. package/docs/cache.md +3 -1
  160. package/docs/chrome-extension.md +2 -0
  161. package/docs/cli.md +18 -6
  162. package/docs/commands/daemon.md +106 -0
  163. package/docs/commands/index.md +53 -0
  164. package/docs/commands/refresh-free.md +83 -0
  165. package/docs/commands/slides.md +120 -0
  166. package/docs/commands/summarize.md +235 -0
  167. package/docs/commands/transcriber.md +67 -0
  168. package/docs/config.md +8 -4
  169. package/docs/extract-only.md +2 -0
  170. package/docs/firecrawl.md +2 -0
  171. package/docs/index.md +83 -22
  172. package/docs/install.md +133 -0
  173. package/docs/language.md +2 -0
  174. package/docs/llm.md +6 -2
  175. package/docs/manual-tests.md +2 -0
  176. package/docs/media.md +2 -0
  177. package/docs/model-auto.md +2 -0
  178. package/docs/model-provider-resolution.md +2 -0
  179. package/docs/nvidia-onnx-transcription.md +2 -0
  180. package/docs/openai.md +2 -0
  181. package/docs/quickstart.md +114 -0
  182. package/docs/releasing.md +2 -0
  183. package/docs/slides-rendering-flow.md +2 -0
  184. package/docs/slides.md +2 -0
  185. package/docs/smoketest.md +13 -11
  186. package/docs/timestamps.md +2 -0
  187. package/docs/transcript-provider-flow.md +2 -0
  188. package/docs/website.md +2 -0
  189. package/docs/youtube.md +2 -0
  190. package/package.json +51 -37
  191. package/docs/_config.yml +0 -27
  192. package/docs/_layouts/default.html +0 -60
  193. package/docs/assets/site.css +0 -891
  194. package/docs/assets/site.js +0 -72
  195. package/docs/index.html +0 -229
  196. package/docs/site/.nojekyll +0 -1
  197. package/docs/site/404.html +0 -40
  198. package/docs/site/assets/site.css +0 -748
  199. package/docs/site/assets/site.js +0 -72
  200. package/docs/site/assets/summarize-cli.png +0 -0
  201. package/docs/site/assets/summarize-extension.png +0 -0
  202. package/docs/site/docs/chrome-extension.html +0 -101
  203. package/docs/site/docs/config.html +0 -95
  204. package/docs/site/docs/extract-only.html +0 -94
  205. package/docs/site/docs/firecrawl.html +0 -82
  206. package/docs/site/docs/index.html +0 -124
  207. package/docs/site/docs/llm.html +0 -85
  208. package/docs/site/docs/openai.html +0 -80
  209. package/docs/site/docs/website.html +0 -96
  210. package/docs/site/docs/youtube.html +0 -72
  211. package/docs/site/index.html +0 -229
@@ -0,0 +1,235 @@
1
+ ---
2
+ title: summarize
3
+ permalink: /docs/commands/summarize.html
4
+ kicker: command
5
+ summary: "Main command. URL, file, or stdin → clean text → summary."
6
+ ---
7
+
8
+ # `summarize`
9
+
10
+ ```text
11
+ summarize [input] [flags]
12
+ ```
13
+
14
+ Takes a URL, local file path, or `-` for stdin and produces a summary. With `--extract`, prints cleaned content instead of summarizing.
15
+
16
+ ## Synopsis
17
+
18
+ ```bash
19
+ summarize "https://example.com/article"
20
+ summarize ./report.pdf --model openai/gpt-5-mini
21
+ summarize "https://youtu.be/..." --slides --slides-ocr
22
+ pbpaste | summarize -
23
+ summarize "https://example.com" --extract --format md > clean.md
24
+ summarize "https://example.com" --json --metrics detailed
25
+ ```
26
+
27
+ ## Input
28
+
29
+ - **URL** — http/https. YouTube, podcast hosts, generic articles, raw media.
30
+ - **File path** — PDF, image, audio, video, plain text, Markdown, HTML.
31
+ - **`-`** — read content from stdin (text or binary).
32
+
33
+ If `[input]` is omitted, summarize prints concise help and exits.
34
+
35
+ ## Flags
36
+
37
+ ### Extraction
38
+
39
+ `--extract`
40
+ : Print extracted content and exit. No LLM call. The `--extract-only` alias is hidden but still works.
41
+
42
+ `--format <format>`
43
+ : `md` or `text`. Controls website extraction format and whether files are preprocessed to Markdown for model compatibility. Default: `text`. Default in `--extract` mode for URLs: `md`.
44
+
45
+ `--firecrawl <mode>`
46
+ : `off`, `auto`, `always`. `auto` falls back to Firecrawl when local extraction looks blocked or thin. Needs `FIRECRAWL_API_KEY`.
47
+
48
+ `--preprocess <mode>`
49
+ : `off`, `auto`, `always`. Default `auto`. Controls `markitdown` usage for files. `always` only affects file inputs.
50
+ : Image-only PDFs can retry through OpenAI vision OCR when `OPENAI_API_KEY` is set. Set `MARKITDOWN_OCR_MODEL` to choose the OCR model, or `MARKITDOWN_OCR_DPI` to tune rendered page size.
51
+
52
+ `--markdown-mode <mode>`
53
+ : `off`, `auto`, `llm`, `readability`. For websites: HTML → Markdown strategy. For YouTube/transcripts: `llm` formats raw transcripts into clean Markdown with headings.
54
+
55
+ `--max-extract-characters <count>`
56
+ : Cap printed characters in `--extract` mode. Default: unlimited.
57
+
58
+ ### YouTube / video
59
+
60
+ `--youtube <mode>`
61
+ : `auto`, `web`, `apify`, `yt-dlp`, `no-auto` (skip auto-generated captions). Default `auto`.
62
+
63
+ `--transcriber <name>`
64
+ : `auto`, `whisper`, `parakeet`, `canary`. Default `auto` — Groq when keyed, else local ONNX or `whisper.cpp`, then cloud fallbacks.
65
+
66
+ `--video-mode <mode>`
67
+ : `auto`, `transcript`, `understand`. `understand` prefers vision/video understanding when supported.
68
+
69
+ `--timestamps`
70
+ : Include timestamps in transcripts when available.
71
+
72
+ ### Slides
73
+
74
+ `--slides [value]`
75
+ : Extract slides from a video URL and render inline alongside the summary. Combine with `--extract` to interleave slides in the full transcript. See [Slides mode](../slides.md).
76
+
77
+ `--slides-ocr`
78
+ : Run OCR on extracted slides. Requires `tesseract`.
79
+
80
+ `--slides-debug`
81
+ : Print slide image paths instead of rendering inline (useful in non-image terminals).
82
+
83
+ `--slides-dir <dir>`
84
+ : Output directory base. Default `./slides`.
85
+
86
+ `--slides-scene-threshold <value>`
87
+ : Scene detection threshold, `0.1`–`1.0`. Default `0.3`.
88
+
89
+ `--slides-max <count>`
90
+ : Cap on extracted slides. Default `6`.
91
+
92
+ `--slides-min-duration <seconds>`
93
+ : Minimum gap between slides. Default `2`.
94
+
95
+ ### Summary control
96
+
97
+ `--length <length>`
98
+ : `short`, `medium`, `long`, `xl`, `xxl` (or `s`/`m`/`l`) or a character cap like `20000` or `20k`. Default `xl`. Override globally via `output.length` in [Config](../config.md).
99
+
100
+ `--force-summary`
101
+ : Always run the LLM, even when extracted content is shorter than the requested length.
102
+
103
+ `--language, --lang <language>`
104
+ : `auto`, `en`, `de`, `english`, `german`, … Default `auto` (matches source). Configurable via `output.language`.
105
+
106
+ `--prompt <text>` / `--prompt-file <path>`
107
+ : Override the summary prompt. Content is appended after the override.
108
+
109
+ ### Models
110
+
111
+ `--model <model>`
112
+ : Model id. `auto`, `<config-preset>`, `cli/<provider>/<model>`, `xai/...`, `openai/...`, `nvidia/...`, `google/...`, `anthropic/...`, `zai/...`, `github-copilot/...`, or `openrouter/<author>/<slug>`. Default `auto`. See [LLM overview](../llm.md).
113
+
114
+ `--cli [provider]`
115
+ : Use a logged-in CLI provider: `claude`, `gemini`, `codex`, `agent`, `openclaw`, `opencode`, `copilot`. Equivalent to `--model cli/<provider>`. Without a value: enable CLI providers in auto-selection.
116
+
117
+ `--thinking <effort>`
118
+ : OpenAI reasoning effort. `none`, `low`, `medium`, `high`, `xhigh`. Aliases: `off`, `min`, `mid`. Only affects reasoning-capable OpenAI models.
119
+
120
+ `--service-tier <tier>`
121
+ : OpenAI service tier. `default`, `fast`, `priority`, `flex`. Maps to `service_tier` on the request.
122
+
123
+ `--fast`
124
+ : Shortcut for OpenAI `service_tier=priority`. Same effect as `--service-tier fast`.
125
+
126
+ `--max-output-tokens <count>`
127
+ : Hard cap for LLM output tokens. Accepts `2000`, `2k`. Overrides provider defaults.
128
+
129
+ `--retries <count>`
130
+ : LLM retry attempts on timeout. Default `1`.
131
+
132
+ ### Output
133
+
134
+ `--json`
135
+ : Structured JSON envelope on stdout. Includes prompt + metrics. Disables streaming.
136
+
137
+ `--stream <mode>`
138
+ : `auto`, `on`, `off`. Default `auto` (TTY-only). Disabled in `--json` mode.
139
+
140
+ `--plain`
141
+ : Keep raw text/Markdown — no ANSI/OSC rendering.
142
+
143
+ `--no-color`
144
+ : Disable ANSI colors.
145
+
146
+ `--width <columns>`
147
+ : Override terminal width for Markdown rendering. Default: auto-detect, max 120.
148
+
149
+ `--theme <name>`
150
+ : Pick a CLI theme. Run `summarize --help` for the list. Env: `SUMMARIZE_THEME`.
151
+
152
+ ### Cache
153
+
154
+ `--no-cache`
155
+ : Bypass the summary (LLM) cache. Media + transcript caches stay enabled.
156
+
157
+ `--no-media-cache`
158
+ : Disable the media download cache (`yt-dlp` outputs).
159
+
160
+ `--cache-stats`
161
+ : Print cache stats and exit.
162
+
163
+ `--clear-cache`
164
+ : Delete the cache database and exit.
165
+
166
+ See [Cache internals](../cache.md) for what's cached and where.
167
+
168
+ ### Diagnostics
169
+
170
+ `--verbose`
171
+ : Detailed progress on stderr.
172
+
173
+ `--debug`
174
+ : Alias for `--verbose`. Also defaults `--metrics` to `detailed`.
175
+
176
+ `--metrics <mode>`
177
+ : `off`, `on`, `detailed`. Default `on`. Adds a compact second-line breakdown on stderr when `detailed`.
178
+
179
+ `--timeout <duration>`
180
+ : Cap the whole pipeline. `30`, `30s`, `2m`, `5000ms`. Default `2m`.
181
+
182
+ `-V`, `--version`
183
+ : Print version and exit.
184
+
185
+ ## Examples
186
+
187
+ ```bash
188
+ # Extracted plain text from a URL.
189
+ summarize "https://example.com" --extract
190
+
191
+ # Extracted Markdown — prefers Firecrawl when configured.
192
+ summarize "https://example.com" --extract --format md
193
+
194
+ # YouTube transcript as cleanly-formatted Markdown.
195
+ summarize "https://www.youtube.com/watch?v=..." \
196
+ --extract --format md --markdown-mode llm
197
+
198
+ # Inline slides + summary.
199
+ summarize "https://www.youtube.com/watch?v=..." --slides
200
+
201
+ # Full transcript + inline slides.
202
+ summarize "https://www.youtube.com/watch?v=..." --slides --extract
203
+
204
+ # Hard caps + a specific model.
205
+ summarize "https://example.com" \
206
+ --length 20k --max-output-tokens 2k --timeout 2m \
207
+ --model openai/gpt-5-mini
208
+
209
+ # OpenAI fast tier with reasoning.
210
+ summarize "https://example.com" \
211
+ --model openai/gpt-5.5 --fast --thinking medium
212
+
213
+ # GitHub Models via GITHUB_TOKEN.
214
+ summarize "https://example.com" --model github-copilot/gpt-5.4
215
+
216
+ # Config preset (alias defined in ~/.summarize/config.json).
217
+ summarize "https://example.com" --model mymodel
218
+
219
+ # Strict JSON for scripts.
220
+ summarize "https://example.com" --json --verbose
221
+
222
+ # Summarize the clipboard.
223
+ pbpaste | summarize -
224
+ ```
225
+
226
+ ## Environment
227
+
228
+ The provider keys and binary paths picked up at runtime are listed in [LLM overview](../llm.md#env). `SUMMARIZE_MODEL` overrides the default model selection; `SUMMARIZE_THEME` picks the theme.
229
+
230
+ ## See also
231
+
232
+ - [LLM overview](../llm.md) — how `--model` resolves to a provider.
233
+ - [Website mode](../website.md), [YouTube](../youtube.md), [Media + podcasts](../media.md).
234
+ - [Cache](../cache.md), [Firecrawl](../firecrawl.md).
235
+ - [Config](../config.md) for persistent defaults.
@@ -0,0 +1,67 @@
1
+ ---
2
+ title: summarize transcriber
3
+ permalink: /docs/commands/transcriber.html
4
+ kicker: command
5
+ summary: "Set up local ONNX transcription (Parakeet, Canary)."
6
+ ---
7
+
8
+ # `summarize transcriber`
9
+
10
+ ```text
11
+ summarize transcriber setup [--model parakeet|canary] [--theme <name>]
12
+ ```
13
+
14
+ Configures local ONNX transcription. The command **prints the env vars** you need to export — it doesn't write to your shell config. Once those vars are exported, `--transcriber auto` (or `SUMMARIZE_TRANSCRIBER=auto`) prefers the local path.
15
+
16
+ ## How auto picks a transcriber
17
+
18
+ When `--transcriber auto` is set (default), summarize tries providers in this order:
19
+
20
+ 1. **Groq** — fastest cloud option. Needs `GROQ_API_KEY`.
21
+ 2. **Local ONNX** (Parakeet or Canary) or `whisper.cpp` — fully offline. Needs the env vars from this command.
22
+ 3. **AssemblyAI / Gemini / OpenAI / FAL** — cloud fallbacks, in that order, gated by their respective API keys.
23
+
24
+ Skipping all of those falls back to the OpenAI-compatible Whisper endpoint in `OPENAI_WHISPER_BASE_URL`.
25
+
26
+ ## Subcommand
27
+
28
+ ### `summarize transcriber setup`
29
+
30
+ `--model <name>`
31
+ : `parakeet` (default) or `canary`. Picks which ONNX model the printed snippet targets.
32
+
33
+ `--theme <name>`
34
+ : CLI theme override.
35
+
36
+ The output is a labelled, copy-pasteable block of `export` lines for your shell. Re-run with the other model to switch.
37
+
38
+ ## Environment
39
+
40
+ Set by the printed snippet:
41
+
42
+ `SUMMARIZE_ONNX_PARAKEET_CMD`
43
+ : Command to run Parakeet ONNX transcription. Use `{input}` as the audio-file placeholder.
44
+
45
+ `SUMMARIZE_ONNX_CANARY_CMD`
46
+ : Command to run Canary ONNX transcription. Use `{input}` as the audio-file placeholder.
47
+
48
+ `SUMMARIZE_TRANSCRIBER`
49
+ : Optional. Lock in `auto`, `whisper`, `parakeet`, or `canary` without passing `--transcriber` every time.
50
+
51
+ ## Examples
52
+
53
+ ```bash
54
+ # Default: Parakeet.
55
+ summarize transcriber setup
56
+
57
+ # Set up Canary instead.
58
+ summarize transcriber setup --model canary
59
+
60
+ # After exporting the printed vars:
61
+ summarize "https://podcasts.apple.com/.../episode-..." --transcriber parakeet
62
+ ```
63
+
64
+ ## See also
65
+
66
+ - [ONNX transcription](../nvidia-onnx-transcription.md) — how to actually install the model + runtime.
67
+ - [Transcript provider flow](../transcript-provider-flow.md) — full selection waterfall.
package/docs/config.md CHANGED
@@ -1,4 +1,6 @@
1
1
  ---
2
+ title: "Config"
3
+ kicker: "get started"
2
4
  summary: "Config file location, precedence, and schema."
3
5
  read_when:
4
6
  - "When adding config keys or defaults."
@@ -359,17 +361,18 @@ Examples:
359
361
  ```json
360
362
  {
361
363
  "cli": {
362
- "enabled": ["gemini", "agent", "openclaw", "opencode"],
364
+ "enabled": ["gemini", "agent", "openclaw", "opencode", "copilot"],
363
365
  "autoFallback": {
364
366
  "enabled": true,
365
367
  "onlyWhenNoApiKeys": true,
366
- "order": ["claude", "gemini", "codex", "agent", "openclaw", "opencode"]
368
+ "order": ["claude", "gemini", "codex", "agent", "openclaw", "opencode", "copilot"]
367
369
  },
368
370
  "codex": { "model": "gpt-5.2" },
369
371
  "claude": { "binary": "/usr/local/bin/claude", "extraArgs": ["--verbose"] },
370
372
  "agent": { "binary": "/usr/local/bin/agent", "model": "gpt-5.2" },
371
373
  "openclaw": { "binary": "/usr/local/bin/openclaw", "model": "main" },
372
- "opencode": { "binary": "/usr/local/bin/opencode", "model": "openai/gpt-5.4" }
374
+ "opencode": { "binary": "/usr/local/bin/opencode", "model": "openai/gpt-5.4" },
375
+ "copilot": { "binary": "/usr/local/bin/copilot", "model": "gpt-5.2" }
373
376
  }
374
377
  }
375
378
  ```
@@ -378,10 +381,11 @@ Notes:
378
381
 
379
382
  - `cli.enabled` is an allowlist (and order) for auto + explicit CLI model ids.
380
383
  - `cli.autoFallback` controls implicit-auto CLI fallback when `cli.enabled` is not set.
381
- - Default auto fallback order: `claude, gemini, codex, agent, openclaw, opencode`.
384
+ - Default auto fallback order: `claude, gemini, codex, agent, openclaw, opencode, copilot`.
382
385
  - Auto fallback stores the last successful provider in `~/.summarize/cli-state.json` and prioritizes it on the next run.
383
386
  - `cli.<provider>.binary` overrides CLI binary discovery.
384
387
  - `cli.<provider>.extraArgs` appends extra CLI args.
388
+ - `cli.codex.isolated` defaults to `true` for normal summaries, adding Codex ephemeral/no-user-config/no-rules flags, a temporary cwd, and a sanitized temporary `CODEX_HOME` that carries auth only. Set it to `false` only when local Codex config/rules are intentional.
385
389
 
386
390
  ## OpenAI config
387
391
 
@@ -1,4 +1,6 @@
1
1
  ---
2
+ title: "Extract"
3
+ kicker: "modes"
2
4
  summary: "Extract mode behavior and markdown handling."
3
5
  read_when:
4
6
  - "When changing extract pipeline or flags."
package/docs/firecrawl.md CHANGED
@@ -1,4 +1,6 @@
1
1
  ---
2
+ title: "Firecrawl"
3
+ kicker: "modes"
2
4
  summary: "Firecrawl fallback modes and API key usage."
3
5
  read_when:
4
6
  - "When changing Firecrawl behavior."
package/docs/index.md CHANGED
@@ -1,25 +1,86 @@
1
1
  ---
2
- summary: "Docs index for summarize behaviors and modes."
2
+ title: summarize
3
+ permalink: /
4
+ kicker: cli + chrome side panel
5
+ hero: true
6
+ tagline: "Link → clean text → sharp summary."
7
+ description: "summarize is a fast CLI and Chrome Side Panel for clean extraction and sharp summaries of web pages, files, YouTube videos, and podcasts."
8
+ modes:
9
+ - { color: "lime", label: "Website" }
10
+ - { color: "orange", label: "YouTube" }
11
+ - { color: "teal", label: "Podcasts" }
12
+ - { color: "lime", label: "PDF / image" }
13
+ - { color: "orange", label: "Audio / video" }
14
+ - { color: "teal", label: "Slides" }
15
+ ctas:
16
+ - { primary: true, label: "Quickstart", href: "/docs/quickstart.html" }
17
+ - { label: "Install", href: "/docs/install.html" }
18
+ - { label: "Commands", href: "/docs/commands/" }
3
19
  ---
4
20
 
5
- # Docs
6
-
7
- - [Chrome extension](chrome-extension.md)
8
- - [Cache](cache.md)
9
- - [CLI](cli.md)
10
- - [Config](config.md)
11
- - [Extract](extract-only.md)
12
- - [Firecrawl](firecrawl.md)
13
- - [Language](language.md)
14
- - [LLM](llm.md)
15
- - [Manual tests](manual-tests.md)
16
- - [Model auto](model-auto.md)
17
- - [OpenAI](openai.md)
18
- - [Releasing](releasing.md)
19
- - [Smoke test](smoketest.md)
20
- - [Website](website.md)
21
- - [YouTube](youtube.md)
22
-
23
- ## Website
24
-
25
- - Jekyll site source: `docs/` (Markdown → HTML via GitHub Pages Actions)
21
+ `summarize` is a fast CLI for clean extraction and sharp summaries. It runs a real pipeline first — Readability for articles, `markitdown` for files, transcript fetchers and Whisper for media, Firecrawl as a fallback when sites fight back — then hands the result to whichever model you've wired up. Local, paid, and free models all work. A Chrome Side Panel pairs the CLI with the active tab.
22
+
23
+ ## Try it
24
+
25
+ ```bash
26
+ # Web page (default model, streamed Markdown).
27
+ summarize "https://example.com/article"
28
+
29
+ # YouTube — captions first, yt-dlp + Whisper as fallback.
30
+ summarize "https://youtu.be/I845O57ZSy4"
31
+
32
+ # Local file (PDF, image, audio, video).
33
+ summarize ./report.pdf --model openai/gpt-5-mini
34
+
35
+ # Stop after extraction — perfect for pipes.
36
+ summarize "https://example.com" --extract --format md | wc -w
37
+
38
+ # Clipboard / stdin.
39
+ pbpaste | summarize -
40
+
41
+ # JSON envelope for scripts (prompt + metrics included).
42
+ summarize "https://example.com" --json --metrics detailed
43
+ ```
44
+
45
+ `--extract` skips the LLM and prints cleaned content. `--json` writes a stable envelope on stdout while progress, prompts, and warnings stay on stderr — pipes always parse cleanly.
46
+
47
+ ## What summarize does
48
+
49
+ - **Real extraction.** Readability for articles, `markitdown` for files, Firecrawl as a fallback when sites fight back.
50
+ - **Media-aware.** YouTube and podcast pages prefer published transcripts, then `yt-dlp` + Whisper, then optional ONNX models (Parakeet/Canary).
51
+ - **Provider-agnostic models.** xAI, OpenAI, Google, Anthropic, NVIDIA, Z.AI, OpenRouter, GitHub Copilot — plus local CLI providers (Claude Code, Codex, Gemini, Cursor Agent, OpenClaw, OpenCode, Copilot CLI).
52
+ - **Shaped output.** Streamed ANSI Markdown for terminals, plain text for pipes, JSON envelope for scripts, ANSI-stripped under `--no-color`.
53
+ - **Slides for video.** `--slides` extracts scene-change keyframes and renders them inline (Kitty / iTerm) or saves them to disk.
54
+ - **Stays local.** Optional daemon + Chrome Side Panel pair the CLI with the active tab. The daemon binds to `127.0.0.1` only and uses a shared bearer token.
55
+
56
+ ## Pick your path
57
+
58
+ - **Trying it for the first time.** [Install](docs/install.html) → [Quickstart](docs/quickstart.html). Five minutes from `npm i -g` to your first summary.
59
+ - **Looking up a flag.** [Commands](docs/commands/) — every subcommand and flag, with examples.
60
+ - **Wiring up a model.** [LLM overview](docs/llm.html), [Auto selection](docs/model-auto.html), [OpenAI options](docs/openai.html), [CLI providers](docs/cli.html).
61
+ - **Stuck site.** [Website mode](docs/website.html) and [Firecrawl](docs/firecrawl.html) cover extractor selection and fallbacks.
62
+ - **Audio / video work.** [YouTube](docs/youtube.html), [Media + podcasts](docs/media.html), [Slides](docs/slides.html), [ONNX transcription](docs/nvidia-onnx-transcription.html).
63
+ - **Browser pairing.** [Chrome extension](docs/chrome-extension.html) walks through pairing with the local daemon.
64
+ - **Defaults that stick.** [Config](docs/config.html) covers the JSON schema, env vars, presets, and provider base URLs.
65
+
66
+ ## Configuration
67
+
68
+ Save defaults in `~/.summarize/config.json` and override per-invocation with flags. Full schema: [Config](docs/config.html).
69
+
70
+ ```json
71
+ {
72
+ "model": "auto",
73
+ "output": {
74
+ "length": "xl",
75
+ "language": "auto"
76
+ },
77
+ "models": {
78
+ "free": ["openai/gpt-oss-120b:free", "z-ai/glm-4.6:free"]
79
+ },
80
+ "cache": { "enabled": true, "maxMb": 512 }
81
+ }
82
+ ```
83
+
84
+ ## Project
85
+
86
+ Active development; the [changelog](https://github.com/steipete/summarize/blob/main/CHANGELOG.md) tracks recent releases. Released under the [MIT license](https://github.com/steipete/summarize/blob/main/LICENSE). Source at [github.com/steipete/summarize](https://github.com/steipete/summarize). The Chrome extension is on the [Chrome Web Store](https://chromewebstore.google.com/detail/summarize/cejgnmmhbbpdmjnfppjdfkocebngehfg).
@@ -0,0 +1,133 @@
1
+ ---
2
+ title: Install
3
+ kicker: get started
4
+ summary: "Install the summarize CLI and optional media dependencies."
5
+ ---
6
+
7
+ # Install
8
+
9
+ `summarize` ships as a single npm package and a Homebrew formula. The CLI works on its own; the Chrome Side Panel needs the local daemon (covered in [Chrome extension](chrome-extension.md)).
10
+
11
+ ## Requirements
12
+
13
+ - Node **24 or newer**.
14
+ - macOS, Linux, or Windows. Containers work too — see [Notes](#notes-windows-containers) below.
15
+ - Optional: `ffmpeg`, `yt-dlp`, `tesseract` for media-heavy features.
16
+
17
+ ## CLI
18
+
19
+ ### npm (cross-platform)
20
+
21
+ ```bash
22
+ npm i -g @steipete/summarize
23
+ ```
24
+
25
+ ### Homebrew (macOS, Linux)
26
+
27
+ ```bash
28
+ brew install summarize
29
+ ```
30
+
31
+ The Homebrew formula lives in `homebrew/core`. If Homebrew isn't available, use the npm route.
32
+
33
+ ### npx (no install)
34
+
35
+ ```bash
36
+ npx -y @steipete/summarize "https://example.com"
37
+ ```
38
+
39
+ Useful for one-shot summaries on a fresh machine.
40
+
41
+ ### Library use
42
+
43
+ If you want extraction without the CLI, install the trimmed library:
44
+
45
+ ```bash
46
+ npm i @steipete/summarize-core
47
+ ```
48
+
49
+ ```ts
50
+ import { createLinkPreviewClient } from "@steipete/summarize-core/content";
51
+ ```
52
+
53
+ ## Optional dependencies
54
+
55
+ These unlock media features but are not required for plain web pages.
56
+
57
+ | Tool | Required for |
58
+ | ------------------------------ | ------------------------------------------------------------------------ |
59
+ | `ffmpeg` | `--slides` extraction; many local media + transcription flows |
60
+ | `yt-dlp` | YouTube slide extraction and some remote media flows |
61
+ | `tesseract` | OCR text on extracted slides via `--slides-ocr` |
62
+ | `whisper.cpp` (binary on PATH) | Local audio transcription fallback (preferred over cloud when available) |
63
+
64
+ ### macOS
65
+
66
+ ```bash
67
+ brew install ffmpeg yt-dlp
68
+ brew install tesseract # optional, for --slides-ocr
69
+ brew install whisper-cpp # optional, local Whisper
70
+ ```
71
+
72
+ ### Linux
73
+
74
+ ```bash
75
+ sudo apt install ffmpeg yt-dlp tesseract-ocr
76
+ # whisper.cpp: build from source or fetch a binary release
77
+ ```
78
+
79
+ ### Optional cloud transcription
80
+
81
+ Set any of these env vars to enable a cloud transcription path. `summarize` picks one automatically (Groq is preferred for speed when available).
82
+
83
+ ```bash
84
+ export GROQ_API_KEY=...
85
+ export ASSEMBLYAI_API_KEY=...
86
+ export GEMINI_API_KEY=...
87
+ export OPENAI_API_KEY=...
88
+ export FAL_KEY=...
89
+ ```
90
+
91
+ If `--slides` is enabled and `ffmpeg`/`yt-dlp` are missing, summarize logs a warning and continues without slides — it never fails the run.
92
+
93
+ ## Provider keys
94
+
95
+ Set the keys for the providers you want to use. Most flows work with at least one; missing keys only block their respective `--model` namespaces.
96
+
97
+ ```bash
98
+ export OPENAI_API_KEY=sk-...
99
+ export ANTHROPIC_API_KEY=...
100
+ export GEMINI_API_KEY=...
101
+ export XAI_API_KEY=xai-...
102
+ export NVIDIA_API_KEY=nvapi-...
103
+ export OPENROUTER_API_KEY=or-...
104
+ export Z_AI_API_KEY=...
105
+ export GITHUB_TOKEN=ghp-... # for github-copilot/* models
106
+ ```
107
+
108
+ Full list and routing details: [LLM overview](llm.md). For free OpenRouter models, run `summarize refresh-free` once after setting `OPENROUTER_API_KEY`.
109
+
110
+ ## Verify the install
111
+
112
+ ```bash
113
+ summarize --version
114
+ summarize "https://en.wikipedia.org/wiki/Llama" --extract --format md | head
115
+ ```
116
+
117
+ ## Local Docs Preview
118
+
119
+ Build and preview the static docs site from the repo root with:
120
+
121
+ ```bash
122
+ ./scripts/docs-serve.sh
123
+ ```
124
+
125
+ Use `PORT=4001 ./scripts/docs-serve.sh` to pick another port.
126
+
127
+ ## Notes (Windows / containers)
128
+
129
+ - **Windows native:** `summarize` runs under Node 24. The daemon registers a Scheduled Task on first install.
130
+ - **Windows containers:** `summarize daemon install` starts the daemon for the current container session but does not register a Scheduled Task. Run the install on each startup or add it to the container entrypoint, and publish port `8787` so a host browser can reach the daemon.
131
+ - **WSL2:** treat as Linux. The daemon installs as a systemd user service if `systemd` is available; otherwise run `summarize daemon run` in a long-lived shell.
132
+
133
+ Next: head to [Quickstart](quickstart.md).
package/docs/language.md CHANGED
@@ -1,4 +1,6 @@
1
1
  ---
2
+ title: "Language"
3
+ kicker: "modes"
2
4
  summary: "Output language flag and config options."
3
5
  read_when:
4
6
  - "When changing language handling."
package/docs/llm.md CHANGED
@@ -1,4 +1,6 @@
1
1
  ---
2
+ title: "LLM overview"
3
+ kicker: "models"
2
4
  summary: "LLM usage, env vars, flags, and prompt rules."
3
5
  read_when:
4
6
  - "When changing model selection or prompt formatting."
@@ -35,7 +37,7 @@ installed, auto mode can use local CLI models via `cli.enabled` or implicit auto
35
37
  - `ANTHROPIC_API_KEY` (required for `anthropic/...` models)
36
38
  - `ANTHROPIC_BASE_URL` (optional; override Anthropic API endpoint)
37
39
  - `SUMMARIZE_MODEL` (optional; overrides default model selection)
38
- - `CLAUDE_PATH` / `CODEX_PATH` / `GEMINI_PATH` / `AGENT_PATH` / `OPENCLAW_PATH` / `OPENCODE_PATH` (optional; override CLI binary paths)
40
+ - `CLAUDE_PATH` / `CODEX_PATH` / `GEMINI_PATH` / `AGENT_PATH` / `OPENCLAW_PATH` / `OPENCODE_PATH` / `COPILOT_PATH` (optional; override CLI binary paths)
39
41
 
40
42
  ## Flags
41
43
 
@@ -49,6 +51,7 @@ installed, auto mode can use local CLI models via `cli.enabled` or implicit auto
49
51
  - `cli/agent/auto`
50
52
  - `cli/openclaw/main`
51
53
  - `cli/opencode/openai/gpt-5.4`
54
+ - `cli/copilot/gpt-5.2`
52
55
  - `openai/gpt-5.4`
53
56
  - `openai/gpt-5.4-mini`
54
57
  - `openai/gpt-5.4-nano`
@@ -63,7 +66,7 @@ installed, auto mode can use local CLI models via `cli.enabled` or implicit auto
63
66
  - `anthropic/claude-sonnet-4-5`
64
67
  - `openrouter/meta-llama/llama-3.3-70b-instruct:free` (force OpenRouter)
65
68
  - `--cli [provider]`
66
- - Examples: `--cli claude`, `--cli Gemini`, `--cli codex`, `--cli agent`, `--cli openclaw`, `--cli opencode` (equivalent to `--model cli/<provider>`); `--cli` alone uses auto selection with CLI enabled.
69
+ - Examples: `--cli claude`, `--cli Gemini`, `--cli codex`, `--cli agent`, `--cli openclaw`, `--cli opencode`, `--cli copilot` (equivalent to `--model cli/<provider>`); `--cli` alone uses auto selection with CLI enabled.
67
70
  - `--model auto`
68
71
  - See `docs/model-auto.md`
69
72
  - `--model <preset>`
@@ -142,4 +145,5 @@ Use `--model github-copilot/<model>` for explicit GitHub-hosted model calls.
142
145
 
143
146
  - For PDF inputs, `--preprocess auto` will send the PDF directly to Anthropic/OpenAI/Gemini when a fixed model supports documents; otherwise we fall back to markitdown.
144
147
  - `--preprocess always` forces markitdown (no direct attachments).
148
+ - When markitdown returns only page headers for an image-only PDF, summarize can retry with OpenAI vision OCR if `OPENAI_API_KEY` is available. The OCR model defaults to `gpt-4o-mini`; set `MARKITDOWN_OCR_MODEL` to override it, or `MARKITDOWN_OCR_DPI` to tune rendered page size. This sends rendered PDF pages to the OpenAI API and may incur per-page vision costs.
145
149
  - Streaming is disabled for document attachments.
@@ -1,4 +1,6 @@
1
1
  ---
2
+ title: "Manual tests"
3
+ kicker: "project"
2
4
  summary: "Manual end-to-end test checklist for model and input coverage."
3
5
  read_when:
4
6
  - "When doing release validation."
package/docs/media.md CHANGED
@@ -1,4 +1,6 @@
1
1
  ---
2
+ title: "Media + podcasts"
3
+ kicker: "modes"
2
4
  summary: "Embedded media detection + transcript-first pipeline."
3
5
  read_when:
4
6
  - "When changing media detection, embedded captions, or video-mode behavior."
@@ -1,4 +1,6 @@
1
1
  ---
2
+ title: "Auto selection"
3
+ kicker: "models"
2
4
  summary: "Auto model selection logic and config rules."
3
5
  read_when:
4
6
  - "When changing auto selection behavior."