Applied a pass of review feedback that concentrates on correctness,
shared constants, and cleanup.
- Lift ITEM_TYPE_DIRS to @hyperframes/core/registry. Replaces an
exhaustiveness-fragile switch in remote.ts and the hardcoded
"examples" literal in scripts/generate-registry-items.ts. One
constant, three consumers, checked against the ItemType union.
- remote.ts readCache: drop existsSync pre-check (TOCTOU double
syscall) and rely on the existing try/catch for cache miss.
- templates/remote.ts: hoist the listRegistryItems/loadAllItems
dynamic import to static — had no reason to be async-lazy.
- resolver.ts loadAllItems: accept an optional onWarn callback
instead of calling console.warn directly. Default writes to stderr
with a "hyperframes:registry" prefix so structured output (JSON,
clack prompts) can opt in to silence.
- Scrub PR-number references from inline comments in the registry
and compat-shim files. Intent language instead ("future item types",
"compat shim for legacy init.ts callers").
- Fix stale test description in remote.test.ts that claimed PR 3
renamed MANIFEST_FILENAME to registry.json (the rename didn't
happen — the filename stays templates.json for the compat shim).
Skipped (documented as intentional in PR thread):
- Lifting assertSafeTarget to @hyperframes/core — CLI-specific
concern, keeps core lean
- Extracting readCache/writeCache to utils/cache.ts — one consumer
today; revisit when the CLI gets a second
- Hashing the cache-key slug — theoretical collision for a single-
digit registry count; revisit when PR 14 adds custom registries
- Removing assertSafeTarget's layered checks — reviewer confirmed
defense-in-depth is worth keeping for diagnostic clarity
Core: 452 tests pass. CLI: 70 tests pass (4 pre-existing failures
unchanged, unrelated to this PR). Format + lint clean.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
hyperframes
CLI for creating, previewing, and rendering HTML video compositions.
Install
npm install -g hyperframes
Or use directly with npx:
npx hyperframes <command>
Requirements: Node.js >= 22, FFmpeg
Commands
init
Scaffold a new Hyperframes project from a template:
npx hyperframes init my-video
cd my-video
preview
Start the live preview studio in your browser:
npx hyperframes preview
# Studio running at http://localhost:3002
npx hyperframes preview --port 4567
render
Render a composition to MP4:
npx hyperframes render ./my-composition.html -o output.mp4
lint
Validate your Hyperframes HTML:
npx hyperframes lint ./my-composition
npx hyperframes lint ./my-composition --json # JSON output for CI/tooling
npx hyperframes lint ./my-composition --verbose # Include info-level findings
By default only errors and warnings are shown. Use --verbose to also display informational findings (e.g., external script dependency notices). Use --json for machine-readable output with errorCount, warningCount, infoCount, and a findings array.
compositions
List compositions found in the current project:
npx hyperframes compositions
benchmark
Run rendering benchmarks:
npx hyperframes benchmark ./my-composition.html
doctor
Check your environment for required dependencies (Chrome, FFmpeg, Node.js):
npx hyperframes doctor
browser
Manage the bundled Chrome/Chromium installation:
npx hyperframes browser
info
Print version and environment info:
npx hyperframes info
docs
Open the documentation in your browser:
npx hyperframes docs
upgrade
Check for updates and show upgrade instructions:
npx hyperframes upgrade
npx hyperframes upgrade --check --json # machine-readable for agents
Documentation
Full documentation: hyperframes.heygen.com/packages/cli
Related packages
@hyperframes/core— types, parsers, frame adapters@hyperframes/engine— rendering engine@hyperframes/producer— render pipeline@hyperframes/studio— composition editor UI