@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,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,19 +37,21 @@ 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
 
42
44
  - `--model <model>`
43
45
  - Examples:
44
46
  - `cli/codex/gpt-5.2`
45
- - `gpt-fast` (built-in Codex GPT-5.5 Fast preset; alias: `fast`)
47
+ - `openai/gpt-5.5`
48
+ - `codex-fast` (explicit Codex CLI GPT Fast preset)
46
49
  - `cli/claude/sonnet`
47
50
  - `cli/gemini/flash`
48
51
  - `cli/agent/auto`
49
52
  - `cli/openclaw/main`
50
53
  - `cli/opencode/openai/gpt-5.4`
54
+ - `cli/copilot/gpt-5.2`
51
55
  - `openai/gpt-5.4`
52
56
  - `openai/gpt-5.4-mini`
53
57
  - `openai/gpt-5.4-nano`
@@ -62,7 +66,7 @@ installed, auto mode can use local CLI models via `cli.enabled` or implicit auto
62
66
  - `anthropic/claude-sonnet-4-5`
63
67
  - `openrouter/meta-llama/llama-3.3-70b-instruct:free` (force OpenRouter)
64
68
  - `--cli [provider]`
65
- - 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.
66
70
  - `--model auto`
67
71
  - See `docs/model-auto.md`
68
72
  - `--model <preset>`
@@ -92,6 +96,13 @@ installed, auto mode can use local CLI models via `cli.enabled` or implicit auto
92
96
  - If omitted, no max token parameter is sent (provider default).
93
97
  - Minimum numeric value: 16.
94
98
  - Recommendation: prefer `--length` unless you need a hard cap (some providers count “reasoning” into the cap).
99
+ - `--thinking none|low|medium|high|xhigh`
100
+ - Sets OpenAI reasoning effort for `openai/...` GPT-5-family models.
101
+ - Short aliases: `off`, `min` (low), `mid` / `med`, `x-high`, `extra-high`.
102
+ - `--fast`
103
+ - Shorthand for `--service-tier fast` on OpenAI models.
104
+ - `--service-tier default|fast|priority|flex`
105
+ - OpenAI service tier override. `fast` is the summarize-facing alias for OpenAI `priority`; `default` sends no service tier.
95
106
  - `--retries <count>`
96
107
  - LLM retry attempts on timeout (default: 1).
97
108
  - `--json` (includes prompt + summary in one JSON object)
@@ -134,4 +145,5 @@ Use `--model github-copilot/<model>` for explicit GitHub-hosted model calls.
134
145
 
135
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.
136
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.
137
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."
@@ -1,4 +1,6 @@
1
1
  ---
2
+ title: "Provider resolution"
3
+ kicker: "models"
2
4
  summary: "Map of model auto-selection, provider capabilities, and LLM execution paths."
3
5
  read_when:
4
6
  - "When changing auto model order or CLI fallback behavior."
@@ -1,4 +1,6 @@
1
1
  ---
2
+ title: "ONNX transcription"
3
+ kicker: "internals"
2
4
  summary: "Local Parakeet/Canary ONNX transcription via external CLI."
3
5
  read_when:
4
6
  - "When configuring or changing local ONNX transcription (parakeet/canary)."
package/docs/openai.md CHANGED
@@ -1,4 +1,6 @@
1
1
  ---
2
+ title: "OpenAI"
3
+ kicker: "models"
2
4
  summary: "OpenAI model usage and flags."
3
5
  read_when:
4
6
  - "When changing OpenAI integration."
@@ -10,7 +12,18 @@ Use OpenAI directly by choosing an `openai/...` model id.
10
12
 
11
13
  For the full model/provider matrix, see `docs/llm.md`.
12
14
 
