@steipete/summarize 0.14.0 → 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 (241) hide show
  1. package/CHANGELOG.md +39 -1
  2. package/LICENSE +1 -1
  3. package/README.md +38 -4
  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/model.js +28 -1
  10. package/dist/esm/config/model.js.map +1 -1
  11. package/dist/esm/config/parse-helpers.js +2 -1
  12. package/dist/esm/config/parse-helpers.js.map +1 -1
  13. package/dist/esm/config/sections.js +40 -0
  14. package/dist/esm/config/sections.js.map +1 -1
  15. package/dist/esm/daemon/agent-model.js +7 -3
  16. package/dist/esm/daemon/agent-model.js.map +1 -1
  17. package/dist/esm/daemon/agent.js +1 -1
  18. package/dist/esm/daemon/agent.js.map +1 -1
  19. package/dist/esm/daemon/chat.js +5 -0
  20. package/dist/esm/daemon/chat.js.map +1 -1
  21. package/dist/esm/daemon/cli.js +32 -6
  22. package/dist/esm/daemon/cli.js.map +1 -1
  23. package/dist/esm/daemon/config.js +14 -2
  24. package/dist/esm/daemon/config.js.map +1 -1
  25. package/dist/esm/daemon/env-snapshot.js +1 -0
  26. package/dist/esm/daemon/env-snapshot.js.map +1 -1
  27. package/dist/esm/daemon/launchd.js.map +1 -1
  28. package/dist/esm/daemon/models.js +8 -2
  29. package/dist/esm/daemon/models.js.map +1 -1
  30. package/dist/esm/daemon/process-registry.js.map +1 -1
  31. package/dist/esm/daemon/server-summarize-request.js +5 -1
  32. package/dist/esm/daemon/server-summarize-request.js.map +1 -1
  33. package/dist/esm/daemon/server.js +29 -2
  34. package/dist/esm/daemon/server.js.map +1 -1
  35. package/dist/esm/flags.js +3 -0
  36. package/dist/esm/flags.js.map +1 -1
  37. package/dist/esm/llm/cli-exec.js +39 -1
  38. package/dist/esm/llm/cli-exec.js.map +1 -1
  39. package/dist/esm/llm/cli-provider-output.js +4 -1
  40. package/dist/esm/llm/cli-provider-output.js.map +1 -1
  41. package/dist/esm/llm/cli.js +91 -33
  42. package/dist/esm/llm/cli.js.map +1 -1
  43. package/dist/esm/llm/generate-text-document.js +2 -1
  44. package/dist/esm/llm/generate-text-document.js.map +1 -1
  45. package/dist/esm/llm/generate-text-stream.js +5 -3
  46. package/dist/esm/llm/generate-text-stream.js.map +1 -1
  47. package/dist/esm/llm/generate-text.js +11 -3
  48. package/dist/esm/llm/generate-text.js.map +1 -1
  49. package/dist/esm/llm/html-to-markdown.js +2 -1
  50. package/dist/esm/llm/html-to-markdown.js.map +1 -1
  51. package/dist/esm/llm/model-options.js +63 -0
  52. package/dist/esm/llm/model-options.js.map +1 -0
  53. package/dist/esm/llm/provider-profile.js +10 -2
  54. package/dist/esm/llm/provider-profile.js.map +1 -1
  55. package/dist/esm/llm/providers/anthropic.js +1 -1
  56. package/dist/esm/llm/providers/anthropic.js.map +1 -1
  57. package/dist/esm/llm/providers/google.js +10 -4
  58. package/dist/esm/llm/providers/google.js.map +1 -1
  59. package/dist/esm/llm/providers/openai.js +46 -5
  60. package/dist/esm/llm/providers/openai.js.map +1 -1
  61. package/dist/esm/llm/providers/shared.js +1 -1
  62. package/dist/esm/llm/providers/shared.js.map +1 -1
  63. package/dist/esm/llm/transcript-to-markdown.js +2 -1
  64. package/dist/esm/llm/transcript-to-markdown.js.map +1 -1
  65. package/dist/esm/markitdown.js +139 -10
  66. package/dist/esm/markitdown.js.map +1 -1
  67. package/dist/esm/model-auto-cli.js +3 -1
  68. package/dist/esm/model-auto-cli.js.map +1 -1
  69. package/dist/esm/model-auto.js +10 -3
  70. package/dist/esm/model-auto.js.map +1 -1
  71. package/dist/esm/model-spec.js +27 -2
  72. package/dist/esm/model-spec.js.map +1 -1
  73. package/dist/esm/pricing/litellm.js +30 -0
  74. package/dist/esm/pricing/litellm.js.map +1 -1
  75. package/dist/esm/refresh-free.js +6 -3
  76. package/dist/esm/refresh-free.js.map +1 -1
  77. package/dist/esm/run/cli-fallback-state.js +2 -1
  78. package/dist/esm/run/cli-fallback-state.js.map +1 -1
  79. package/dist/esm/run/constants.js +9 -1
  80. package/dist/esm/run/constants.js.map +1 -1
  81. package/dist/esm/run/env.js +13 -3
  82. package/dist/esm/run/env.js.map +1 -1
  83. package/dist/esm/run/fetch-with-timeout.js.map +1 -1
  84. package/dist/esm/run/finish-line-labels.js +2 -0
  85. package/dist/esm/run/finish-line-labels.js.map +1 -1
  86. package/dist/esm/run/flows/asset/extract.js +5 -3
  87. package/dist/esm/run/flows/asset/extract.js.map +1 -1
  88. package/dist/esm/run/flows/asset/preprocess.js +13 -10
  89. package/dist/esm/run/flows/asset/preprocess.js.map +1 -1
  90. package/dist/esm/run/flows/asset/summary-attempts.js +3 -0
  91. package/dist/esm/run/flows/asset/summary-attempts.js.map +1 -1
  92. package/dist/esm/run/flows/url/extraction-session.js.map +1 -1
  93. package/dist/esm/run/flows/url/flow.js +14 -1
  94. package/dist/esm/run/flows/url/flow.js.map +1 -1
  95. package/dist/esm/run/flows/url/markdown.js +9 -1
  96. package/dist/esm/run/flows/url/markdown.js.map +1 -1
  97. package/dist/esm/run/flows/url/slides-text-transcript.js +10 -1
  98. package/dist/esm/run/flows/url/slides-text-transcript.js.map +1 -1
  99. package/dist/esm/run/flows/url/summary-prompt.js +14 -3
  100. package/dist/esm/run/flows/url/summary-prompt.js.map +1 -1
  101. package/dist/esm/run/flows/url/summary-resolution.js +13 -2
  102. package/dist/esm/run/flows/url/summary-resolution.js.map +1 -1
  103. package/dist/esm/run/flows/url/summary-timestamps.js +90 -6
  104. package/dist/esm/run/flows/url/summary-timestamps.js.map +1 -1
  105. package/dist/esm/run/flows/url/types.js +2 -1
  106. package/dist/esm/run/flows/url/types.js.map +1 -1
  107. package/dist/esm/run/help.js +9 -2
  108. package/dist/esm/run/help.js.map +1 -1
  109. package/dist/esm/run/perf-trace.js +54 -0
  110. package/dist/esm/run/perf-trace.js.map +1 -0
  111. package/dist/esm/run/run-config.js +36 -1
  112. package/dist/esm/run/run-config.js.map +1 -1
  113. package/dist/esm/run/run-metrics.js +11 -4
  114. package/dist/esm/run/run-metrics.js.map +1 -1
  115. package/dist/esm/run/run-models.js +39 -14
  116. package/dist/esm/run/run-models.js.map +1 -1
  117. package/dist/esm/run/run-settings-parse.js +2 -0
  118. package/dist/esm/run/run-settings-parse.js.map +1 -1
  119. package/dist/esm/run/run-settings.js.map +1 -1
  120. package/dist/esm/run/runner-contexts.js +2 -1
  121. package/dist/esm/run/runner-contexts.js.map +1 -1
  122. package/dist/esm/run/runner-plan.js +12 -2
  123. package/dist/esm/run/runner-plan.js.map +1 -1
  124. package/dist/esm/run/runner-setup.js +2 -2
  125. package/dist/esm/run/runner-setup.js.map +1 -1
  126. package/dist/esm/run/runner.js +61 -44
  127. package/dist/esm/run/runner.js.map +1 -1
  128. package/dist/esm/run/slides-cli.js +1 -1
  129. package/dist/esm/run/slides-cli.js.map +1 -1
  130. package/dist/esm/run/summary-engine.js +22 -0
  131. package/dist/esm/run/summary-engine.js.map +1 -1
  132. package/dist/esm/run/summary-llm.js +2 -1
  133. package/dist/esm/run/summary-llm.js.map +1 -1
  134. package/dist/esm/slides/settings.js +8 -0
  135. package/dist/esm/slides/settings.js.map +1 -1
  136. package/dist/esm/tty/spinner.js +1 -1
  137. package/dist/esm/tty/spinner.js.map +1 -1
  138. package/dist/esm/version.js +73 -24
  139. package/dist/esm/version.js.map +1 -1
  140. package/dist/types/cli.d.ts +1 -0
  141. package/dist/types/config/sections.d.ts +10 -10
  142. package/dist/types/config/types.d.ts +18 -1
  143. package/dist/types/content/asset.d.ts +1 -1
  144. package/dist/types/daemon/agent-model.d.ts +3 -3
  145. package/dist/types/daemon/agent-request.d.ts +1 -1
  146. package/dist/types/daemon/agent.d.ts +1 -1
  147. package/dist/types/daemon/chat.d.ts +1 -1
  148. package/dist/types/daemon/env-snapshot.d.ts +1 -1
  149. package/dist/types/daemon/models.d.ts +1 -0
  150. package/dist/types/llm/cli-exec.d.ts +6 -0
  151. package/dist/types/llm/cli-provider-output.d.ts +1 -1
  152. package/dist/types/llm/generate-text-document.d.ts +2 -0
  153. package/dist/types/llm/generate-text-shared.d.ts +1 -1
  154. package/dist/types/llm/generate-text-stream.d.ts +4 -2
  155. package/dist/types/llm/generate-text.d.ts +5 -2
  156. package/dist/types/llm/html-to-markdown.d.ts +3 -1
  157. package/dist/types/llm/model-options.d.ts +16 -0
  158. package/dist/types/llm/prompt.d.ts +1 -1
  159. package/dist/types/llm/provider-profile.d.ts +4 -2
  160. package/dist/types/llm/providers/anthropic.d.ts +1 -1
  161. package/dist/types/llm/providers/google.d.ts +1 -1
  162. package/dist/types/llm/providers/models.d.ts +1 -1
  163. package/dist/types/llm/providers/openai.d.ts +4 -2
  164. package/dist/types/llm/providers/shared.d.ts +1 -1
  165. package/dist/types/llm/providers/types.d.ts +2 -0
  166. package/dist/types/llm/transcript-to-markdown.d.ts +3 -1
  167. package/dist/types/markitdown.d.ts +6 -2
  168. package/dist/types/model-auto.d.ts +2 -0
  169. package/dist/types/model-spec.d.ts +8 -1
  170. package/dist/types/pricing/litellm.d.ts +3 -0
  171. package/dist/types/run/constants.d.ts +2 -1
  172. package/dist/types/run/flows/url/markdown.d.ts +1 -0
  173. package/dist/types/run/flows/url/summary-json.d.ts +6 -6
  174. package/dist/types/run/flows/url/summary-timestamps.d.ts +5 -0
  175. package/dist/types/run/flows/url/types.d.ts +6 -0
  176. package/dist/types/run/perf-trace.d.ts +9 -0
  177. package/dist/types/run/run-config.d.ts +3 -0
  178. package/dist/types/run/run-context.d.ts +2 -0
  179. package/dist/types/run/runner-contexts.d.ts +2 -0
  180. package/dist/types/run/runner-plan.d.ts +2 -0
  181. package/dist/types/run/runner-setup.d.ts +2 -1
  182. package/dist/types/run/summary-engine.d.ts +5 -0
  183. package/dist/types/run/summary-llm.d.ts +3 -1
  184. package/dist/types/run/types.d.ts +4 -1
  185. package/dist/types/shared/sse-events.d.ts +1 -1
  186. package/dist/types/version.d.ts +1 -1
  187. package/docs/README.md +1 -1
  188. package/docs/agent.md +2 -0
  189. package/docs/cache.md +3 -1
  190. package/docs/chrome-extension.md +3 -1
  191. package/docs/cli.md +20 -9
  192. package/docs/commands/daemon.md +106 -0
  193. package/docs/commands/index.md +53 -0
  194. package/docs/commands/refresh-free.md +83 -0
  195. package/docs/commands/slides.md +120 -0
  196. package/docs/commands/summarize.md +235 -0
  197. package/docs/commands/transcriber.md +67 -0
  198. package/docs/config.md +39 -5
  199. package/docs/extract-only.md +2 -0
  200. package/docs/firecrawl.md +2 -0
  201. package/docs/index.md +83 -22
  202. package/docs/install.md +133 -0
  203. package/docs/language.md +2 -0
  204. package/docs/llm.md +15 -3
  205. package/docs/manual-tests.md +2 -0
  206. package/docs/media.md +2 -0
  207. package/docs/model-auto.md +2 -0
  208. package/docs/model-provider-resolution.md +2 -0
  209. package/docs/nvidia-onnx-transcription.md +2 -0
  210. package/docs/openai.md +32 -1
  211. package/docs/quickstart.md +114 -0
  212. package/docs/releasing.md +2 -0
  213. package/docs/slides-rendering-flow.md +2 -0
  214. package/docs/slides.md +2 -0
  215. package/docs/smoketest.md +13 -11
  216. package/docs/timestamps.md +2 -0
  217. package/docs/transcript-provider-flow.md +2 -0
  218. package/docs/website.md +2 -0
  219. package/docs/youtube.md +2 -0
  220. package/package.json +51 -37
  221. package/docs/_config.yml +0 -27
  222. package/docs/_layouts/default.html +0 -60
  223. package/docs/assets/site.css +0 -891
  224. package/docs/assets/site.js +0 -72
  225. package/docs/index.html +0 -229
  226. package/docs/site/.nojekyll +0 -1
  227. package/docs/site/404.html +0 -40
  228. package/docs/site/assets/site.css +0 -748
  229. package/docs/site/assets/site.js +0 -72
  230. package/docs/site/assets/summarize-cli.png +0 -0
  231. package/docs/site/assets/summarize-extension.png +0 -0
  232. package/docs/site/docs/chrome-extension.html +0 -101
  233. package/docs/site/docs/config.html +0 -95
  234. package/docs/site/docs/extract-only.html +0 -94
  235. package/docs/site/docs/firecrawl.html +0 -82
  236. package/docs/site/docs/index.html +0 -124
  237. package/docs/site/docs/llm.html +0 -85
  238. package/docs/site/docs/openai.html +0 -80
  239. package/docs/site/docs/website.html +0 -96
  240. package/docs/site/docs/youtube.html +0 -72
  241. package/docs/site/index.html +0 -229
