@steipete/summarize 0.14.1 → 0.15.1

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 +39 -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 +19 -16
  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
@@ -1,4 +1,6 @@
1
1
  ---
2
+ title: "Chrome extension"
3
+ kicker: "apps"
2
4
  summary: "Chrome side panel extension + daemon architecture, setup, and troubleshooting."
3
5
  read_when:
4
6
  - "When working on the extension, daemon, or side panel UX."
package/docs/cli.md CHANGED
@@ -1,12 +1,14 @@
1
1
  ---
2
- summary: "CLI model providers and config for Claude, Codex, Gemini, Cursor Agent, OpenClaw, and OpenCode."
2
+ title: "CLI providers"
3
+ kicker: "models"
4
+ summary: "CLI model providers and config for Claude, Codex, Gemini, Cursor Agent, OpenClaw, OpenCode, and GitHub Copilot."
3
5
  read_when:
4
6
  - "When changing CLI model integration."
5
7
  ---
6
8
 
7
9
  # CLI models
8
10
 
9
- Summarize can use installed CLIs (Claude, Codex, Gemini, Cursor Agent, OpenClaw, OpenCode) as local model backends.
11
+ Summarize can use installed CLIs (Claude, Codex, Gemini, Cursor Agent, OpenClaw, OpenCode, GitHub Copilot) as local model backends.
10
12
 
11
13
  ## Model ids
12
14
 
@@ -18,6 +20,8 @@ Summarize can use installed CLIs (Claude, Codex, Gemini, Cursor Agent, OpenClaw,
18
20
  - `openclaw/<model>` (alias for the same OpenClaw CLI path)
19
21
  - `cli/opencode/<model>` (e.g. `cli/opencode/openai/gpt-5.4`)
20
22
  - `cli/opencode` (use the OpenCode runtime default model)
23
+ - `cli/copilot/<model>` (e.g. `cli/copilot/gpt-5.2`)
24
+ - `cli/copilot` (use the Copilot CLI runtime default model)
21
25
 
22
26
  Use `--cli [provider]` (case-insensitive) for the provider default, or `--model cli/<provider>/<model>` to pin a model.
23
27
  If `--cli` is provided without a provider, auto selection is used with CLI enabled.
@@ -37,7 +41,7 @@ Auto mode can prepend CLI attempts in two ways:
37
41
  - Auto CLI fallback (`cli.autoFallback`, default enabled):
38
42
  - Applies only to **implicit** auto (when no model is set via flag/env/config).
39
43
  - Default behavior: only when no API key is configured.
40
- - Default order: `claude, gemini, codex, agent, openclaw, opencode`.
44
+ - Default order: `claude, gemini, codex, agent, openclaw, opencode, copilot`.
41
45
  - Remembers + prioritizes the last successful CLI provider (`~/.summarize/cli-state.json`).
42
46
 
43
47
  Gemini CLI performance: summarize sets `GEMINI_CLI_NO_RELAUNCH=true` for Gemini CLI runs to avoid a costly self-relaunch (can be overridden by setting it yourself).
@@ -58,7 +62,7 @@ Configure auto CLI fallback:
58
62
  "autoFallback": {
59
63
  "enabled": true,
60
64
  "onlyWhenNoApiKeys": true,
61
- "order": ["claude", "gemini", "codex", "agent", "openclaw", "opencode"]
65
+ "order": ["claude", "gemini", "codex", "agent", "openclaw", "opencode", "copilot"]
62
66
  }
63
67
  }
64
68
  }
@@ -82,6 +86,7 @@ Binary lookup:
82
86
  - `AGENT_PATH` (optional override)
83
87
  - `OPENCLAW_PATH` (optional override)
84
88
  - `OPENCODE_PATH` (optional override)
89
+ - `COPILOT_PATH` (optional override)
85
90
  - Otherwise uses `PATH`
86
91
 
87
92
  ## Attachments (images/files)
@@ -94,17 +99,18 @@ path-based prompt and enables the required tool flags:
94
99
  - Codex: `codex exec --output-last-message ...` and `-i <image>` for images
95
100
  - Agent: uses built-in file tools in `agent --print` mode (no extra flags)
96
101
  - OpenCode: `opencode run --format json ... --file <path>` when a file/image path is required
102
+ - Copilot: `copilot -p <prompt>`; passes `--model <model>` when one is configured
97
103
 
98
104
  ## Config
99
105
 