13
- Note: GPT Fast mode is a Codex fast-tier preset, not an `openai/...` model id. Use `--model gpt-fast` to run it through Codex CLI.
15
+ Fast mode is a service tier, not a model id. Prefer flags:
16
+
17
+ ```sh
18
+ summarize URL --model openai/gpt-5.5 --fast --thinking medium
19
+ summarize URL --model openai/gpt-5.4 --service-tier fast --thinking low
20
+ ```
21
+
22
+ Compatibility aliases:
23
+
24
+ - `--model gpt-fast` / `--model fast`: `openai/gpt-5.5` with fast service tier and medium thinking.
25
+ - `--model openai/gpt-5.5-fast` or `--model openai/gpt-5.4-mini-fast`: strip the `-fast` suffix for the API model id and use fast service tier.
26
+ - `--model codex-fast`: explicit Codex CLI fast preset.
14
27
 
15
28
  ## Env
16
29
 
@@ -20,12 +33,30 @@ Note: GPT Fast mode is a Codex fast-tier preset, not an `openai/...` model id. U
20
33
  ## Flags
21
34
 
22
35
  - `--model openai/<model>`
36
+ - `--fast`
37
+ - `--service-tier default|fast|priority|flex`
38
+ - `--thinking none|low|medium|high|xhigh`
23
39
  - `--length short|medium|long|xl|xxl|<chars>`
24
40
  - This is _soft guidance_ to the model (no hard truncation).
25
41
  - `--max-output-tokens <count>`
26
42
  - Hard cap for output tokens (optional).
27
43
  - `--json` (includes prompt + summary in one JSON object)
28
44
 
45
+ ## Config
46
+
47
+ ```json
48
+ {
49
+ "openai": {
50
+ "serviceTier": "fast",
51
+ "thinking": "medium"
52
+ }
53
+ }
54
+ ```
55
+
56
+ `openai.reasoningEffort` is the long-form alias for `openai.thinking`. Model presets can also set `serviceTier`, `thinking` / `reasoningEffort`, and `textVerbosity`.
57
+
58
+ Use `"serviceTier": "fast"` in summarize config and model presets. OpenAI API requests map that to `service_tier="priority"`; `"flex"` and explicit `"priority"` pass through as-is. Use `--service-tier default` to clear a configured tier for one run.
59
+
29
60
  ## PDF inputs
30
61
 
31
62
  - When a PDF is provided and `--preprocess auto` is used, summarize sends the PDF as a file input via the OpenAI Responses API.