@@ -0,0 +1,120 @@
1
+ ---
2
+ title: summarize slides
3
+ permalink: /docs/commands/slides.html
4
+ kicker: command
5
+ summary: "Extract scene-change keyframes from a video URL into PNG files."
6
+ ---
7
+
8
+ # `summarize slides`
9
+
10
+ ```text
11
+ summarize slides <url> [flags]
12
+ ```
13
+
14
+ Extracts slide-shaped keyframes from a YouTube or direct video URL using `ffmpeg` scene detection. Output is a directory of PNGs (and optional OCR text). This is the standalone form of the `--slides` flag on the main command — useful when you only want the slides without a summary.
15
+
16
+ ## Synopsis
17
+
18
+ ```bash
19
+ summarize slides "https://youtu.be/..."
20
+ summarize slides "https://youtu.be/..." --render auto
21
+ summarize slides "https://youtu.be/..." --slides-ocr -o ./out
22
+ summarize slides "https://example.com/lecture.mp4" --slides-max 12
23
+ ```
24
+
25
+ ## Requirements
26
+
27
+ - `ffmpeg` on PATH (scene detection + frame extraction).
28
+ - `yt-dlp` on PATH for YouTube URLs.
29
+ - `tesseract` on PATH for `--slides-ocr`.
30
+
31
+ If a tool is missing, summarize prints a clear warning and exits non-zero.
32
+
33
+ ## Flags
34
+
35
+ `--slides-ocr`
36
+ : Run OCR on every extracted slide. Saves a `.txt` next to each PNG.
37
+
38
+ `--slides-dir <dir>`
39
+ : Output base directory. Default: `./slides`. A per-video subfolder is created inside.
40
+
41
+ `-o, --output <dir>`
42
+ : Alias for `--slides-dir`.
43
+
44
+ `--slides-scene-threshold <value>`
45
+ : Scene detection threshold, `0.1`–`1.0`. Default `0.3`. Lower values detect more scenes (more slides); higher values are stricter.
46
+
47
+ `--slides-max <count>`
48
+ : Cap on extracted slides. Default `6`.
49
+
50
+ `--slides-min-duration <seconds>`
51
+ : Minimum gap between slides. Default `2`.
52
+
53
+ `--render <mode>`
54
+ : Inline render of thumbnails: `auto`, `kitty`, `iterm`, `none`. Default `none` — paths are printed instead.
55
+
56
+ `--theme <name>`
57
+ : Pick a CLI theme.
58
+
59
+ `--timeout <duration>`
60
+ : Cap the download + extraction. Default `2m`.
61
+
62
+ `--no-cache`
63
+ : Force re-download and re-extraction (bypasses both caches).
64
+
65
+ `--json`
66
+ : JSON envelope on stdout. Disables inline rendering.
67
+
68
+ `--verbose` / `--debug`
69
+ : Detailed progress on stderr.
70
+
71
+ `-V`, `--version`
72
+ : Print version and exit.
73
+
74
+ ## Output
75
+
76
+ Each run writes a directory like:
77
+
78
+ ```text
79
+ slides/<video-id>/
80
+ 001.png
81
+ 002.png
82
+ ...
83
+ 001.txt # only with --slides-ocr
84
+ ```
85
+
86
+ In `--json` mode, stdout is:
87
+
88
+ ```json
89
+ {
90
+ "url": "...",
91
+ "outDir": "slides/<id>",
92
+ "slides": [{ "index": 1, "path": "...001.png", "timeSeconds": 18.6, "ocr": "..." }]
93
+ }
94
+ ```
95
+
96
+ ## Inline rendering
97
+
98
+ `--render auto` detects Kitty (`KITTY_WINDOW_ID`) and iTerm (`TERM_PROGRAM=iTerm.app`) and uses the matching image protocol. On unsupported terminals, slides are listed by path instead.
99
+
100
+ ## Examples
101
+
102
+ ```bash
103
+ # Quick preview in iTerm/Kitty.
104
+ summarize slides "https://youtu.be/..." --render auto
105
+
106
+ # Big lecture, more granular cuts.
107
+ summarize slides "https://youtu.be/..." \
108
+ --slides-max 24 --slides-scene-threshold 0.2
109
+
110
+ # Pipe-friendly JSON for an automation.
111
+ summarize slides "https://youtu.be/..." --json | jq '.slides[].path'
112
+
113
+ # Force re-extraction after editing the source video.
114
+ summarize slides "./talk.mp4" --no-cache -o ./out
115
+ ```
116
+
117
+ ## See also
118
+
119
+ - [Slides mode](../slides.md) — the inline `--slides` flag on the main command.
120
+ - [Slides rendering flow](../slides-rendering-flow.md) — pipeline internals.
@@ -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."
@@ -253,7 +255,37 @@ Notes:
253
255
 
