@gnawbit/tabretake 0.4.1 → 0.5.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.
package/README.zh-CN.md CHANGED
@@ -18,6 +18,17 @@
18
18
 
19
19
  [项目页](https://gnawbit.github.io/tabretake/) · [观看演示](docs/hero.mp4) · [安装](#安装) · [工作原理](#工作原理) · [真实实测展台](#-真实开源项目实测展台-real-world-showcase) · [路线图](#路线图)
20
20
 
21
+ ### 📊 核心工程规格一览
22
+
23
+ | 维度 | 规格说明 |
24
+ |---|---|
25
+ | **运行环境与协议** | Node.js `>=20.9.0`,MIT 协议,100% 本地运行(无云端上传、无遥测收集) |
26
+ | **浏览器引擎** | Playwright Chromium,支持未执行 `setup` 时自动回退本机 **Chrome / Edge**(`--browser auto`) |
27
+ | **双输入模式** | (1) 交互式 `capture` / `init --auto` / 可编辑 JSON 步骤 · (2) 已有录屏(OBS/QuickTime)+ 可视化 `mark` 打点 |
28
+ | **输出产物** | `16:9` 1080p MP4、`README GIF`(约 400–900 KB)、`9:16` 竖屏 MP4/GIF、PNG 封面、`record.json`(支持 2x HiDPI `--scale 2`) |
29
+ | **内置品牌主题** | `midnight`(暗夜紫)、`daylight`(浅色极简)、`paper`(暖纸复古)、`slate`(石板翠绿) |
30
+ | **平台与智能体** | Windows、macOS、Linux · 支持 Claude Code、Codex、Cursor 及所有 [Agent Skills](https://agentskills.io) 客户端 |
31
+
21
32
  ### ⚡ 为什么选择 TabRetake?
22
33
 
23
34
  | 常见痛点 | 传统手动录屏与剪辑 | TabRetake 自动化工作流 |
@@ -30,14 +41,15 @@
30
41
  故事文件与代码一起保存,界面更新后即可重新生成演示。
31
42
  已有录屏也可配合时间标记渲染相同产物,无需浏览器自动化;详见[用已有录屏](#用已有录屏)。
32
43
 
33
- ### 🚀 30秒极速体验
44
+ ### 🚀 零等待极速体验(自动适配本机 Chrome/Edge)
34
45
 
35
46
  ```bash
36
- npm install --global @gnawbit/tabretake@0.4.1
37
- tabretake setup
38
- tabretake demo
47
+ npm install --global @gnawbit/tabretake@0.5.0
48
+ tabretake demo --preset daylight
39
49
  ```
40
50
 
51
+ > 电脑上装有 Chrome 或 Edge 即可直接开跑,无需等待下载额外浏览器。若需固定版本的独立 Chromium,可随时运行 `tabretake setup`。
52
+
41
53
  ### 🎯 真实开源项目实测展台 (Real-World Showcase)
42
54
 
43
55
  拒绝虚假的 AI 蓝紫色假模版。TabRetake 在具有复杂 DOM 与真实交互的前端项目中深度验证:
@@ -86,18 +98,16 @@ tabretake demo
86
98
  从 npm 安装 CLI。
87
99
 
88
100
  ```bash
89
- npm install --global @gnawbit/tabretake@0.4.1
90
- tabretake setup
101
+ npm install --global @gnawbit/tabretake@0.5.0
91
102
  tabretake demo
92
103
  ```
93
104
 
94
- 要求 Node 20.9+。可以在工作目录运行 `tabretake`,内置示例会将结果写入
95
- `./demo`。Linux 若缺少浏览器系统依赖,可用 `tabretake setup --with-deps`。
96
- ffmpeg/ffprobe 随依赖安装。
105
+ 要求 Node 20.9+。在工作目录运行 `tabretake`,内置示例会将结果写入 `./demo`。
106
+ 若未安装 Playwright Chromium,TabRetake 会自动回退调用本机已安装的 Chrome 或 Edge(`--browser auto`);
107
+ 需要固定版本浏览器时运行 `tabretake setup`(Linux 缺系统依赖时加 `--with-deps`)。ffmpeg/ffprobe 随依赖安装。
97
108
 
98
- 包名为 [`@gnawbit/tabretake`](https://www.npmjs.com/package/@gnawbit/tabretake),已在 npm 发布。
99
- `v0.3.3` 及更早版本的命令和 Skill 仍叫 `demo-reel`。
100
- 安装新版后,现有 JSON 故事可以直接用 `tabretake` 运行。
109
+ 包名为 [`@gnawbit/tabretake`](https://www.npmjs.com/package/@gnawbit/tabretake)。
110
+ 旧版本(`v0.4.0` 及更早 / `demo-reel`)兼容性说明见 [版本兼容性指南](docs/compatibility.md)。
101
111
 
102
112
  参与开发时,从源码安装:
103
113
 
@@ -105,7 +115,6 @@ ffmpeg/ffprobe 随依赖安装。
105
115
  git clone https://github.com/gnawbit/tabretake
106
116
  cd tabretake
107
117
  npm ci
108
- node bin/tabretake.mjs setup
109
118
  node bin/tabretake.mjs doctor
110
119
  ```
111
120
 
@@ -114,7 +123,7 @@ node bin/tabretake.mjs doctor
114
123
  CLI 环境就绪后,可安装 agent 工作流:
115
124
 
116
125
  ```bash
117
- npx skills@1.9.0 add "https://github.com/gnawbit/tabretake.git#v0.4.1" --skill tabretake
126
+ npx skills@1.9.0 add "https://github.com/gnawbit/tabretake.git#v0.5.0" --skill tabretake
118
127
  ```
119
128
 
120
129
  在目标项目中运行,可加 `--agent codex`、`--agent claude-code` 或 `--agent cursor`
@@ -124,7 +133,7 @@ npx skills@1.9.0 add "https://github.com/gnawbit/tabretake.git#v0.4.1" --skill t
124
133
  Claude Code 也可以通过插件安装(命令行版本需 2.1.292+):
125
134
 
126
135
  ```bash
127
- claude plugin install tabretake --marketplace "gnawbit/tabretake#v0.4.1"
136
+ claude plugin install tabretake --marketplace "gnawbit/tabretake#v0.5.0"
128
137
  ```
129
138
 
130
139
  两种工作流安装方式任选其一;插件仍需先安装上述 TabRetake 运行环境。
@@ -147,19 +156,17 @@ node bin/tabretake.mjs doctor
147
156
  # 2. 跑一遍内置 demo
148
157
  node bin/tabretake.mjs demo
149
158
 
150
- # 3. 录你自己的产品(支持 --auto 自动识别交互控件并生成步骤)
151
- tabretake init --url https://your-app.com --auto
152
- tabretake record --config demo.json
153
- tabretake render --config demo/record.json --vertical
159
+ # 3. 录你自己的产品(交互式点击捕获,或自动扫描后一条命令出片)
160
+ tabretake capture --url https://your-app.com --out demo.json --run --vertical --preset daylight
161
+ # 或先自动生成可编辑故事,再一键录制渲染(--scale 2 开启 2x 高清放大):
162
+ tabretake init --url https://your-app.com --auto --preset daylight
163
+ tabretake run --config demo.json --vertical --scale 2
154
164
  ```
155
165
 
156
- `init --auto` 会自动扫描目标网页,识别可见的输入框与按钮,直接生成一段包含输入、点击和字幕的多步骤演示故事。
157
- 若不加 `--auto` 则生成初始占位模板。也可用 `tabretake plan --url <url>` 查看完整的 DOM 控件清单。
158
- 可用 `--out stories/demo.json` 指定其他保存路径。不会覆盖已有故事文件。
159
-
160
- v0.3.3 起,`label` 来自 ARIA 引用或 HTML 标签;原生下拉框的 `options`
161
- 包含 `label`、`value` 和 `disabled`,方便识别控件与选项。`name` 仍是 HTML 属性,
162
- `selector` 是建议使用的 CSS 定位器。这是 DOM 清单,不是完整的无障碍树。
166
+ `capture` 会打开真实浏览器窗口,让你像平时一样点击、输入、选下拉框、快捷键标 `focus`(密码框自动脱敏不落盘),结束即生成可编辑的 `demo.json`,加上 `--run` 还可直接出片。
167
+ `init --auto` 会自动扫描目标网页,跳过空导航链接与危险按钮,优先主区域表单和主操作按钮生成多步骤故事。
168
+ `run` 将校验、录制与渲染合并为一条命令(同样支持直接传入 `marks` 或 `record.json`)。你也可以继续分别调用 `record` 和 `render`,或用 `tabretake plan --url <url>` 查看完整 DOM 控件清单(含 ARIA/HTML `label` 与原生 `<select>` `options`)。
169
+ `name` 仍是 HTML 属性,`selector` 是建议使用的 CSS 定位器。这是 DOM 清单,不是完整的无障碍树。
163
170
 
164
171
  ```bash
165
172
  node bin/tabretake.mjs record --config demo.json
@@ -235,20 +242,14 @@ demo/
235
242
  }
236
243
  ```
237
244
 
238
- 动作:`wait`、`goto`、`click`、`type`、`hover`、`focus`、`drag`、`scroll`、`press`、`waitFor`、`screenshot`。
245
+ 动作:`wait`、`goto`、`click`、`type`、`select`、`hover`、`focus`、`drag`、`scroll`、`press`、`waitFor`、`screenshot`。
239
246
 
240
- v0.3.3 起,`click` 会等待目标启用且不被遮挡。步骤 `timeout`
241
- 使用毫秒,默认 20,000;持续阻挡会返回 `STEP_TIMEOUT`。v0.3.2 及更早版本
242
- 没有这项可靠的可点击等待。
247
+ `click` 会等待目标启用且不被遮挡(步骤 `timeout` 使用毫秒,默认 20,000;持续阻挡会返回 `STEP_TIMEOUT`)。
243
248
 
244
249
  定位字段为 `selector`、`role` + `name`(或 `text`)、`name` 或 `text`。
245
- 显式 `selector` 优先。从 v0.4.0 起,先精确匹配按钮与链接,再部分匹配
246
- 按钮与链接,最后尝试普通文字(先精确后部分)。指定 `role` 时只在该角色中匹配,
247
- 名称同样先精确后部分。
248
- 每个候选取首个可见元素。标签重复或重叠时,使用限定范围的 CSS 选择器。
249
- v0.3.3 及更早版本可能让部分匹配的按钮先于精确匹配的链接:页面同时有
250
- “Clear completed” 按钮时,用 `selector: "a[href='#/completed']"`
251
- 代替单独的 `text: "Completed"`。
250
+ 显式 `selector` 优先。匹配顺序为:精确按钮/链接 $\to$ 部分匹配按钮/链接 $\to$ 普通文字(先精确后部分)。
251
+ 指定 `role` 时只在该角色中匹配,名称同样先精确后部分;每个候选取首个可见元素。标签重复或重叠时,建议使用限定范围的 CSS 选择器。
252
+ 历史版本匹配差异见[版本兼容性指南](docs/compatibility.md)。
252
253
 
253
254
  技巧:
254
255
 
@@ -274,11 +275,14 @@ v0.3.3 及更早版本可能让部分匹配的按钮先于精确匹配的链接
274
275
  `render --config demo/record.json --poster-at 4.5` 覆盖,无需重新录制。
275
276
  时间从裁剪后成片的第 0 秒开始,必须小于视频时长。
276
277
 
277
- ### 竖屏品牌配置
278
+ ### 主题预设与竖屏品牌配置
278
279
 
279
- 9:16 可以带自定义钩子和 CTA:
280
+ 支持在配置中选择内置主题 `brand.preset`(`midnight`、`daylight`、`paper`、`slate`),或在渲染时通过 `--preset <name>` 一键切换皮肤。点击波纹颜色会自动跟随主题 `accent`;`brand.frame` 支持 `"auto"`(默认)、`"browser"`、`"phone"`(轻量竖屏手机边框)或 `"none"`。显式指定的 `brand.background` / `brand.accent` 会覆盖预设颜色(除非传入命令行 `--preset`)。传入 `"scale": 2` 或 `--scale 2` 可开启 2x HiDPI 录制,放大局部时更清晰。
280
281
 
281
282
  ```json
283
+ "brand": {
284
+ "preset": "daylight"
285
+ },
282
286
  "vertical": {
283
287
  "badge": "你的产品",
284
288
  "titleLines": ["一句话钩子", "第二行补充"],
@@ -291,15 +295,10 @@ v0.3.3 及更早版本可能让部分匹配的按钮先于精确匹配的链接
291
295
  `titleLines` 最多两行;`watermark: false` 会去掉底部的小 TabRetake 水印。
292
296
  中文会自动用 CJK 字体。
293
297
 
294
- v0.3.2 起,竖屏卡片按源视频比例适配。移动端流程可先用
295
- `plan --viewport 390x844` 检查布局,再用相同 viewport 录制。
296
- 渲染时加 `--vertical --zoom 1` 保留完整视口;更大的缩放会围绕焦点裁切。
297
- 宽屏桌面录屏中的细字仍可能偏小。
298
-
299
- 从 v0.4.1 起,横屏输出会按源视频比例自适应,并在录屏下方留出字幕区。
300
- 使用 `--vertical --zoom 1 --vertical-zoom 1.8` 可保持横屏全景,单独放大竖屏焦点。
301
- 故事中的 `vertical.zoom` 可保存竖屏倍率,命令行参数优先;`zoom: false` 的步骤
302
- 仍显示全景。放大后需检查是否裁掉必要上下文。
298
+ 横屏(16:9)与竖屏(9:16)均会按源视频比例自适应留白,并在画面下方留出专用字幕区。
299
+ 移动端流程可先用 `plan --viewport 390x844` 检查布局,再用相同 viewport 录制。
300
+ 使用 `--vertical --zoom 1 --vertical-zoom 1.8` 可保持横屏全景,单独放大竖屏焦点;
301
+ 故事中的 `vertical.zoom` 可保存竖屏倍率,命令行参数优先;`zoom: false` 的步骤仍显示全景。放大后需检查是否裁掉必要上下文。
303
302
 
304
303
  首次在自己的项目试用后,可[反馈首次演示结果](https://github.com/gnawbit/tabretake/issues/new?template=first-demo.yml),
305
304
  失败同样有用。[试用与记录说明](docs/adoption.md)区分首次成功、重复使用和外部采用。
@@ -312,14 +311,17 @@ v0.3.2 起,竖屏卡片按源视频比例适配。移动端流程可先用
312
311
  | `tabretake capabilities --json` | 查询支持的命令、参数及 JSON 输出 |
313
312
  | `tabretake doctor [--json]` | 检查 Node、Chromium、ffmpeg、字体 |
314
313
  | `tabretake setup` | 安装与当前 CLI 匹配的 Chromium |
315
- | `tabretake init --url <url> [--auto]` | 创建可编辑的故事文件(加 `--auto` 自动扫描并生成交互步骤) |
314
+ | `tabretake init --url <url> [--auto] [--preset <name>]` | 创建可编辑的故事文件(`--auto` 自动生成步骤,`--preset` 设置主题) |
315
+ | `tabretake capture --url <url> [--out demo.json] [--run]` | 打开浏览器亲自点一遍流程,自动生成可编辑 `story.json` |
316
316
  | `tabretake validate --config demo.json [--json]` | 预检故事、录屏标记或录制时间线 |
317
317
  | `tabretake plan --url <url>` | 截图 + 列出可交互元素 |
318
318
  | `tabretake record --config demo.json` | 录制故事 |
319
319
  | `tabretake preview --config demo.json` | 在可见浏览器中执行步骤,提前检查故事 |
320
- | `tabretake render --config demo/record.json` | 渲染 MP4 + GIF |
320
+ | `tabretake render --config demo/record.json [--preset <name>]` | 渲染 MP4 + GIF |
321
+ | `tabretake run --config demo.json [--vertical] [--scale 2]` | 一条命令完成校验、录制与渲染出片 |
322
+ | `tabretake mark --video recording.mp4 [--out story-video.json]` | 打开本地可视化打点器,点击视频画面自动生成 `marks` |
321
323
  | `tabretake serve` | 启动内置 demo 站点 |
322
- | `tabretake demo` | 录制 + 渲染内置 demo |
324
+ | `tabretake demo [--preset <name>]` | 录制 + 渲染内置 demo |
323
325
 
324
326
  ### 🏷️ 徽标接入 (Project Badge)
325
327
 
@@ -332,47 +334,30 @@ v0.3.2 起,竖屏卡片按源视频比例适配。移动端流程可先用
332
334
  Agent 可用 `capabilities --json` 和 `doctor --json` 获取标准输出上的单个 JSON
333
335
  对象,包含 `schemaVersion: 1` 和已安装版本。诊断包含稳定的 `id`、`required`、
334
336
  `status`,失败时提供修复提示 `hint`。必需检查失败返回退出码 `1`;缺少字体仅警告,
335
- 必需项通过时退出码仍为 `0`。Chromium 仅检查是否安装,不实际启动。
336
- JSON 工作流及配置校验需要 v0.3.0 或更新版本。
337
+ 必需项通过时退出码仍为 `0`。浏览器仅检查是否存在,不实际启动。
337
338
 
338
- `doctor` 检查整个工具链。渲染现有录屏或已保存的时间线不需要 Chromium;
339
+ `doctor` 检查整个工具链。渲染现有录屏或已保存的时间线不需要浏览器;
339
340
  若唯一失败的必需项是 `chromium`,可跳过浏览器安装,继续 `validate` 和
340
- `render`,其他必需项错误仍需先修复。网页规划和录制仍需要 Chromium。
341
+ `render`,其他必需项错误仍需先修复。网页规划和录制使用固定 Chromium 或本机 Chrome/Edge。
341
342
 
342
343
  录制前运行 `validate --config demo.json --json`,按随包提供的
343
- [JSON Schema](schemas/story.schema.json) 检查类型、动作、必需目标和未知字段。
344
- 失败返回退出码 `1`,错误包含 `code`、JSON Pointer 路径 `path`(如
345
- `/steps/0/action`)、`message` 和 `hint`;JSON 语法或文件读取错误使用 `error` 对象。
346
- 预检不会启动浏览器,也不验证选择器、登录态或媒体文件是否可用。
347
- `record` 和 `render` 也会在改写输出文件前校验输入。编辑器补全可在配置中加入
344
+ [JSON Schema](schemas/story.schema.json) 检查类型、动作、必需目标和未知字段
345
+ (`record` 与 `render` 在改写输出前也会自动校验)。编辑器补全可在配置中加入
348
346
  `"$schema": "https://raw.githubusercontent.com/gnawbit/tabretake/main/schemas/story.schema.json"`。
349
347
 
350
- 常用参数:
351
-
352
- `init`、`plan`、`record`、`render` 也支持 `--json`:标准输出只有一个结果对象,
353
- 进度写入标准错误。成功结果包含 `command`、`ok`、`version`、`schemaVersion`,
354
- 以及列出绝对路径、类型、字节数的 `artifacts`。步骤失败提供从零开始的
355
- `error.step.index`、动作、JSON Pointer 路径及修复提示,修正后再重试。
348
+ `init`、`capture`、`plan`、`record`、`render`、`run`、`mark` 均支持 `--json`(标准输出返回结果对象,进度写入 stderr)。
349
+ 导航异常返回 `PAGE_UNREACHABLE` 或 `PAGE_HTTP_ERROR` 且不回显敏感 URL;动作完成后字幕即刻显示并在 `pause` 期间保持。
356
350
  手动 `--login` 需在交互终端运行且不带 `--json`,自动调用使用 `--storage-state`。
357
- 失败可能留下部分文件;应以本次成功结果的产物清单确认输出。
358
-
359
- v0.3.1 起将页面导航失败报告为 `PAGE_UNREACHABLE`,提示检查
360
- URL、服务和网络;HTTP 4xx/5xx 返回 `PAGE_HTTP_ERROR` 与 `error.status`,
361
- 避免把错误页录成成功演示。这类错误不回显目标 URL 中的凭据或查询参数。
362
- `doctor` 只检查依赖,不能证明目标应用可访问。
363
-
364
- v0.3.2 起,手动 `--login` 的导航异常也不回显目标 URL;HTTP 401/403
365
- 页面会保留供登录,其他 HTTP 错误会停止命令。
366
-
367
- v0.3.1 起已修正字幕时序:动作完成即显示字幕,随后 `pause` 留出阅读时间。
368
- v0.3.0 可用 `pause: 0` 加独立 `wait` 步骤代替。旧时间线需重新录制才能获得
369
- 新时序,仅重新渲染会保留原时间戳。
351
+ 旧版本历史兼容细节见[版本兼容性指南](docs/compatibility.md)。
370
352
 
371
353
  ```bash
354
+ --browser auto # auto(固定 Chromium 或自动回退本机 Chrome/Edge)、chromium、chrome、msedge
355
+ --preset daylight # 主题预设:midnight(默认)、daylight、paper、slate
372
356
  --login # 打开有头浏览器,手动登录一次
373
357
  --storage-state auth.json
374
358
  --proxy http://127.0.0.1:10808
375
359
  --viewport 1440x810
360
+ --scale 2 # 1(默认)或 2(2x Retina 高清录制,放大不发虚)
376
361
  --headed # 看着它录
377
362
  --vertical # 同时输出 9:16 和竖屏 GIF
378
363
  --video recording.mp4 # 渲染已有录屏 + marks
@@ -437,7 +422,13 @@ node bin/tabretake.mjs demo --story release --port 0 --out demo-release
437
422
  ## 用已有录屏
438
423
 
439
424
  如果站点有验证码、强反爬,或者你要演示的是桌面 App / 手机 App,先用 OBS、
440
- Screen Studio、QuickTime 或系统录屏录下来,再用 `marks` 描述哪里该放大:
425
+ Screen Studio、QuickTime 或系统录屏录下来,直接用本地可视化打点器在视频画面上点选需要放大的区域(无需手算时间与坐标):
426
+
427
+ ```bash
428
+ tabretake mark --video recording.mp4 --out story-video.json
429
+ ```
430
+
431
+ 也可以直接编写 `marks` JSON 描述哪里该放大:
441
432
 
442
433
  ```json
443
434
  {
@@ -513,9 +504,9 @@ Linux 用 Noto Sans CJK。`doctor` 会检查。
513
504
 
514
505
  - [x] 9:16 竖屏导出
515
506
  - [x] 已有录屏输入(`--video` + `marks`)
507
+ - [x] 多套品牌预设(`midnight`、`daylight`、`paper`、`slate`)
516
508
  - [ ] 配音(TTS)
517
509
  - [ ] 设备边框(iPhone、Android、macOS)
518
- - [ ] 多套品牌预设
519
510
  - [ ] 云端渲染
520
511
 
521
512
  ## 参与贡献
package/SKILL.md CHANGED
@@ -1,12 +1,12 @@
1
1
  ---
2
2
  name: tabretake
3
- description: Create repeatable product demo videos and README GIFs from a web app URL or an existing screen recording. Use when asked for a launch video, browser walkthrough, signup or onboarding demo, or to regenerate a demo after UI changes, including 产品演示、网页录屏、README 动图. Runs locally and exports MP4, GIF and posters in landscape or portrait. Requires a story script or recording marks. Not for general video editing, text-to-video generation, or browser test assertions.
3
+ description: Create repeatable product demo videos, screen recording walkthroughs, and README GIFs (16:9 and 9:16 portrait) from a web app URL or an existing screen recording. Use when asked for a launch video, browser walkthrough, signup or onboarding demo, vertical short video, or to regenerate a demo after UI changes, including 产品演示、网页录屏、README 动图、竖屏宣传视频. Runs locally with Playwright + FFmpeg, zero cloud upload, and supports dark/light theme presets. Not for browser test assertions, text-to-video generation, or general audio/video editing.
4
4
  license: MIT
5
5
  metadata:
6
6
  author: gnawbit
7
- version: "0.4.1"
7
+ version: "0.5.0"
8
8
  repository: https://github.com/gnawbit/tabretake
9
- compatibility: Node.js 20.9+, Chromium via tabretake setup, Windows/macOS/Linux. Target app access is required. Rendering is local; dependency installation needs network access.
9
+ compatibility: Node.js 20.9+, local Chrome/Edge or Chromium via tabretake setup, Windows/macOS/Linux. Target app access is required. Rendering is local.
10
10
  ---
11
11
 
12
12
  # TabRetake by gnawbit
@@ -18,20 +18,18 @@ After `waitFor`, use a `focus` step with a selector, caption and pause to frame
18
18
  result instead of the last clicked control. Inspect the rendered clip for framing.
19
19
 
20
20
  Create a repeatable product walkthrough from a web URL, or render an existing
21
- screen recording with supplied timestamps. The canonical project is
21
+ screen recording with supplied timestamps. Canonical project:
22
22
  https://github.com/gnawbit/tabretake.
23
- Outputs are local MP4, GIF and PNG posters in landscape and optional portrait.
23
+ Outputs are local MP4, GIF and PNG posters in landscape (16:9) and optional portrait (9:16).
24
+ For legacy release notes (`v0.4.0` and earlier / `demo-reel`), see [compatibility](docs/compatibility.md).
24
25
 
25
26
  ## Locate and check the CLI
26
27
 
27
- Use an installed `tabretake` CLI when available. The commands below assume it is
28
- on PATH. For a source checkout, replace `tabretake` with
29
- `node /absolute/path/to/tabretake/bin/tabretake.mjs`; paths with spaces need quoting.
30
- A copied Skill does not prove its runtime dependencies are installed. If needed,
31
- run `npm install --global @gnawbit/tabretake@0.4.1` and `tabretake setup`, or follow the
32
- [CLI installation instructions](https://github.com/gnawbit/tabretake#install).
33
- The renamed CLI and Skill are available together from v0.4.0. Releases through
34
- `v0.3.3` use the command and Skill name `demo-reel`.
28
+ Use an installed `tabretake` CLI when available. For a source checkout, replace
29
+ `tabretake` with `node /absolute/path/to/tabretake/bin/tabretake.mjs` (quote paths with spaces).
30
+ If missing, install with `npm install --global @gnawbit/tabretake@0.5.0`.
31
+ When Playwright Chromium is absent, TabRetake automatically falls back to local
32
+ Chrome or Edge (`--browser auto`), or you can install pinned Chromium via `tabretake setup`.
35
33
 
36
34
  ```bash
37
35
  tabretake --version
@@ -39,28 +37,25 @@ tabretake capabilities --json
39
37
  tabretake doctor --json
40
38
  ```
41
39
 
42
- Query capabilities before choosing flags: old releases may not support them.
43
- On v0.2.0, fall back to `help` and plain `doctor`, or update before using the
44
- JSON workflow. `doctor` reports required errors and optional font warnings;
45
- it checks Chromium's presence, not browser launch or app access. For web
46
- planning/recording, run `tabretake setup` for missing Chromium; Linux may need
47
- `setup --with-deps`. Rendering an existing recording or saved timeline does not
48
- need Chromium: if `chromium` is the only failed required check, continue to
49
- validate/render without installing a browser. Fix other required errors first.
50
- Node.js 20.9+ is required. Chinese captions need a CJK system font.
40
+ Query `capabilities --json` before choosing flags. `doctor --json` reports required
41
+ errors and optional font warnings; it checks browser presence without launching one.
42
+ Rendering an existing recording or saved timeline does not need a browser: if `chromium`
43
+ is the only failed required check, continue to `validate` and `render`. Fix other
44
+ required errors first. Node.js 20.9+ is required; Chinese captions need a CJK system font.
51
45
 
52
46
  ## Choose the input
53
47
 
54
- - **Web app:** confirm the URL and intended flow. `plan` inventories controls;
55
- it does not write a story. Use a test account and non-sensitive demo data.
56
- - **Existing recording:** get the file and moments to highlight. Read
48
+ - **Web app:** confirm the URL and intended flow. Use a test account and non-sensitive demo data.
49
+ - **Existing recording:** get the file and moments to highlight, or launch
50
+ `tabretake mark --video recording.mp4` for interactive timestamp picking. Read
57
51
  [recording input and branding](references/rendering.md); do not invent marks.
52
+ - **Interactive capture:** `tabretake capture --url https://your-app.com --out demo.json --run`
53
+ lets the user perform the steps in a visible browser and saves a reusable story.
58
54
  - **Example requested:** `tabretake demo --story readme|onboarding|release --port 0`
59
- runs a fictional bundled app. It is a template, not evidence of external adoption.
55
+ runs a fictional bundled app (not evidence of external adoption).
60
56
 
61
- Ask only for missing details that affect the result, such as the target flow or
62
- output orientation. Adapt the story length to the user's request; a few visible
63
- state changes are usually enough for a short launch clip.
57
+ Ask only for missing details that affect the result, such as the target flow,
58
+ theme preset (`midnight`, `daylight`, `paper`, `slate`), or output orientation.
64
59
 
65
60
  ## Record a web flow
66
61
 
@@ -68,52 +63,37 @@ state changes are usually enough for a short launch clip.
68
63
 
69
64
  ```bash
70
65
  tabretake plan --url https://your-app.com --out plan.json --json
71
- tabretake init --url https://your-app.com --out demo.json --auto --json
66
+ tabretake init --url https://your-app.com --out demo.json --auto --preset midnight --json
72
67
  ```
73
68
 
74
- 2. Read the plan file from its returned artifact path. If `--auto` was used, inspect
75
- the generated steps; otherwise replace the starter's wait-only steps with the
76
- requested flow. For actions, locator choices and timing units, read
77
- [story authoring](references/story.md). `init` will not overwrite an existing story.
78
- From v0.3.3, use `label` to identify form controls and native select `options`
79
- to inspect their labels, values and disabled states. Older versions omit these
80
- fields; use the plan screenshot and existing control metadata instead.
81
- The plan's `name` is an HTML attribute, not necessarily an accessible name;
82
- use `selector` when needed.
83
- On v0.3.3 and earlier, use a scoped selector for overlapping labels: a
84
- “Clear completed” button can match `text: "Completed"` before that exact link.
85
- v0.4.0 prefers exact button/link labels and respects an explicit role;
86
- see [locator behavior](references/story.md) before relying on this change.
87
-
88
- 3. Validate, record and render:
69
+ 2. Read the plan file from its returned artifact path. Inspect `--auto` steps or
70
+ replace starter steps with the requested flow. See [story authoring](references/story.md)
71
+ for actions, locators, and timing units. `plan` includes `label` (ARIA/HTML labels)
72
+ and native select `options`; `name` remains the HTML attribute. Use scoped `selector`
73
+ when labels repeat or overlap. `init` will not overwrite an existing story.
74
+
75
+ 3. Validate, preview, record and render (or use `tabretake run` for one-command execution):
89
76
 
90
77
  ```bash
91
78
  tabretake validate --config demo.json --json
92
- tabretake record --config demo.json --out demo --json
79
+ tabretake preview --config demo.json --headless --json
80
+ tabretake run --config demo.json --out demo --vertical --scale 2 --json
81
+ # Or run record and render separately:
82
+ tabretake record --config demo.json --out demo --scale 2 --json
93
83
  tabretake render --config demo/record.json --vertical --json
94
84
  ```
95
85
 
96
- Omit `--vertical` for landscape only; add `--no-gif` if GIFs are unnecessary.
97
- Use the returned timeline path if output goes elsewhere. Paths are resolved
98
- from the current working directory unless documented otherwise; use absolute
99
- paths when the CLI and target app live in different directories.
100
-
101
- From v0.3.2, portrait cards fit the source aspect ratio. For a mobile flow,
102
- inspect and record at a narrow viewport (for example `390x844`); use
103
- `--zoom 1` to preserve the full viewport. Wide desktop text may still be small.
104
- From v0.4.1, `vertical-zoom` is supported: use
105
- `--vertical --zoom 1 --vertical-zoom 1.8` for portrait focus magnification
106
- while retaining landscape overview. `vertical.zoom` saves the portrait
107
- setting in config; the flag overrides it. `zoom: false` remains overview.
108
-
109
- 4. Inspect the poster and video, then return links to the actual generated
110
- artifacts. Re-record after flow changes; re-render the saved timeline after
111
- caption, zoom or branding changes. Fonts and encoder versions can affect
112
- appearance across machines. Output videos have no audio.
113
-
114
- For caption reading time, use action `pause` on v0.3.1 or newer; on v0.3.0
115
- use `pause: 0` followed by `wait`. Older recordings need to be recorded again
116
- to adopt the corrected caption timing; re-rendering preserves their timestamps.
86
+ Omit `--vertical` for landscape only; add `--no-gif` to skip GIFs; pass
87
+ `--preset daylight|paper|slate|midnight` to switch themes without re-recording;
88
+ pass `--browser chrome|msedge|chromium|auto` to pick a browser engine;
89
+ pass `--scale 2` for HiDPI Retina recording when zooming in.
90
+ Use `--vertical --zoom 1 --vertical-zoom 1.8` to keep landscape overview while
91
+ enlarging portrait focus targets (`vertical.zoom` saves it in config; `zoom: false`
92
+ keeps full view). Record narrow viewports (e.g. `390x844`) for mobile flows.
93
+
94
+ 4. Inspect the generated poster and video, then return clickable paths to the actual
95
+ artifacts. Re-record after flow changes; re-render `record.json` after caption,
96
+ zoom, or theme preset changes. Output videos have no audio.
117
97
 
118
98
  ## Interpret results and recover
119
99