Skip to content
Projetos

Sobre

Create repeatable web app demos, README GIFs and 9:16 videos from editable JSON steps or existing screen recordings. Local CLI and Agent Skill for Claude Code, Codex and Cursor.

Ferramentas de desenvolvimento

Como estes números são medidos

Crescimento medido de estrelas

em 24 h
+3
em 7 dias
Coletando histórico
em 15 dias
Coletando histórico
em 1 mês
Coletando histórico

Variações líquidas em períodos sobrepostos, não totais diários. Medições ausentes ficam em branco. Estrelas indicam interesse, não qualidade.

README.md

Original

TabRetake — repeatable web app demo videos

English · 简体中文

Walk through your web app once to make a README GIF and a portrait video. When the UI changes, replay the saved steps to update both.

Try the bundled demo · Record your own app

The same restart in 2048. Before, the New Game button is centered below the introduction. After, it is a button on the right. Both games reset to two tiles.

One story, two versions of 2048. The New Game button moved from beneath the introduction to its right. The same steps played a few moves, clicked it and checked that the board reset to two tiles with a score of zero.

Before (MP4) · After (MP4) · Story JSON · Reproduce both takes

Quickstart

Try the bundled demo

Use Node.js 22 or 24 and open a terminal in an empty directory. If Chrome or Edge is installed, run these two commands. If you need a browser, follow the browser setup instructions between commands.

npm install --global --include=optional @gnawbit/tabretake
tabretake demo --preset daylight

This records the bundled sample app. Open demo/demo.gif for the README animation or demo/demo-9x16.mp4 for the portrait video.

Record your own app

With the CLI installed, start your web app. In a fresh directory for this recording, replace the URL below with your app’s address. Use demo data you can reset, since --run repeats your actions after you save.

tabretake capture --url http://localhost:3000 --out demo.json --run --vertical

In the browser, perform a short task and click Save & Finish in the capture toolbar. TabRetake saves your steps in demo.json, replays them, and writes the media to demo/.

Keep demo.json with your project. After a UI change, start the app at the same address, reset any demo data, and rerun the story. If a control changed, update its step first.

tabretake run --config demo.json --vertical

This updates the files in demo/. To keep both takes, add --out take-2. Share what worked or where you got stuck.

last-success.json lists the files from the completed export. If a retake fails during rendering, the previous export stays in place. The retry hint points to the new recording's separate timeline. Correct any invalid options and render it there without repeating browser actions.

Example stories

These are maintainer recordings of unmodified open-source apps. Each recipe includes the story and the setup needed to replay it.

📋 Vikunja ✍️ Memos 📝 TodoMVC
Vikunja Kanban Memos Note-Taking TodoMVC Benchmark
Move a task to Doing Write, save and find a memo Complete a task and filter the list
Story JSON · Recipe Story JSON · Recipe Story JSON · Recipe

Output formats

A story can include click zooms, cursor ripples and captions. TabRetake renders locally with Playwright, Sharp and FFmpeg. Each run also saves a record.json timeline so you can adjust the theme or framing and render again from the same recording.

16:9 — README / landing page 9:16 — portrait launch video
16:9 demo poster 9:16 vertical demo poster

16:9 MP4 · 9:16 MP4 · 9:16 GIF

Use the CLI on Windows, macOS or Linux, directly or through Claude Code, Codex or Cursor. To start with an existing MP4 or WebM, mark the moments to highlight.

Recording and export options Available settings
Browser Playwright Chromium, or local Chrome or Edge with --browser auto
Resolution Landscape MP4 is 1920 × 1080 and portrait MP4 is 1080 × 1920. GIFs are half those dimensions. Add --scale 2 for a higher-resolution source when zooming in.
Appearance Five theme presets, browser or phone frames, and a separate caption area

What to rerun after a change

What changed? What to use
The web app’s UI Replay demo.json with tabretake run to record the current UI and export the media. Update steps that refer to renamed controls.
Only the theme or framing Render the saved demo/record.json with new settings. The original browser actions and video are reused.
A manually recorded MP4 or WebM Open the new clip with tabretake mark, mark the moments to highlight, then export. This also works for desktop or mobile apps.

Project page · MIT license · npm package · CI · Agent Skill

Featured in Ruan Yifeng’s Technology Weekly, issue 421.

Listed in Awesome Agent Skills

Install

Use Node.js 22 or 24. The minimum is Node.js 20.10.0. The quickstart installs the current npm release. To reproduce this revision, pin its CLI version once published to npm.

npm install --global --include=optional @gnawbit/[email protected]

Browser setup

