Getting started
One command installs the CLI and wires your coding agent. Two more take you from a URL to a verified MP4.
Install#
Playhead is a single npm package with a CLI. Node 20 or newer, on macOS, Linux or Windows.
npx playhead initWith no path argument, init does the whole first-run setup: it registers an MCP server and skills for Cursor, Claude Code and Codex (writing .cursor/mcp.json, .mcp.json, .codex/config.toml and a Playhead section in AGENTS.md), installs Chromium, and downloads the offline narration voice.
| Flag | What it does |
|---|---|
--no-tts | Skip the Kokoro voice (~400MB one-time). Narration then needs macOS `say`, or nothing at all. |
--no-browser | Skip the Chromium download — for images that already ship it, like the Playwright base image. |
--force | Overwrite the managed skills and the Playhead section of AGENTS.md. |
--url <url> | Only with a spec path: explore that running app and scaffold the spec from real locators. |
Or install it globally#
npm install -g playhead-cli
npx playwright install chromiumCheck the machine#
Rendering needs ffmpeg, a browser, and fonts. doctor reports all three plus the optional pieces — narration providers, the local vision reviewer, signing prerequisites — and tells you the exact command to fix anything missing.
playhead doctor # or --ci to also check container prerequisites ✓ tts (kokoro): kokoro-js installed — the natural offline voice is available
✓ ffmpeg: ffmpeg version 6.1.1
✓ chromium: …/chrome-win64/chrome.exe
✓ fonts: Inter registered
✓ vision: Ollama reachable — render --vision stays on-machineffmpeg-static and ffprobe-static. If doctor reports a problem there, it is a broken install rather than a missing system dependency.Render something, right now#
The fastest honest path is to record yourself using your own app. A browser opens; you drive the flow like a user; every interaction becomes a validated step.
playhead record http://localhost:3000 -o demo.yaml
playhead validate demo.yaml
playhead render demo.yaml -o outBehind a login wall, save a session first. Playhead never sees the password — you type it into a real browser, and only the resulting cookies are written to disk.
playhead login https://app.example.com
playhead record https://app.example.com --storage-state playhead-session.json -o demo.yamlWhat you get#
| Path | What it is |
|---|---|
out/out.mp4 | The finished 1080p walkthrough: title card, planned camera moves, rendered cursor, numbered captions, narration. |
out/capture/ | The re-renderable capture bundle — frames, events.json, manifest. The only artifact that ever touched your app. |
out/compose-manifest.json | Everything the compositor rendered, and the contract verification checks against. |
out/verify/verdict.json | publishable or not-publishable, with per-check reasons, coverage and hashes. |
out/verify/contact-sheet.png | Key moments as an annotated grid, so you can trust the output without watching it end to end. |
out/evidence/index.html | A relocatable page with the video, the steps and the verdict — the thing you paste into a ticket. |
out/bug-report.md | Written for kind: bug-repro: URL, steps with timecodes, and the captured console — a ticket body, not just a clip. |
render exits 0 only when the verdict is publishable, which is what lets it double as an end-to-end test. See what each check asserts →
Try it against the bundled demo app#
Cloning the repository gets you a deliberately awkward demo app — a modal that paints in the browser top layer, network latency, a toast, masked fields, a long scroll — so you can watch the pipeline handle the hard parts.
git clone https://github.com/Cypher-aman/playhead && cd playhead
npm install && npx playwright install chromium
npm run demo & # http://localhost:4173
npm run playhead -- render specs/examples/add-user.yaml -o outWhere to go next#
- Your first video — the render loop explained, and how to iterate without re-recording.
- Writing a spec — the three ways to author, and why you never type a locator by hand.
- Coding agents — let Cursor, Claude Code or Codex write the spec for you.