---
name: hyperframes-cli-guide
description: Use when running the HyperFrames CLI to scaffold, check, snapshot, preview and render videos, or to fix failing builds and renders.
---
# HyperFrames CLI guide
## What this does
Maps each job in a HyperFrames video project to the right `npx hyperframes` command and gives the check-look-preview-render loop plus fixes for common failures. Needs Node.js 22+ and FFmpeg. Every command has `--help`; most take `--json`; failures print a `Fix:` line.
## When to use
When starting, checking, editing, previewing or rendering a HyperFrames project, or when a command or render fails.
## How to run it
Commands by job:
- Start: `init <dir>`, `capture <url>`
- Read: `info`, `compositions`, `timeline --json`, `docs <topic>`
- Check: `lint` while writing; `check --json` as the gate
- Look: `snapshot` (`--at`, `--range`, `--composition`, `--zoom`), `keyframes`, `compare`, `audio`
- Edit timeline: `timeline` with `move`, `trim`, `split`, `set`, `duplicate`, `delete`, `apply`, `undo`, `ids`
- Show and ship: `preview`, `render`, `publish`, `cloud`, `lambda`, `cloudrun`
- Upkeep: `doctor`, `browser`, `upgrade`, `usage`, `clean`
`validate`, `inspect`, `layout` are deprecated aliases of `check`; don't use them.
The loop:
1. Write, then `npx hyperframes lint` after the first pass and after structural changes.
2. `npx hyperframes check --json`; fix every error. While a lint error remains, layout and contrast audits don't run; "0 samples" means nothing was checked. Contrast failures carry a `suggestedColor`. A 3 s+ video with no visible change fails `sweep_static`.
3. `npx hyperframes snapshot`, then read the PNGs under `.hyperframes/artifacts/snapshots/`. With sub-compositions, snapshot a midpoint of every scene.
4. `npx hyperframes preview --background`, confirm the URL answers 200, give the person the URL and wait, unless they asked for the file or no stops.
5. Render: `npx hyperframes render --quality looks --output out.mp4` (`draft` to iterate, `delivery` for final). Confirm the file is non-empty, its `ffprobe` duration matches the root `data-duration`, then look at decoded frames.
Timeline edits: `timeline --json` lists clips with `absStart`/`absEnd` and `#id` refs. Preview any edit with `--plan --json`, then rerun without `--plan`. Edits that overlap a neighbour or exceed the composition are refused. Batch edits: `timeline apply plan.json --json`; `timeline undo receipt.json` reverts.
Render options: reproducible `render --docker --strict`; batch `render --batch rows.json --output "renders/{name}.mp4"`; hosted `cloud render`; own AWS/GCP `lambda render` / `cloudrun render`. A 30 s film renders in 1-2 minutes: run it in the foreground.
When a command fails:
- Chrome missing: `npx hyperframes browser ensure`; `doctor --json` always exits 0, gate on `.ok`.
- Heavy page not ready: raise `--timeout` on `check` or `snapshot`.
- Unusual codec looks blank: keep `--proxy` on.
- `capture` fails or writes `BLOCKED.md`: use nothing from partial files; retry into a new `-o` folder.
- Disk tight: `clean --dry-run`, then `clean`; never delete `.hyperframes` (it holds history).
## Output
A project that passes `check --json`, snapshot PNGs you have inspected, a preview URL, and a verified MP4 when rendering is approved.
Credit: Based on public content by heygen-com, packaged by Orbit.