A reusable toolkit to generate polished product demo assets across projects:
- terminal recording video
- UI interaction recording video (Playwright)
- merged promo video (terminal + UI)
- optimized GIF export
Most project teams struggle with repeatable demo creation. This toolkit standardizes the workflow and makes it scenario-driven, so you can reuse the same tooling for many repositories.
- Playwright (UI automation + video capture)
- VHS (terminal video capture)
- ffmpeg (video composition + GIF export)
- zod (scenario validation)
- Node.js 20+
- pnpm 10+
ffmpegvhs(for terminal video; optional if terminal recording is disabled)
pnpm install
pnpm exec playwright install chromiumpnpm demo:run -- --scenario scenarios/glidekit.todo.jsonOutput assets are generated in the scenario outputDir, e.g.:
artifacts/glidekit-todo/
terminal.mp4
ui.webm
demo.mp4
demo.gifpnpm demo:run -- --scenario <path>: full pipelinepnpm demo:terminal -- --scenario <path>: terminal onlypnpm demo:ui -- --scenario <path>: UI onlypnpm demo:compose -- --scenario <path>: merge videospnpm demo:gif -- --scenario <path>: export GIFpnpm validate:scenarios: validate all scenario JSON filespnpm smoke: run smoke pipeline against a local test pagepnpm check: verify local tool availability
See scenarios/glidekit.todo.json as a complete example.
Important sections:
terminal: commands and terminal capture setupui.startup: optional app startup process before recordingui.actions: browser action sequencecompose: final layout (side-by-sideorstacked)gif: GIF output options
ui.startup uses executable + args (no shell interpolation):
"startup": {
"enabled": true,
"command": "/opt/homebrew/bin/pnpm",
"args": ["--filter", "@glidekit/desktop", "dev", "--host", "127.0.0.1", "--port", "1420"],
"readyUrl": "http://localhost:1420",
"timeoutMs": 90000
}If your environment blocks child process startup, set startup.enabled=false and start your app manually before demo:ui.
GitHub Actions workflow .github/workflows/ci.yml includes:
- scenario validation (
pnpm validate:scenarios) - script smoke pipeline (
pnpm smoke)
- For CI use, you can disable terminal recording (
terminal.enabled=false) ifvhsis not available. - Playwright runs headless by default for deterministic recording.