254
256
  - `auto` is reserved and can’t be defined as a preset.
255
257
  - `free` is built-in (OpenRouter `:free` candidates). Override it by defining `models.free` in your config, or regenerate it via `summarize refresh-free`.
256
- - `gpt-fast` and `fast` are built-in Codex GPT-5.5 Fast presets. Override them by defining `models.gpt-fast` or `models.fast` in your config.
258
+ - `gpt-fast` and `fast` remain compatibility aliases for OpenAI GPT-5.5 Fast mode. Prefer `model: "openai/gpt-5.5"` plus `openai.serviceTier` / `openai.thinking`. `codex-fast` is the explicit Codex CLI fast preset.
259
+
260
+ OpenAI request options can be set globally:
261
+
262
+ ```json
263
+ {
264
+ "openai": {
265
+ "serviceTier": "fast",
266
+ "thinking": "medium",
267
+ "textVerbosity": "low"
268
+ }
269
+ }
270
+ ```
271
+
272
+ Or per preset:
273
+
274
+ ```json
275
+ {
276
+ "models": {
277
+ "fast-mini": {
278
+ "id": "openai/gpt-5.4-mini",
279
+ "serviceTier": "fast",
280
+ "thinking": "low"
281
+ }
282
+ }
283
+ }
284
+ ```
285
+
286
+ `thinking` is an alias for `reasoningEffort`. Supported values: `none`, `low`, `medium`, `high`, `xhigh`; shorthand aliases include `off`, `min` (low), `mid`, `med`, `x-high`, and `extra-high`.
287
+
288
+ `serviceTier: "fast"` is the summarize/Codex-facing spelling. Direct OpenAI requests map it to `service_tier="priority"`. CLI `--service-tier default` clears a configured tier for one run.
257
289
 
