hyperframes-cli

影像 / 音视频 视频与文档 命令行 11 文件 EN 原文

Hyperframes 命令行

用 CLI 初始化、预览与渲染视频项目。

说明语言:中英混合

原文描述EN

Use the HyperFrames CLI development loop: init, add, catalog, capture, lint, check, snapshot, compare, grade-compare, preview, play, present, beats, keyframes, single or batch render, publish, cloud, cloudrun, feedback, lambda, doctor, browser, info, upgrade, skills, compositions, timeline, history, clean, docs, benchmark, telemetry, transcribe, auth, tts, and remove-background. Also use when diagnosing build or render failures. validate, inspect, and layout are deprecated aliases; use check. Covers local, HeyGen-hosted cloud, AWS Lambda, and Google Cloud Run rendering.

来源heygen-comhyperframes ↗ 查看原文件 ↗版权归原作者,请遵循原仓库许可
安装
npx skills add https://github.com/heygen-com/hyperframes --skill hyperframes-cli

需要已安装 skills CLI。也可以直接从源仓库 clone。

在星云中查看 ↗
SKILL.md 原文

name: hyperframes-cli description: > Use the HyperFrames CLI development loop: init, add, catalog, capture, lint, check, snapshot, compare, grade-compare, preview, play, present, beats, keyframes, single or batch render, publish, cloud, cloudrun, feedback, lambda, doctor, browser, info, upgrade, skills, compositions, timeline, history, clean, docs, benchmark, telemetry, transcribe, auth, tts, and remove-background. Also use when diagnosing build or render failures. validate, inspect, and layout are deprecated aliases; use check. Covers local, HeyGen-hosted cloud, AWS Lambda, and Google Cloud Run rendering. ---

Plugin installs: Before setup or freshness commands, follow plugin execution rules when this skill is inside a HyperFrames plugin. Standalone installs keep the update instructions below.

HyperFrames CLI

Run commands as npx hyperframes ... unless project instructions provide a wrapper. Obey the wrapper when present. The CLI requires Node.js 22 or newer and FFmpeg.

Development loop

  1. Scaffold: npx hyperframes init <project> (centered blank). Or capture a site. Pass --example=<name> only to start from a named example.
  2. Find the move: if the request names an asset, sound, image, voice or fast visual edit, resolve it through /media-use before proposing a plan. Otherwise, before authoring motion by hand, search for a primitive that already does it: npx hyperframes catalog --query "reveal a headline one line at a time". Ask for the effect you want rather than the mechanism you have in mind. Install with npx hyperframes add <name> (see /hyperframes-registry). Author by hand only once nothing fits.
  3. Author: write the composition using /hyperframes-core. To know what is on a project's timeline (tracks, clips, starts, ends, what plays), run npx hyperframes timeline --json instead of reading index.html and every sub-composition file: nested rows carry absolute main-timeline absStart/absEnd and their owning file, not just their local, per-sub-composition time. Prefer --json over the text form; it costs fewer tokens for the same or better correctness. See references/upgrade-info-misc.md for one-liners that answer common questions without reading the whole output.
  4. Get fast feedback while editing: run npx hyperframes lint after the first HTML pass and after structural changes.
  5. Run the final gate: run npx hyperframes check; it reruns lint before opening the browser. Do not prepend a redundant standalone lint invocation. Add --snapshots for annotated overview frames and finding crops.
  6. Inspect sub-compositions: when index.html mounts data-composition-src, capture midpoint snapshots and inspect each mounted scene. Inspect the opening 30 seconds and reported problem times at full resolution; zoom into fine geometry, text, and WebGL edges rather than judging a contact sheet alone.
  7. Open the final Studio preview: run npx hyperframes preview --background, verify the URL returns HTTP 200, hand the timeline project URL to the user, and ask whether to revise or render. Keep it alive until review ends.
  8. Render only after approval: use --quality draft while iterating, --quality looks for the first real encode (the CLI default), and --quality delivery for final delivery.
  9. Hand the project to the desktop app (on offer): when the render's Framey line ends in hyperframes open …, offer npx hyperframes open [dir]. It opens the project in the HyperFrames desktop app and adds it to Home; under Claude Code, Codex or Grok its chat picks up this conversation. Without the app it exits 1 and prints the download link. --json for agents. When open says to run catch-up once the person is back, or any command ends with a line naming it, run npx hyperframes catch-up [dir] before your next change: it lists what was asked and changed in the app since the hand-off. An older CLI has no catch-up.
  10. Verify the output: confirm the file exists and is non-empty. Read the render summary's second line (beginframe vs screenshot, GPU, stage timings). screenshot + software gpu on Linux is the slow path. ffprobe -v error -show_format -show_streams and compare duration (and fps if the brief set it) to the root data-duration. Visually inspect decoded output frames at the same times as the preview, including close-ups; a successful check or encode does not certify the pixels inside a canvas.