@@ -0,0 +1,114 @@
1
+ ---
2
+ title: Quickstart
3
+ kicker: get started
4
+ summary: "Five-minute path from install to first summary."
5
+ ---
6
+
7
+ # Quickstart
8
+
9
+ You should already have `summarize` installed — if not, see [Install](install.md). This page goes from zero to a working summary in five minutes.
10
+
11
+ ## 1. Set one provider key
12
+
13
+ `summarize --model auto` works as soon as one provider key is exported. Pick whichever you have:
14
+
15
+ ```bash
16
+ export OPENAI_API_KEY=sk-...
17
+ # or
18
+ export GEMINI_API_KEY=...
19
+ # or — free models via OpenRouter
20
+ export OPENROUTER_API_KEY=...
21
+ summarize refresh-free # picks working :free models
22
+ ```
23
+
24
+ The full provider list is in [LLM overview](llm.md). To skip provider selection entirely, point at a CLI provider you already have logged in:
25
+
26
+ ```bash
27
+ summarize "https://example.com" --cli claude
28
+ summarize "https://example.com" --cli codex
29
+ ```
30
+
31
+ ## 2. Your first summary
32
+
33
+ ```bash
34
+ summarize "https://en.wikipedia.org/wiki/Llama"
35
+ ```
36
+
37
+ You'll see streaming Markdown in the terminal. The default length is `xl` (~10k chars); use `--length` to change it:
38
+
39
+ ```bash
40
+ summarize "https://example.com/long-article" --length short
41
+ summarize "https://example.com/long-article" --length 3k
42
+ summarize "https://example.com/long-article" --length 30000
43
+ ```
44
+
45
+ ## 3. YouTube and podcasts
46
+
47
+ ```bash
48
+ summarize "https://youtu.be/I845O57ZSy4"
49
+ summarize "https://podcasts.apple.com/.../episode-..."
50
+ ```
51
+
52
+ YouTube prefers official caption tracks, falls back through `youtubei` and Apify, and finally pulls audio with `yt-dlp` and transcribes with Whisper. Podcasts behave the same way: published transcript first, then `ffmpeg` + Whisper.
53
+
54
+ Add scene-change keyframes for video:
55
+
56
+ ```bash
57
+ summarize "https://youtu.be/..." --slides
58
+ summarize "https://youtu.be/..." --slides --slides-ocr
59
+ ```
60
+
61
+ ## 4. Files and stdin
62
+
63
+ ```bash
64
+ summarize ./report.pdf
65
+ summarize ./meeting.m4a
66
+ summarize ./diagram.png
67
+ pbpaste | summarize -
68
+ ```
69
+
70
+ PDFs and images go through `markitdown` (or the Gemini/OpenAI vision path when configured). Audio + video files take the transcription path.
71
+
72
+ ## 5. Extract without the LLM
73
+
74
+ When you only want clean text — for piping into another tool or saving to a file — use `--extract`:
75
+
76
+ ```bash
77
+ summarize "https://example.com" --extract --format md > article.md
78
+ summarize "https://youtu.be/..." --extract --format md --markdown-mode llm
79
+ ```
80
+
81
+ `--format md --markdown-mode llm` runs the model just enough to format the raw transcript into headings and paragraphs.
82
+
83
+ ## 6. JSON for scripts
84
+
85
+ ```bash
86
+ summarize "https://example.com" --json --metrics detailed
87
+ ```
88
+
89
+ Returns a stable envelope with `summary`, `prompt`, `metrics`, and source metadata on stdout. Progress, prompts, and warnings always go to stderr.
90
+
91
+ ## 7. Save defaults
92
+
93
+ Most flags have a config-file equivalent. Stash your preferences in `~/.summarize/config.json`:
94
+
95
+ ```json
96
+ {
97
+ "model": "auto",
98
+ "output": {
99
+ "length": "long",
100
+ "language": "en"
101
+ },
102
+ "youtube": "auto",
103
+ "firecrawl": "auto"
104
+ }
105
+ ```
106
+
107
+ Now `summarize "https://example.com"` runs with those defaults; flags still override on the CLI. Full schema: [Config](config.md).
108
+
109
+ ## What's next
110
+
111
+ - Browse every flag in [Commands → summarize](commands/summarize.md).
112
+ - Wire up a model: [LLM overview](llm.md), [Auto selection](model-auto.md), [OpenAI](openai.md).
113
+ - Stuck site? [Website mode](website.md), [Firecrawl](firecrawl.md).
114
+ - Pair with the browser: [Chrome extension](chrome-extension.md).
package/docs/releasing.md CHANGED
@@ -1,4 +1,6 @@
1
1
  ---
2
+ title: "Releasing"
3
+ kicker: "project"
2
4
  summary: "Release checklist + Homebrew/core verify step."
3
5
  ---
4
6
 
@@ -1,4 +1,6 @@
1
1
  ---
2
+ title: "Slides rendering flow"
3
+ kicker: "internals"
2
4
  summary: "Map of slide extraction terminal output and extension streaming flow."
3
5
  read_when:
4
6
  - "When changing slide terminal output, streaming, or sidepanel state."
package/docs/slides.md CHANGED
@@ -1,4 +1,6 @@
1
1
  ---
2
+ title: "Slides"
3
+ kicker: "modes"
2
4
  summary: "Plan for slide-first UX without model usage."
3
5
  read_when:
4
6
  - "When changing slide summaries, slide UI, or slide/seek behavior in the side panel."