100
106
  ```json
101
107
  {
102
108
  "cli": {
103
- "enabled": ["claude", "gemini", "codex", "agent", "openclaw", "opencode"],
109
+ "enabled": ["claude", "gemini", "codex", "agent", "openclaw", "opencode", "copilot"],
104
110
  "autoFallback": {
105
111
  "enabled": true,
106
112
  "onlyWhenNoApiKeys": true,
107
- "order": ["claude", "gemini", "codex", "agent", "openclaw", "opencode"]
113
+ "order": ["claude", "gemini", "codex", "agent", "openclaw", "opencode", "copilot"]
108
114
  },
109
115
  "codex": { "model": "gpt-5.2" },
110
116
  "gemini": { "model": "flash", "extraArgs": ["--verbose"] },
@@ -123,6 +129,9 @@ path-based prompt and enables the required tool flags:
123
129
  },
124
130
  "opencode": {
125
131
  "binary": "/usr/local/bin/opencode"
132
+ },
133
+ "copilot": {
134
+ "binary": "/usr/local/bin/copilot"
126
135
  }
127
136
  }
128
137
  }
@@ -133,9 +142,11 @@ Notes:
133
142
  - CLI output is treated as text only (no token accounting).
134
143
  - If a CLI call fails, auto mode falls back to the next candidate.
135
144
  - Cursor Agent CLI uses the `agent` binary and relies on Cursor CLI auth (login or `CURSOR_API_KEY`).
145
+ - Codex CLI normal text summaries run isolated by default: `codex exec --ephemeral --ignore-user-config --ignore-rules -C <temp-dir> ...` with a sanitized temporary `CODEX_HOME` that carries auth only. Set `cli.codex.isolated` to `false` only when you intentionally need Codex to inherit local config/rules.
136
146
  - Gemini CLI is invoked in headless mode with `--prompt` for compatibility with current Gemini CLI releases.
137
147
  - OpenClaw uses `openclaw agent --agent <model> --message <prompt> --json` because current OpenClaw requires `-m/--message`; very large extracted inputs are rejected before launch to avoid argv limits.
138
148
  - OpenCode uses `opencode run --format json`, streams prompt text over stdin, and uses the runtime default model when none is configured.
149
+ - Copilot uses `copilot -p`, treats stdout as plain text, and uses the runtime default model when none is configured.
139
150
 
140
151
  ## Quick smoke test (all CLI providers)
141
152
 
@@ -150,6 +161,7 @@ summarize --cli gemini --plain --timeout 2m /tmp/summarize-cli-smoke.txt
150
161
  summarize --cli agent --plain --timeout 2m /tmp/summarize-cli-smoke.txt
151
162
  summarize --cli openclaw --plain --timeout 2m /tmp/summarize-cli-smoke.txt
152
163
  summarize --cli opencode --plain --timeout 2m /tmp/summarize-cli-smoke.txt
164
+ summarize --cli copilot --plain --timeout 2m /tmp/summarize-cli-smoke.txt
153
165
  ```
154
166
 
155
167
  If Agent fails with auth, run `agent login` (interactive) or set `CURSOR_API_KEY`.