TabRetake can use an existing Chrome or Edge installation. If you need Chromium for browser recording, set it up before running the demo.

  • Linux — tabretake setup --with-deps installs Playwright's Chromium and its system dependencies.
  • Windows or macOS — tabretake setup installs Playwright's Chromium.

Other installation options

Run tabretake demo from your working directory to generate output in ./demo. With a working browser, you can try the demo without a global install:

npm exec --yes --include=optional --package=@gnawbit/tabretake -- tabretake demo --preset daylight

Sharp, FFmpeg and ffprobe use platform-specific npm packages. If your npm configuration omits optional dependencies, include them in the installation. For a local install, run npm install --include=optional in that project. Check the result with tabretake doctor. Capture and preview can run with the browser alone when the rendering binaries are missing.

TabRetake uses FFmpeg and ffprobe from PATH when their bundled binaries are unavailable. Native Windows ARM64 requires external media binaries. To select specific executables, set TABRETAKE_FFMPEG_PATH and TABRETAKE_FFPROBE_PATH.

If downloading Chromium is slow or times out in restricted networks, pass --proxy <url> or use a Playwright download mirror:

# China mirror (npmmirror Playwright binaries)
PLAYWRIGHT_DOWNLOAD_HOST=https://cdn.npmmirror.com/binaries/playwright tabretake setup

(In Windows PowerShell: $env:PLAYWRIGHT_DOWNLOAD_HOST="https://cdn.npmmirror.com/binaries/playwright"; tabretake setup)

The npm package is @gnawbit/tabretake. For legacy release notes (v0.4.0 and earlier / demo-reel), see compatibility.

For development, install from a checkout:

git clone https://github.com/gnawbit/tabretake
cd tabretake
npm ci
node bin/tabretake.mjs doctor

Examples below use the installed tabretake command. From a source checkout, use node bin/tabretake.mjs in its place.

To add the agent workflow after setting up the CLI:

npx [email protected] add "https://github.com/gnawbit/tabretake.git#v0.5.10" --skill tabretake

Run this in the target project; add --agent codex, --agent claude-code or --agent cursor to select a client. With Skills CLI 1.9.0, use Node 22.20 or later in the 22 series, or Node 24. Tell your agent whether to use the global CLI or a source checkout. Install the CLI and Skill from the same revision.

Claude Code users can install the plugin instead (CLI 2.1.292+):

claude plugin install tabretake --marketplace "gnawbit/tabretake#v0.5.10"

Install the workflow through one of these routes; the plugin still needs the TabRetake runtime installed above. It is a Claude Code plugin, not a Cowork package or an MCP server. Discovery checks and their limits document what has actually been verified. Example requests:

  • "Make a README GIF showing the signup flow at http://localhost:3000."
  • "Create a portrait launch demo from my web app, with captions."
  • "Regenerate the product walkthrough after these UI changes."

The agent plans a story and runs the CLI. For an existing recording, supply the video and the moments to highlight instead.

Other ways to build a story

To start from a scan of your app’s controls, replace the URL and generate an editable story. Review the suggested steps before running them.

tabretake init --url http://localhost:3000 --auto --preset daylight --out demo-auto.json
tabretake run --config demo-auto.json --vertical --scale 2

During interactive capture you can click, type, select an option or pin the closing shot. Password values are omitted. If capture --run fails, follow the retry hint or error.recovery in JSON. A completed recording can be rendered again from its saved timeline.

Default captions use the control label in its original language. Unlabeled actions have no automatic caption. Edit caption in the story to describe what changed.

Capture preserves the position of canvas clicks and double-clicks in CSS pixels from the canvas padding box. Canvas strokes and native HTML drops within the same document become drag steps. Follow a board move or save with waitFor to verify the result on replay. init --auto scans your target page, skips navigation dead links and destructive actions, prioritizes main form/CTA controls, and generates a runnable multi-step story with captions. run validates, records, and renders in a single command (or accepts an existing marks or record.json config). You can also run record and render separately, or use plan --url <url> to inspect all DOM controls (including ARIA/HTML label and native select options). name remains the HTML attribute and selector is the suggested CSS locator; this is a DOM inventory rather than a full accessibility tree.

tabretake record --config demo-auto.json
tabretake render --config demo/record.json --vertical

Output:

demo/
  demo-16x9.mp4
  demo-9x16.mp4
  demo.gif
  demo-9x16.gif
  poster.png
  poster-9x16.png
  record.json

The story file

Reuse a story with fresh data