package/docs/smoketest.md CHANGED
@@ -1,4 +1,6 @@
1
1
  ---
2
+ title: "Smoke test"
3
+ kicker: "project"
2
4
  summary: "20-case smoke test plan for inputs and models."
3
5
  read_when:
4
6
  - "When running smoke tests."
@@ -16,40 +18,40 @@ Goal: exercise URL + file inputs, extraction + LLM summary paths, multiple model
16
18
  ## Models (cheap/fast)
17
19
 
18
20
  - `openai/gpt-5-mini`
19
- - `google/gemini-3-flash`
21
+ - `google/gemini-3-flash-preview`
20
22
 
21
23
  ## Matrix (20 cases)
22
24
 
23
25
  ### Websites (LLM summary, 10)
24
26
 
25
- 1. Static HTML: `https://example.com` (model: gemini-3-flash)
27
+ 1. Static HTML: `https://example.com` (model: gemini-3-flash-preview)
26
28
  2. Wikipedia article: `https://en.wikipedia.org/wiki/Swift_(programming_language)` (model: gpt-5-mini)
27
- 3. MDN doc: `https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/200` (model: gemini-3-flash)
29
+ 3. MDN doc: `https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/200` (model: gemini-3-flash-preview)
28
30
  4. Reuters article: `https://www.reuters.com/world/` (model: gpt-5-mini)
29
- 5. BBC article: `https://www.bbc.com/news` (model: gemini-3-flash)
31
+ 5. BBC article: `https://www.bbc.com/news` (model: gemini-3-flash-preview)
30
32
  6. GitHub README: `https://github.com/vitejs/vite` (model: gpt-5-mini)
31
- 7. Substack post: pick any public post (model: gemini-3-flash)
33
+ 7. Substack post: pick any public post (model: gemini-3-flash-preview)
32
34
  8. Medium post: pick any public post (model: gpt-5-mini)
33
- 9. JS-heavy page: `https://vercel.com` (model: gemini-3-flash)
35
+ 9. JS-heavy page: `https://vercel.com` (model: gemini-3-flash-preview)
34
36
  10. 404 page: `https://example.com/does-not-exist` (model: gpt-5-mini)
35
37
 
36
38
  ### YouTube (LLM summary, 2)
37
39
 
38
- 11. Captions available: pick a popular talk/interview (model: gemini-3-flash, `--youtube auto`)
40
+ 11. Captions available: pick a popular talk/interview (model: gemini-3-flash-preview, `--youtube auto`)
39
41
  12. No captions: pick a random channel upload w/o captions (model: gpt-5-mini, `--youtube auto`)
40
42
 
41
43
  ### Remote files (LLM summary, 4)
42
44
 
43
- 13. PDF URL: any public PDF report (model: gemini-3-flash)
45
+ 13. PDF URL: any public PDF report (model: gemini-3-flash-preview)
44
46
  14. PNG URL: `https://upload.wikimedia.org/wikipedia/commons/7/70/Example.png` (model: gpt-5-mini)
45
- 15. MP3 URL: any public MP3 sample (model: gemini-3-flash)
47
+ 15. MP3 URL: any public MP3 sample (model: gemini-3-flash-preview)
46
48
  16. CSV URL: any public CSV sample (model: gpt-5-mini)
47
49
 
48
50
  ### Local files (LLM summary, 4)
49
51
 
50
- 17. `tests/fixtures/sample.txt` (create if missing) (model: gemini-3-flash)
52
+ 17. `tests/fixtures/sample.txt` (create if missing) (model: gemini-3-flash-preview)
51
53
  18. `tests/fixtures/sample.md` (create if missing) (model: gpt-5-mini)
52
- 19. `tests/fixtures/sample.json` (create if missing) (model: gemini-3-flash)
54
+ 19. `tests/fixtures/sample.json` (create if missing) (model: gemini-3-flash-preview)
53
55
  20. `tests/fixtures/sample.png` (create if missing; use a real PNG, not 1x1) (model: gpt-5-mini)