@@ -0,0 +1,106 @@
1
+ ---
2
+ title: summarize daemon
3
+ permalink: /docs/commands/daemon.html
4
+ kicker: command
5
+ summary: "Manage the local HTTP daemon used by the Chrome Side Panel."
6
+ ---
7
+
8
+ # `summarize daemon`
9
+
10
+ ```text
11
+ summarize daemon <subcommand> [options]
12
+ ```
13
+
14
+ Manages the local HTTP daemon that the Chrome / Firefox Side Panel talks to. The daemon binds to `127.0.0.1` only and requires a shared bearer token. It autostarts via the right service manager for your platform.
15
+
16
+ | Platform | Service |
17
+ | -------- | --------------------- |
18
+ | macOS | LaunchAgent (launchd) |
19
+ | Linux | systemd user service |
20
+ | Windows | Scheduled Task |
21
+
22
+ If you only use the CLI, you don't need any of this.
23
+
24
+ ## Subcommands
25
+
26
+ ### `install`
27
+
28
+ Install or upgrade the autostart service and write `~/.summarize/daemon.json`.
29
+
30
+ ```bash
31
+ summarize daemon install --token <TOKEN>
32
+ summarize daemon install --token <TOKEN> --port 8787
33
+ summarize daemon install --token <TOKEN> --dev # repo dev mode
34
+ ```
35
+
36
+ `--token <token>` is **required** on first install; the extension prints one after pairing. Re-running `install` with a new token adds another paired browser instead of invalidating the old one.
37
+
38
+ ### `restart`
39
+
40
+ Restart the autostart service. Useful after upgrading summarize or editing `daemon.json`.
41
+
42
+ ```bash
43
+ summarize daemon restart
44
+ ```
45
+
46
+ ### `status`
47
+
48
+ Probe the autostart service and the running daemon's health endpoint.
49
+
50
+ ```bash
51
+ summarize daemon status
52
+ ```
53
+
54
+ ### `uninstall`
55
+
56
+ Unload the autostart service. On macOS the plist is moved to Trash so you can undo.
57
+
58
+ ```bash
59
+ summarize daemon uninstall
60
+ ```
61
+
62
+ ### `run`
63
+
64
+ Run the daemon in the foreground. The autostart entry uses this internally; use it directly inside containers, on systems without launchd/systemd, or while debugging.
65
+
66
+ ```bash
67
+ summarize daemon run --port 8787
68
+ ```
69
+
70
+ ## Options
71
+
72
+ `--port <n>`
73
+ : TCP port. Default `8787`. The Side Panel reads it from `~/.summarize/daemon.json`.
74
+
75
+ `--token <token>`
76
+ : Bearer token. Required for `install`. Stored in `~/.summarize/daemon.json` (mode `0600`).
77
+
78
+ `--dev`
79
+ : Install a service that runs `src/cli.ts` via `tsx` from the current repo. Useful while hacking on the daemon — don't ship it to users.
80
+
81
+ ## HTTP endpoints
82
+
83
+ The daemon is documented in detail in [Chrome extension](../chrome-extension.md) and [Agent / daemon](../agent.md). At a glance:
84
+
85
+ - `POST /summarize/execute` — start a run. Bearer-auth required. Streams progress + final summary.
86
+ - `GET /session/{id}/status` — poll an in-progress run.
87
+ - `GET /health` — health probe (used by `status`).
88
+
89
+ ## Files
90
+
91
+ `~/.summarize/daemon.json`
92
+ : Token, port, paired browser fingerprints. Mode `0600`.
93
+
94
+ `~/.summarize/daemon.log`
95
+ : Rolling log written by the autostart service.
96
+
97
+ ## Notes
98
+
99
+ - **Containers** — `install` starts the daemon for the current container session but does not register a Scheduled Task / unit. Run `summarize daemon run` from your entrypoint instead, and publish port `8787` so the host browser can reach it.
100
+ - **Token rotation** — running `install --token <NEW>` adds a new paired browser; old browsers keep working. Edit `daemon.json` by hand to revoke.
101
+ - **Multiple installs** — only one daemon per user. Reinstall to upgrade.
102
+
103
+ ## See also
104
+
105
+ - [Chrome extension](../chrome-extension.md) — pairing flow + Side Panel UI.
106
+ - [Agent / daemon](../agent.md) — automation surface.
@@ -0,0 +1,53 @@
1
+ ---
2
+ title: Commands
3
+ permalink: /docs/commands/
4
+ kicker: reference
5
+ summary: "Every summarize subcommand and flag, with examples."
6
+ ---
7
+
8
+ # Command reference
9
+
10
+ `summarize` is one binary with a handful of subcommands. The default subcommand is `summarize` itself — the one you use 99% of the time. The others wrap related tooling.
11
+
12
+ ## Subcommands
13
+
14
+ - [`summarize`](summarize.md) — main command. Takes a URL, file, or stdin and produces a summary or extracted content.
15
+ - [`summarize slides`](slides.md) — extract scene-change keyframes from a video URL into PNGs (and optional OCR text). Standalone version of the `--slides` flag.
16
+ - [`summarize transcriber`](transcriber.md) — set up local ONNX transcription (Parakeet, Canary). Prints the env vars you need.
17
+ - [`summarize daemon`](daemon.md) — manage the local HTTP daemon that the Chrome Side Panel talks to. Subcommands: `install`, `restart`, `status`, `uninstall`, `run`.
18
+ - [`summarize refresh-free`](refresh-free.md) — scan OpenRouter `:free` models, write working candidates to `~/.summarize/config.json`.
19
+
20
+ ## Output discipline
21
+
22
+ All subcommands keep the same output discipline — straight from gogcli's playbook so pipes and scripts stay parseable:
23
+
24
+ - **stdout:** the result. Plain text, Markdown, JSON, or files (slides only).
25
+ - **stderr:** progress, prompts, warnings, and errors.
26
+ - `--json` produces a stable envelope on stdout.
27
+ - `--no-color` strips ANSI; `--plain` skips ANSI/OSC rendering for Markdown.
28
+
29
+ ## Global behavior
30
+
31
+ These flags apply to almost every subcommand:
32
+
33
+ | Flag | Purpose |
34
+ | ----------------------------- | -------------------------------------------------------------- |
35
+ | `--json` | Stable JSON envelope on stdout. Disables streaming. |
36
+ | `--no-color` | Strip ANSI escapes from output. |
37
+ | `--theme <name>` | Pick a CLI theme (`SUMMARIZE_THEME` env var also works). |
38
+ | `--verbose` / `--debug` | Detailed progress on stderr. |
39
+ | `--metrics off\|on\|detailed` | Token + timing metrics line. Default `on`. |
40
+ | `--timeout <duration>` | Cap fetching + LLM calls. Accepts `30`, `30s`, `2m`, `5000ms`. |
41
+ | `-V`, `--version` | Print version and exit. |
42
+ | `--help` | Print rich help with examples. |
43
+
44
+ ## Exit codes
45
+
46
+ | Code | Meaning |
47
+ | ----- | ------------------------------------------------------ |
48
+ | `0` | Success. |
49
+ | `1` | Generic failure (extraction, model, network, parsing). |
50
+ | `2` | Usage error (bad flag, bad input). |
51
+ | `124` | Timeout. |
52
+
53
+ `summarize daemon` and `summarize transcriber` may surface platform-specific exit codes from the underlying service install (launchd, systemd, schtasks); check `--verbose` output for the raw error.
@@ -0,0 +1,83 @@
1
+ ---
2
+ title: summarize refresh-free
3
+ permalink: /docs/commands/refresh-free.html
4
+ kicker: command
5
+ summary: "Scan OpenRouter :free models and write working candidates to config."
6
+ ---
7
+
8
+ # `summarize refresh-free`
9
+
10
+ ```text
11
+ summarize refresh-free [--runs 2] [--smart 3] [--min-params 27b]
12
+ [--max-age-days 180] [--set-default] [--verbose]
13
+ ```
14
+
15
+ Probes [OpenRouter](https://openrouter.ai)'s catalog for `:free` models, runs them on a small benchmark, and writes the working ones to `models.free` in `~/.summarize/config.json`. Useful when you want to use `--model free` without picking a specific OpenRouter slug.
16
+
17
+ Needs `OPENROUTER_API_KEY` in the environment.
18
+
19
+ ## What it does
20
+
21
+ 1. Pulls the OpenRouter model catalog.
22
+ 2. Filters to models tagged `:free` that meet `--min-params` and `--max-age-days`.
23
+ 3. Runs each candidate `--runs` times against a sanity prompt; ranks by `--smart` heuristics (latency, completion length, refusal rate).
24
+ 4. Writes the survivors to `models.free` in `~/.summarize/config.json`.
25
+ 5. With `--set-default`, also sets top-level `model` to `free`.
26
+
27
+ After the run, `summarize "https://example.com" --model free` rotates through the saved list until one succeeds.
28
+
29
+ ## Flags
30
+
31
+ `--runs <n>`
32
+ : How many times to probe each candidate. Default `2`.
33
+
34
+ `--smart <n>`
35
+ : How many top candidates to keep. Default `3`.
36
+
37
+ `--min-params <size>`
38
+ : Minimum parameter count. Accepts `7b`, `27b`, `70b`, etc. Default `27b`.
39
+
40
+ `--max-age-days <n>`
41
+ : Reject models older than N days based on OpenRouter's metadata. Default `180`.
42
+
43
+ `--set-default`
44
+ : Also set `model: "free"` at the top level of `~/.summarize/config.json`.
45
+
46
+ `--verbose`
47
+ : Per-candidate progress, timings, and rejection reasons on stderr.
48
+
49
+ ## Examples
50
+
51
+ ```bash
52
+ # Quick refresh; keep the best 3 free models ≥27B, ≤180d old.
53
+ summarize refresh-free
54
+
55
+ # Looser filter — accept smaller / older models.
56
+ summarize refresh-free --min-params 7b --max-age-days 365
57
+
58
+ # Refresh and also set the default model.
59
+ summarize refresh-free --set-default
60
+
61
+ # Verbose ranking output for debugging.
62
+ summarize refresh-free --runs 3 --smart 5 --verbose
63
+ ```
64
+
65
+ ## Output
66
+
67
+ `~/.summarize/config.json` is updated in place. The relevant section ends up looking like:
68
+
69
+ ```json
70
+ {
71
+ "models": {
72
+ "free": ["openai/gpt-oss-120b:free", "z-ai/glm-4.6:free", "deepseek/deepseek-r1:free"]
73
+ }
74
+ }
75
+ ```
76
+
77
+ A short summary of survivors and rejected candidates is printed on stdout.
78
+
79
+ ## See also
80
+
81
+ - [LLM overview](../llm.md) — `--model` syntax, including `free`.
82
+ - [Auto selection](../model-auto.md) — how `auto` picks across providers.
83
+ - [Config](../config.md) — full schema for `~/.summarize/config.json`.
@@ -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.