Add "variables": { "task": "Draft release notes" } to the story and use "value": "{{task}}" in a type step. For example, wait for this run's result with { "action": "waitFor", "selector": ".task-card", "matchText": "{{task}}" }. Captured list controls use within to identify the item across reordering. If the item or its control is ambiguous, replay stops with TARGET_AMBIGUOUS. Recapture older positional list steps or supply a stable item selector.

matchText matches exact visible text within the given selector and also works with drag and focus. waitFor and focus also support variables in text. Use tabretake run --config demo.json --var "task=Review the changelog" --out take-2 to override the default for one take. preview and record accept the same repeatable flag. Use fictional values because demo data can appear in recordings and diagnostics.

Preview and focus

Run tabretake preview --config demo.json to execute the story in a visible browser before recording. Preview performs the actual clicks and edits against your app. Use disposable demo data and reset it before recording. It reports each step and preserves existing recordings. A screenshot step saves an image, and a failed step saves a diagnostic screenshot and text snapshot. Add --headless --json for automation and --storage-state auth.json for authenticated flows.

After an action reveals a result, wait for it and focus the camera on it. The target is measured after scrolling into view. A focus step holds that position for its pause; add another focus step after subsequent layout changes.

[
  { "action": "waitFor", "selector": "#result" },
  { "action": "focus", "selector": "#result", "caption": "Ready to share", "pause": 1200 }
]

Preview checks browser actions. Use a rendered clip to check zooms and captions.

{
  "url": "https://your-app.com",
  "displayUrl": "your-app.com",
  "viewport": { "width": 1440, "height": 810 },
  "brand": { "background": "#070a12", "accent": "#6c5ce7" },
  "steps": [
    { "action": "wait", "ms": 600 },
    {
      "action": "click",
      "text": "New project",
      "pause": 600,
      "zoom": false,
      "caption": "Start in one click"
    },
    { "action": "wait", "ms": 900 },
    {
      "action": "type",
      "selector": "input[name=project-name]",
      "value": "Q4 Launch",
      "pause": 350,
      "caption": "Give it a name"
    },
    { "action": "wait", "ms": 900 },
    {
      "action": "click",
      "text": "Create project",
      "pause": 900,
      "zoom": false,
      "caption": "Your workspace is ready"
    }
  ]
}

Actions: wait, goto, click, dblclick, type, select, hover, focus, drag, scroll, press, waitFor, screenshot.

click and dblclick wait for an enabled, unobstructed target up to timeout (milliseconds, default 20,000; blocked clicks return STEP_TIMEOUT).

Locator fields are selector, role + name (or text), name, or text, plus optional frame (an iframe selector or nested selector array). An explicit selector is tried first. Label matching tries exact buttons/links, then partial buttons/links, then plain text (exact before partial). An explicit role restricts matching to that role, with exact names first. Each candidate keeps the first visible match; use a scoped selector when labels repeat or overlap.

Tips:

  • 3–5 steps, 12–25 seconds.
  • Add a short wait after an action so the result and caption can land.
  • Use "zoom": false when the interesting result is elsewhere on screen.
  • Captions state the benefit, not the UI label.

Captions wrap to fit the frame and shrink modestly when needed. If a caption cannot fit at a readable size, rendering asks you to shorten it or split it across steps. A new caption replaces the previous one immediately.

Camera movement

Click zooms ease between targets over 0.35 seconds. Set top-level "zoomDuration": 0.5 in a story or marks config, or override it with render --config demo/record.json --zoom-duration 0.5. Use 0 for immediate cuts and "zoom": false on a step to return to the full view. Rapid clicks continue from the current camera position.

Posters

Posters use a frame near the end to show the result. Set "posterAt": 4.5 at the top level of a story or recording-marks config to choose another frame. For an existing timeline, render --config demo/record.json --poster-at 4.5 overrides that setting without recording again. Times are seconds into the trimmed output, starting at zero, and must be shorter than the video.

Theme presets & vertical branding

Choose a built-in brand.preset (midnight, daylight, paper, slate, or glass) in your config or override it at render time with --preset <name>. Cursor click ripples automatically follow the theme's accent color, and brand.frame supports "auto" (default), "browser", "phone" (lightweight portrait bezel), or "none". Explicit brand.background and brand.accent override preset colors unless --preset is passed on the CLI. Use "scale": 2 (or --scale 2) for HiDPI 2x recording so zoomed shots stay crisp.

"brand": {
  "preset": "daylight"
},
"vertical": {
  "badge": "Your product",
  "titleLines": ["Ship faster", "without the busywork"],
  "subtitle": "Native · Local · Private",
  "cta": "your-app.com",
  "watermark": false
}