54
56
 
55
57
  ## Commands (template)
@@ -1,4 +1,6 @@
1
1
  ---
2
+ title: "Timestamps"
3
+ kicker: "modes"
2
4
  summary: "Transcript timestamps plan + clickable chat jumps."
3
5
  read_when:
4
6
  - "When planning transcript timestamps or click-to-seek UX."
@@ -1,4 +1,6 @@
1
1
  ---
2
+ title: "Transcript flow"
3
+ kicker: "internals"
2
4
  summary: "Map of transcript provider selection and transcription fallback flow."
3
5
  read_when:
4
6
  - "When changing podcast, YouTube, or generic transcript provider order."
package/docs/website.md CHANGED
@@ -1,4 +1,6 @@
1
1
  ---
2
+ title: "Website"
3
+ kicker: "modes"
2
4
  summary: "Website extraction pipeline, flags, and fallbacks."
3
5
  read_when:
4
6
  - "When changing website extraction behavior."
package/docs/youtube.md CHANGED
@@ -1,4 +1,6 @@
1
1
  ---
2
+ title: "YouTube"
3
+ kicker: "modes"
2
4
  summary: "YouTube transcript extraction modes and fallbacks."
3
5
  read_when:
4
6
  - "When changing YouTube handling."
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steipete/summarize",
3
- "version": "0.14.0",
3
+ "version": "0.15.0",
4
4
  "description": "Link → clean text → summary.",
5
5
  "bin": {
6
6
  "summarize": "./dist/cli.js",
@@ -31,52 +31,23 @@
31
31
  "import": "./dist/esm/prompts/index.js"
32
32
  }
33
33
  },