258
290
  Use a preset as your default `model`:
259
291
 
@@ -329,17 +361,18 @@ Examples:
329
361
  ```json
330
362
  {
331
363
  "cli": {
332
- "enabled": ["gemini", "agent", "openclaw", "opencode"],
364
+ "enabled": ["gemini", "agent", "openclaw", "opencode", "copilot"],
333
365
  "autoFallback": {
334
366
  "enabled": true,
335
367
  "onlyWhenNoApiKeys": true,
336
- "order": ["claude", "gemini", "codex", "agent", "openclaw", "opencode"]
368
+ "order": ["claude", "gemini", "codex", "agent", "openclaw", "opencode", "copilot"]
337
369
  },
338
370
  "codex": { "model": "gpt-5.2" },
339
371
  "claude": { "binary": "/usr/local/bin/claude", "extraArgs": ["--verbose"] },
340
372
  "agent": { "binary": "/usr/local/bin/agent", "model": "gpt-5.2" },
341
373
  "openclaw": { "binary": "/usr/local/bin/openclaw", "model": "main" },
342
- "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" }
343
376
  }
344
377
  }
345
378
  ```
@@ -348,10 +381,11 @@ Notes:
348
381
 
349
382
  - `cli.enabled` is an allowlist (and order) for auto + explicit CLI model ids.
350
383
  - `cli.autoFallback` controls implicit-auto CLI fallback when `cli.enabled` is not set.
351
- - Default auto fallback order: `claude, gemini, codex, agent, openclaw, opencode`.
384
+ - Default auto fallback order: `claude, gemini, codex, agent, openclaw, opencode, copilot`.
352
385
  - Auto fallback stores the last successful provider in `~/.summarize/cli-state.json` and prioritizes it on the next run.
353
386
  - `cli.<provider>.binary` overrides CLI binary discovery.
354
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.
355
389
 
356
390
  ## OpenAI config
357
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).