<!-- history (trial): remove this block together with the command -->

Project history in your turn

Every write to the project is kept as an entry that can be undone. Use it at two moments only, never on every step:

End each turn with npx hyperframes history end, so your writes read as yours, not as "Changed outside the app". While a turn is open, every write to the project counts as yours until 10 minutes pass without one; after that the turn has ended by itself.

<!-- /history (trial) -->

Mandatory creator-edit cross-references

# Fast iteration check; repeat while authoring as needed.
npx hyperframes lint

# Required final gate; includes lint.
npx hyperframes check
npx hyperframes preview --background
npx hyperframes render --quality looks --output out.mp4
test -s out.mp4
ffprobe -v error -show_format -show_streams out.mp4

check runs lint first, then uses one browser session and one seek pass to audit runtime errors, failed requests, layout, *.motion.json assertions, and WCAG contrast. Persistent findings gate the exit code; transient entrance or exit findings are informational. Use --strict to gate warnings. validate, inspect, and layout remain aliases for compatibility but must not appear in new instructions or scripts.

Preview before render

Open the final composition preview (#project/<name>) only after check passes, to review the assembled timeline. The plan in chat and the storyboard board (boards/storyboard.html, format in hyperframes-creative/references/storyboard-recipe.md) are not approval of the final video. Rendering always requires the final approval defined by hyperframes/references/review-loop.md.

Sub-composition smoke test

Static audits cannot catch every mount failure. When the project uses sub-compositions, capture at least one visible midpoint for each host slot:

npx hyperframes snapshot --at <t1>,<t2>,<t3>
# For multiple samples within one scene or interval:
npx hyperframes snapshot --composition <data-composition-id> --frames 8
npx hyperframes snapshot --range 3:5 --frames 8

Treat tiny unstyled content, canvas-sized icons, missing hero elements, or timeline-registration timeouts as render-blocking mount defects. See hyperframes-core/references/sub-compositions.md for the corresponding fixes.

Agent conventions

  npx hyperframes doctor --json | jq -e '.ok' >/dev/null

Studio-directed edits

When the user refers to “this element” or the current selection, query Studio instead of guessing:

npx hyperframes preview --context --json --context-fields selection

Use selection.target.hfId when available, otherwise its selector and source file. If the result reports no-selection, ask the user to click the element and rerun. Request only the context slices you need; use --context-detail full only for computed styles or editable text metadata. Full behavior and failure codes live in references/preview-render.md.

Render choices

NeedCommand
Fast local iterationnpx hyperframes render --quality draft
First real encodenpx hyperframes render --quality looks --output out.mp4
Final local deliverynpx hyperframes render --quality delivery --output out.mp4
Reproducible container rendernpx hyperframes render --docker --strict --output out.mp4
Local variable-driven batch rendernpx hyperframes render --batch rows.json --output "renders/{name}.mp4"
HeyGen-hosted zero-infrastructure rendernpx hyperframes cloud render
Self-managed distributed AWS rendernpx hyperframes lambda render <project> --width 1920 --height 1080 --wait
Self-managed distributed GCP rendernpx hyperframes cloudrun render <project> --width 1920 --height 1080 --wait

A render stops when whatever started it stops, so a Ctrl-C or a closed terminal never leaves Chrome running. If your tool kills its whole process group when a command times out or ends, a long render dies with it. Start such a render in its own process group with HYPERFRAMES_RENDER_DETACHED=1, for example bash -c 'set -m; HYPERFRAMES_RENDER_DETACHED=1 npx hyperframes render --output out.mp4 < /dev/null > render.log 2>&1 &' (works on macOS and Linux), then check the log and the output file instead of waiting on the command.

Skill attribution is automatic — the examples above need no --skill. A project scaffolded by a workflow (hyperframes init --skill=<workflow>) records its owning skill in hyperframes.json, and every later render inherits it on anonymous telemetry: re-renders, npm run render, and --batch alike. Pass --skill=<slug> explicitly only to stamp a project that was not created through a workflow (its first render then persists it).

Use cloud rendering when the user wants hosted rendering without local Chrome, FFmpeg, or AWS. Use Lambda only when AWS ownership is a requirement. Use Cloud Run only when GCP ownership is a requirement. Read the matching reference before running any cloud path.

After verifying a successful render, send one feedback report unless telemetry is disabled or the user opted out:

npx hyperframes feedback --rating <0-10> --comment "<specific result or friction>"

Keep clean-run feedback concise. For any bug or friction, capture a reproduction packet before submitting; do not send only a symptom summary. Include the rerunnable command (relative to the project directory — feedback is submitted to a public channel, so do not paste absolute paths, home-directory prefixes, or user/machine identifiers), expected versus actual behavior, exact error (also strip absolute paths from stack traces — keep basename + line, drop the leading directory), whether output completed/fell back/failed, workaround, and repro-project status. For a rating ≤ 7 that describes a visual defect (black frame, flicker, corrupt output, wrong frame, blank output, other visual anomaly), also include a COMPOSITION_STRUCTURE: block — a privacy-preserving structural anatomy (element census + attribute presence + timeline shape) so maintainers can pattern-match against known bug families without the composition ZIP. Agents auto-fill this via the composition-census helper; the human user does not fill it by hand. If the issue did not reproduce again, say so and still include the last failing command and logs. Use --file-issue only with consent: it publishes a minimal reproduction to a public URL. The required packet format and privacy warning live in references/preview-render.md.

Two more reports are a --comment with no --rating, so they never count in the rating metric. Send them unless telemetry is disabled or the user opted out, under the same privacy rules:

Read the matching reference before running a command

The following references and owning skills are mandatory command contracts, not optional background reading. Before running a command in the table, read its matching row.

NeedReference
init, capture, skillsreferences/init-and-scaffold.md
lint, check, motion sidecars, snapshotreferences/lint-validate-inspect.md
compare, grade-compare, variable-driven render --batchreferences/compare-and-batch.md
beats for an existing project's Studio beat gridreferences/beats.md
preview, play, render, publish, Studio context, feedbackreferences/preview-render.md
doctor, browser managementreferences/doctor-browser.md
auth, HeyGen-hosted cloud rendering, and template variablesreferences/cloud.md
AWS Lambda deployment and renderingreferences/lambda.md
Google Cloud Run deployment and renderingreferences/cloudrun.md
info, upgrade, compositions, timeline, docs, benchmark, telemetry, media preprocessingreferences/upgrade-info-misc.md

For composition variables, also read /hyperframes-core → references/variables-and-media.md. For hyperframes add and hyperframes catalog, use /hyperframes-registry. Before hyperframes present, read /slideshow; before hyperframes keyframes, read /hyperframes-keyframes. For TTS, transcription, captions, or background removal choices, use /media-use.

The specialized commands are deliberately documented by their owning workflows:

npx hyperframes present <project-dir> --port 3004 --no-open
npx hyperframes beats <project-dir> --json
npx hyperframes keyframes <project-dir> --json
npx hyperframes media-treatment --capabilities
npx hyperframes figma asset KEY:10-20

present serves a navigable deck with presenter and audience synchronization. beats is the standalone Studio beat-grid utility defined in references/beats.md. keyframes surfaces seek-safe animation and motion-path diagnostics. media-treatment discovers, applies, and clears deterministic looks on local footage — start with --capabilities for the overview and --capability <name> for one family; /media-use owns which treatment a brief is asking for. figma imports over the REST API with the asset, tokens, and component subcommands and needs FIGMA_TOKEN; motion and shader import have no REST endpoint and are agent-only, so /figma owns those.

Commands you should not run

Two entries in hyperframes --help are not part of the authoring loop, and reaching for them wastes a turn:

Remaining harness usage

Run npx hyperframes usage --json at the start of a video workflow and again at milestones such as after drafting and before rendering. A fresh read at handoff can serve as the start read. Use --harness claude-code, --harness codex, or --harness grok to select explicitly.

Known results contain status: "known", harness, planTier, session, weekly, and spend. Each available window contains usedPercent, remainingPercent, and resetsAt; an unavailable window is null. planTier is the readable subscription tier when available, otherwise null. Claude Code reports its shared five-hour and weekly windows; a spend-metered plan (such as Enterprise) has neither and reports spend, the share of its billing-period spend limit already used, with resetsAt: null. Codex reports its shared session and weekly windows when available. Grok reports its included weekly allowance with session: null. Only Claude Code reports spend; it is null elsewhere. When no window is available the result is status: "unknown" with reason: "no_usage_windows".

Unknown results contain status: "unknown" and a token-free reason. Missing, expired, unsupported, ambiguous, or unreadable logins and unavailable provider responses return unknown. Report the unknown state without guessing allowance. The command reads existing credentials without refreshing or rewriting them and emits no tokens or telemetry. Usage is a snapshot; it does not reserve allowance or estimate the next video's cost. Keep scope and workflow choices with the user.

同类技能
document-illustratorembedded-captionsfaceless-explainerhyperframeshyperframes-animationhyperframes-coreinfographicsmd-to-pptx
本页内容来自开源项目 heygen-com, 版权归原作者所有。
本站仅作技能索引与分享,所有 Skill 版权归其原作者所有。