34
- "dependencies": {
35
- "@mariozechner/pi-ai": "^0.70.2",
36
- "commander": "^14.0.3",
37
- "file-type": "^22.0.1",
38
- "gpt-tokenizer": "^3.4.0",
39
- "json5": "^2.2.3",
40
- "markdansi": "^0.2.1",
41
- "mime": "^4.1.0",
42
- "ora": "^9.4.0",
43
- "osc-progress": "^0.3.0",
44
- "tokentally": "^0.1.1",
45
- "tslog": "^4.10.2",
46
- "@steipete/summarize-core": "0.14.0"
47
- },
48
- "devDependencies": {
49
- "@fal-ai/client": "^1.10.0",
50
- "@types/jsdom": "^28.0.1",
51
- "@types/node": "^25.6.0",
52
- "@types/sanitize-html": "^2.16.1",
53
- "@vitest/coverage-v8": "^4.1.5",
54
- "esbuild": "^0.28.0",
55
- "oxfmt": "0.46.0",
56
- "oxlint": "^1.61.0",
57
- "oxlint-tsgolint": "^0.22.0",
58
- "rimraf": "^6.1.3",
59
- "tsx": "^4.21.0",
60
- "typescript": "^6.0.3",
61
- "vitest": "^4.1.5"
62
- },
63
- "engines": {
64
- "node": ">=22"
65
- },
66
34
  "scripts": {
67
35
  "build": "pnpm clean && pnpm -C packages/core build && pnpm build:lib && pnpm build:cli",
68
36
  "build:bun": "bun scripts/build-bun.js",
69
37
  "build:bun:test": "bun scripts/build-bun.js --test",
70
38
  "build:cli": "node scripts/build-cli.mjs",
71
- "build:lib": "tsc -p tsconfig.build.json",
72
- "check": "pnpm format:check && pnpm lint && pnpm test:coverage",
39
+ "build:lib": "tsgo -p tsconfig.build.json",
40
+ "check": "pnpm format:check && pnpm lint && pnpm typecheck && pnpm test:coverage",
73
41
  "clean": "rimraf dist packages/core/dist",
74
42
  "dev:cli": "pnpm -C packages/core build && tsx src/cli.ts",
43
+ "docs:build": "node scripts/build-docs-site.mjs",
75
44
  "docs:list": "tsx scripts/docs-list.ts",
45
+ "docs:serve": "bash scripts/docs-serve.sh",
76
46
  "format": "oxfmt --write",
77
47
  "format:check": "oxfmt --check",
78
48
  "lint": "oxlint --type-aware --tsconfig tsconfig.build.json --config .oxlintrc.json .",
79
49
  "lint:fix": "oxlint --type-aware --tsconfig tsconfig.build.json --config .oxlintrc.json --fix . && pnpm format",
50
+ "prepare": "pnpm build",
80
51
  "release": "bash scripts/release.sh",
81
52
  "s": "tsx src/cli.ts",
82
53
  "summarize": "tsx src/cli.ts",
@@ -84,6 +55,49 @@
84
55
  "test:coverage": "vitest run --coverage",
85
56
  "test:coverage:build": "pnpm build && pnpm test:coverage",
86
57
  "test:extension-e2e": "pnpm -C apps/chrome-extension test:e2e",
87
- "typecheck": "tsc -p tsconfig.build.json --noEmit"
58
+ "typecheck": "pnpm -C packages/core typecheck && tsgo -p tsconfig.build.json --noEmit"
59
+ },
60
+ "dependencies": {
61
+ "@earendil-works/pi-ai": "^0.74.0",
62
+ "@steipete/summarize-core": "workspace:*",
63
+ "commander": "^14.0.3",
64
+ "file-type": "^22.0.1",
65
+ "gpt-tokenizer": "^3.4.0",
66
+ "json5": "^2.2.3",
67
+ "markdansi": "^0.2.1",
68
+ "mime": "^4.1.0",
69
+ "ora": "^9.4.0",
70
+ "osc-progress": "^0.3.0",
71
+ "tokentally": "^0.1.1",
72
+ "tslog": "^4.10.2"
73
+ },
74
+ "devDependencies": {
75
+ "@fal-ai/client": "^1.10.1",
76
+ "@types/jsdom": "^28.0.3",
77
+ "@types/node": "^24.12.4",
78
+ "@types/sanitize-html": "^2.16.1",
79
+ "@typescript/native-preview": "7.0.0-dev.20260515.1",
80
+ "@vitest/coverage-v8": "^4.1.6",
81
+ "esbuild": "^0.28.0",
82
+ "oxfmt": "0.49.0",
83
+ "oxlint": "^1.64.0",
84
+ "oxlint-tsgolint": "^0.22.1",
85
+ "rimraf": "^6.1.3",
86
+ "tsx": "^4.22.0",
87
+ "typescript": "^6.0.3",
88
+ "vitest": "^4.1.6"
89
+ },
90
+ "engines": {
91
+ "node": ">=24"
92
+ },
93
+ "packageManager": "pnpm@10.33.2",
94
+ "pnpm": {
95
+ "overrides": {
96
+ "uuid": "14.0.0",
97
+ "vite": "8.0.10"
98
+ },
99
+ "patchedDependencies": {
100
+ "@zag-js/preact@1.40.0": "patches/@zag-js__preact@1.40.0.patch"
101
+ }
88
102
  }
89
- }
103
+ }
package/docs/_config.yml DELETED
@@ -1,27 +0,0 @@
1
- title: "summarize"
2
- description: "Summarize docs"
3
- baseurl: ""
4
- markdown: kramdown
5
- highlighter: rouge
6
-
7
- plugins:
8
- - jekyll-relative-links
9
-
10
- relative_links:
11
- enabled: true
12
- collections: true
13
-
14
- exclude:
15
- - site
16
-
17
- defaults:
18
- - scope:
19
- path: ""
20
- values:
21
- layout: default
22
- permalink: /docs/:basename:output_ext
23
-
24
- kramdown:
25
- input: GFM
26
- hard_wrap: false
27
- syntax_highlighter: rouge