hyperframes CLI is the primary way to work with Hyperframes. It handles project creation, live preview, rendering, linting, and diagnostics — all from your terminal.
When to Use
Use the CLI when you want to:- Capture a website for video production (
capture) - Create a new composition project from an example (
init) - Preview compositions with live hot reload (
preview) - Render compositions to MP4 locally or in Docker (
render) - Lint compositions for structural issues (
lint) - Inspect rendered visual layout for text overflow and clipped containers (
inspect) - Capture key frames as PNG screenshots (
snapshot) - Check your environment for missing dependencies (
doctor)
- Render programmatically from Node.js code — use the producer
- Build a custom frame capture pipeline — use the engine
- Embed a composition editor in your own web app — use the studio
- Parse or generate composition HTML in code — use core
Agent-Friendly by Default
The CLI is non-interactive by default — designed so AI agents (Claude Code, Gemini CLI, Codex, Cursor) can drive every command without prompts or interactive UI.- All inputs are passed via flags (e.g.,
--example,--video,--output) - Missing required flags fail fast with a clear error and usage example
- Output is plain text suitable for parsing
- No interactive prompts, spinners, or selection menus
--human-friendly to any command to enable the interactive terminal UI with prompts, spinners, and selection menus.
- Agent mode (default)
- Human mode
JSON Output and _meta Envelope
All commands that support --json wrap their output with a _meta field containing version check info:
--json output.
Passive Update Notices
The CLI checks npm for newer versions in the background (cached 24 hours). If an update is available, a notice appears on stderr after command completion:HYPERFRAMES_NO_UPDATE_CHECK=1 is set.
Getting Started
1
Create a project
Scaffold a new composition from an example:You will be prompted for a project name, or pass it as an argument:See Examples for all available examples.
2
Preview in browser
Start the development server with live hot reload:The Hyperframes Studio opens in your browser. Edit
index.html and the preview updates instantly.3
Lint your composition
Check for structural issues before rendering:
4
Render to MP4
Produce the final video:For deterministic output, add
--docker:Commands
- Create
- Preview
- Build
- Utilities
init
Create a new composition project from an example:In default (agent) mode,
--example is required — the CLI errors with a usage example if missing. In --human-friendly mode, you choose interactively. When --video or --audio is provided, the CLI automatically transcribes the audio with Whisper and patches captions into the composition (use --skip-transcribe to disable).--tailwind injects the pinned Tailwind v4 browser runtime into scaffolded HTML and exposes a window.__tailwindReady promise that renders wait on before capturing frame 0. Use the /tailwind skill when editing these projects so agents follow v4 CSS-first patterns instead of v3 tailwind.config.js and @tailwind directive patterns. The browser runtime is still intended for scaffolded projects and quick iteration; for fully offline or locked-down production renders, compile Tailwind to CSS and include the stylesheet directly.After scaffolding, the CLI installs AI coding skills for Claude Code, Gemini CLI, and Codex CLI (use --skip-skills to disable). See skills command.See Examples for full details.add
Install a block or component from the registry into an existing project. Examples (full projects) are scaffolded with init; blocks and components are smaller units you add to a composition you already have.add reads hyperframes.json at the project root to know which registry to pull from and where to drop files. If the file is missing but the directory looks like a Hyperframes project (has index.html), a default hyperframes.json is written the first time you run add.Output for a block or component is a set of files plus a paste snippet — the <iframe> tag (for blocks) or the fragment path (for components) to include in your host composition. The snippet is copied to the clipboard by default; add --no-clipboard for CI or headless environments.Trying add with an example’s name (e.g. hyperframes add warm-grain) emits a clear error pointing you at init --example.catalog
Browse the registry — list available blocks and components with optional filters:Default output is a table listing name, type, description, and tags — designed for agents to parse.
--json produces structured output. --human-friendly opens an interactive picker that runs add on selection.compositions
List all compositions in the current project:Shows each composition’s ID, duration, resolution, and element count.
transcribe
Transcribe audio/video to word-level timestamps, or import an existing transcript:The command auto-detects the input type. Audio/video files are transcribed with whisper.cpp. Transcript files (
.json, .srt, .vtt) are normalized and imported.Supported transcript formats:All formats are normalized to a standard
[{text, start, end}] word array and saved as transcript.json. If the project has caption HTML files, they are automatically patched with the transcript data.tts
Generate speech audio from text using a local AI model (Kokoro-82M). No API key required — runs entirely on-device.remove-background
Remove the background from a video or image using a local AI model. The output is transparent media you can drop into any composition’s <video> or <img> element — no green screen required.The model is
u2net_human_seg (MIT, ~168 MB ONNX). Weights download to ~/.cache/hyperframes/background-removal/models/ on first run and are reused thereafter. Peak inference RAM is ~1.5 GB.--device auto picks CoreML on Apple Silicon, CUDA when available, and CPU otherwise. The CLI bundles the CPU build of onnxruntime-node; for CUDA, set HYPERFRAMES_CUDA=1 and provide a GPU-enabled onnxruntime-node build.Output formats:See the Remove Background guide for the full workflow — using transparent videos in compositions, performance per platform, limitations of
u2net_human_seg, and free alternative tools when this model isn’t the right fit.capture
Capture a website — extract screenshots, design tokens, fonts, assets, and animations for video production:The capture command extracts everything an AI agent needs to understand a website’s visual identity: viewport screenshots at every scroll depth, color palette (pixel-sampled + DOM computed), font files, images with semantic names, SVGs, Lottie animations, video previews, WebGL shaders, visible text, and page structure.Output is a self-contained directory with a
CLAUDE.md file that any AI agent can read to understand the captured site. Used by the /website-to-hyperframes skill as step 1 of the video production pipeline.Set GEMINI_API_KEY in a .env file for AI-powered image descriptions via Gemini vision (~$0.001/image). See the Website to Video guide for details.hyperframes.json
hyperframes init writes a hyperframes.json file at the root of every new project. hyperframes add reads it to know which registry to pull items from and where to drop them. Edit the file (or delete it to fall back to defaults) to reshape your project layout or point at a custom registry.
Missing fields are filled with defaults — you only need to specify what you want to override.
Related Packages
Producer
The rendering pipeline the CLI calls under the hood. Use directly for programmatic rendering.
Studio
The editor UI that powers
hyperframes preview. Use directly to embed in your own app.Core
Types, linter, and runtime. Use directly for custom tooling and integrations.
Engine
The capture engine. Use directly for custom frame capture pipelines.