titleLines is capped at two lines. watermark: false removes the small TabRetake mark. Chinese text automatically uses a CJK font.

Both 16:9 landscape and 9:16 portrait outputs fit the source video's aspect ratio and reserve dedicated space below the content for captions. For a mobile flow, inspect with plan --viewport 390x844, then preview at the same viewport. Add steps for controls that move into responsive menus. For a horizontal source, explicit focus steps default to up to 1.8× in portrait. New recordings use the visible target bounds to reduce zoom for wide or tall targets. Other actions use the regular zoom, and zoom: false keeps the full view. To set portrait magnification, use --vertical-zoom, vertical.zoom in the story, or an explicit --zoom, in that order of precedence. Review enlarged shots for context near the edges.

Commands

Command What it does
tabretake --version Print the installed CLI version
tabretake capabilities --json List supported commands, flags and JSON support
tabretake doctor [--json] Check Node, Chromium, ffmpeg, fonts
tabretake setup [--with-deps] [--proxy <url>] Install the Chromium version used by this CLI
tabretake init --url <url> [--auto] [--preset <name>] Create an editable story file (--auto scans controls; --preset sets theme)
tabretake capture --url <url> [--out demo.json] [--run] Record your real browser clicks/inputs into the story file named by --out
tabretake validate --config demo.json [--json] Validate a story, marks or recorded timeline without recording
tabretake plan --url <url> Screenshot + list interactive elements
tabretake record --config demo.json Record the story
tabretake preview --config demo.json Execute steps in a visible browser before recording
tabretake render --config demo/record.json [--preset <name>] Export MP4, GIF, and poster from a saved recording
tabretake run --config demo.json [--vertical] [--scale 2] Validate, record, and render in one command
tabretake mark --video recording.mp4 [--out story-video.json] Open local visual studio to click-mark timestamps & zoom points
tabretake serve [--dir <path>] [--port <n>] Serve a local directory (relative to cwd) or the bundled demo app
tabretake demo [--preset <name>] Record + render the bundled demo

🏷️ Project Badge

If your repository uses TabRetake to generate its release walkthroughs or README GIFs, you can add our badge:

[![Demo by TabRetake](https://img.shields.io/badge/Demo%20by-TabRetake-6c5ce7?logo=playwright)](https://github.com/gnawbit/tabretake)

For agents, capabilities --json and doctor --json emit one JSON object on stdout with schemaVersion: 1 and the installed version. Diagnostic checks have stable id, required, status and recovery hint fields on failure. Exit code 1 means a required check failed; missing caption fonts are warnings (exit 0 if required checks pass). The browser check launches and closes a headless browser.

doctor checks the whole toolkit (set TABRETAKE_FFMPEG_PATH / TABRETAKE_FFPROBE_PATH to override the bundled media binaries, and TABRETAKE_MEDIA_TIMEOUT_MS to change the 300-second per-process media timeout). Rendering an existing recording or saved timeline does not need a browser: if chromium is the only failed required check, skip browser setup and continue with validate and render; fix other required errors first. Browser planning and recording require Chromium or local Chrome/Edge.

Before recording, run validate --config demo.json --json against the packaged JSON Schema (record and render also validate before writing outputs). For editor completion, add "$schema": "https://raw.githubusercontent.com/gnawbit/tabretake/main/schemas/story.schema.json" to your config.

init, capture, plan, record, render, run and mark accept --json (one JSON result object on stdout, progress on stderr). Navigation failures return PAGE_UNREACHABLE or PAGE_HTTP_ERROR without echoing sensitive URLs; Step failures include error.diagnostics (locator, resolved, coveredBy, sanitized page, viewport) and save an accessibility/text snapshot plus failure PNG under <out>/diagnostics/. The snapshot omits accessibility link destinations and strips credentials, queries and fragments from HTTP(S) URLs in page text. Review both files before sharing since they can still include app content. Captions start when an action completes and hold during its pause. Run manual --login in an interactive terminal without --json, then reuse --storage-state in automation.

--browser auto          # auto (bundled Chromium or local Chrome/Edge), chromium, chrome, msedge
--preset glass          # midnight (default), daylight, paper, slate, glass
--login                 # open a visible browser, log in once
--storage-state auth.json
--proxy http://127.0.0.1:8080
--viewport 1440x810
--scale 2               # 1 (default) or 2 (HiDPI Retina recording for crisp zooms)
--headed                # watch the recording happen
--vertical              # also render 9:16 + vertical GIF
--video recording.mp4   # render an existing recording + marks
--no-gif
--no-captions
--zoom 1.28

Login and protected pages

tabretake record --config demo.json --login

A visible browser opens. Log in manually in an interactive terminal. The session is saved to auth.json locally and used for this recording. On later runs, or after logging in with plan --login, pass it explicitly:

tabretake record --config demo.json --storage-state auth.json

Use an absolute state path when changing working directories. TabRetake never asks for your password and never uploads cookies. Keep login state out of Git.

How it works

Story JSON goes into Playwright recording, then a timestamped event timeline and webm go into sharp + ffmpeg, producing MP4, GIF and poster
  1. plan opens the page and inventories buttons, links and inputs.
  2. record drives Chromium, moves the cursor, clicks, types and records.
  3. Click timestamps become zoom keyframes.
  4. render crops around each click, then composes the same timeline into a 16:9 browser canvas and a 9:16 vertical card, and encodes MP4 + GIF.

Because it drives a real browser, it works with React, Vue, Svelte, plain HTML, SPAs and authenticated pages.

Examples

Reproduce authenticated flows in Vikunja (task creation and Kanban drag) and Memos (rich-text notes and search) — see the example stories above for story files, GIFs and posters. Both recipes pin unmodified upstream releases and include downloadable stories, local setup and retake instructions.

The manual demo workflow starts a pinned TodoMVC build, waits for it, records the story and uploads MP4, GIF and poster artifacts. Run Actions → Regenerate TodoMVC demo → Run workflow in your fork. For your own app, replace its checkout/start command, readiness URL and story. Keep demo data disposable. Review the generated assets before publishing them.

The bundled app includes three stories. Use distinct output directories to keep their recordings.

tabretake demo --story readme --port 0 --out demo-readme
tabretake demo --story onboarding --port 0 --out demo-onboarding
tabretake demo --story release --port 0 --out demo-release

Use an existing screen recording

MP4 exports are silent. Keep the original recording if you need its audio.

If a site blocks automation, or you are demoing a desktop or mobile app, record the flow with OBS, Screen Studio, QuickTime or the OS recorder, then run the local visual studio to click on zoom targets directly (no manual math required):

tabretake mark --video recording.mp4 --out story-video.json

Or author marks JSON directly to describe where to zoom:

{
  "displayUrl": "your-app.com",
  "video": "recording.mp4",
  "marks": [
    {
      "t": 2.1,
      "x": 0.946,
      "y": 0.048,
      "caption": "Start a new project",
      "zoom": false
    },
    {
      "t": 4.1,
      "x": 0.5,
      "y": 0.468,
      "caption": "Give it a name"
    }
  ]
}
  • t is seconds into the recording.
  • x and y are normalized 0..1; use zoom: false to keep the full frame.
  • duration delays the caption after t, in seconds (default 0.6); use 0 to show it at the mark. It does not set how long the caption stays. Captions last up to 2.8 seconds, ending earlier at the next caption or video end.
tabretake render \
  --config story-video.json \
  --video recording.mp4 \
  --vertical

It produces the same 16:9 and 9:16 videos, GIFs and posters as a URL recording.

A minimal example lives at examples/story-video.json.

FAQ

Can I reuse a recording I already have? Yes. Mark the moments to highlight in an MP4 or WebM, then render it with captions and zooms.

Does it work on Windows? Yes. Windows x64 uses the npm media binaries. On native Windows ARM64, install FFmpeg and ffprobe.

Do I need an AI agent to use it? No. The CLI works standalone. The agent skill is a convenience: it can inspect the page, write the story and run the commands for you.

Can I record a site I don't own? Only with permission. Do not use it to scrape, bypass paywalls or evade anti-bot systems.

Do Chinese captions work? Yes. TabRetake picks a CJK font automatically: Microsoft YaHei on Windows, PingFang on macOS, Noto Sans CJK on Linux. doctor checks it. If no CJK font is installed, run doctor to see what is missing.

Can I use the output commercially? Yes. The code is MIT. Make sure the page you record and the fonts/assets in it are yours or licensed.

Roadmap

  • 9:16 vertical export
  • Screen-recording input (--video + marks)
  • Brand presets (midnight, daylight, paper, slate, glass)
  • Interactive capture (capture), visual marker studio (mark), and lightweight frames (browser, phone)
  • Full device bezels (iPhone, Android, macOS)
  • Voiceover (TTS)
  • Cloud rendering

Contributing

For trial reports, see how we track first demos and retakes. For issues and PRs, start with CONTRIBUTING.md. Please do not commit auth.json, customer recordings or anything that contains personal data.

License

MIT — see LICENSE.

Explore projetos relacionados

Carregando…