CLI de HyperFrames
npm install -g hyperframes # o usa npx
Comandos
init
npx hyperframes init <nombre> [--template blank|product|explainer|slideshow] [--fps 30] [--width 1920] [--height 1080]
lint
npx hyperframes lint [archivo] [--fix] [--strict] [--json]
Verifica: atributos data-hf-* válidos, formatos de tiempo, clips superpuestos, duraciones faltantes, activos inalcanzables, límites de longitud de TTS.
preview
npx hyperframes preview [archivo] [--port 3000] [--open] [--scene <nombre>] [--time <t>]
Servidor de desarrollo en vivo con scrubber, selector de escenas y recarga en caliente.
render
export HEYGEN_API_KEY=tu_clave
npx hyperframes render [archivo] [--out salida.mp4] [--format mp4|webm|gif] [--quality 85] [--scene <nombre>]
doctor
npx hyperframes doctor
Verifica Node ≥ 18, clave API, red, rutas de activos, sintaxis de configuración.
hyperframes.config.json
{
"version": 1,
"entry": "index.html",
"output": "./output.mp4",
"canvas": { "width": 1920, "height": 1080, "fps": 30 },
"render": { "quality": 85, "format": "mp4" },
"tts": { "defaultVoice": "en-US-neural-f1", "speed": 1.0 },
"assets": { "baseUrl": "./assets" }
}
Variables de Entorno
| Variable | Descripción |
|---|---|
HEYGEN_API_KEY | requerida para render |
HEYGEN_REGION | us (por defecto) o eu |
HF_LOG_LEVEL | debug, info, warn, error |
Bucle de Desarrollo
npx hyperframes init my-video --template product
cd my-video
# editar index.html
npx hyperframes lint
npx hyperframes preview --open
npx hyperframes render --out salida.mp4