HyperFrames CLI
すべては npx hyperframes で実行します。Node.js >= 22 と FFmpeg が必要です。
ワークフロー
- スキャフォールディング —
npx hyperframes init my-video - 作成 — HTML コンポジションを記述(
hyperframesスキルを参照) - リント —
npx hyperframes lint(静的チェック) - 検証 —
npx hyperframes validate(ブラウザベースのランタイムチェック + コントラスト監査) - プレビュー —
npx hyperframes preview - レンダリング —
npx hyperframes render
リントは静的な問題(data-composition-id の欠落、重複トラック、未登録のタイムライン)を検出します。検証は実際のブラウザで一時停止したコンポジション内をシークし、ランタイム/視覚的な問題(コントラスト、壊れたオーバーレイ、欠落アセット)を検出します。レンダリング前に両方を実行してください。
検証
npx hyperframes validate # 完全検証(静的 + コントラスト + コントラクト)
npx hyperframes validate --no-contrast # 高速イテレーション時に WCAG コントラスト監査をスキップ
npx hyperframes validate --json # 機械可読な出力
検証はコンポジション内の複数のタイムスタンプにシークし、ページのスクリーンショットを撮り、すべてのテキスト要素の背後にあるピクセルをサンプリングして WCAG コントラスト比を計算し、ランタイムコントラクト(window.__timelines の登録、class="clip" の存在、有効な data-* 属性)を検証します。すべてのレンダリング前に実行してください。低コストで、リントでは見えない問題を捕捉します。
スキャフォールディング
npx hyperframes init my-video # インタラクティブウィザード
npx hyperframes init my-video --example warm-grain # 例を選択
npx hyperframes init my-video --video clip.mp4 # ビデオファイル付き
npx hyperframes init my-video --audio track.mp3 # オーディオファイル付き
npx hyperframes init my-video --non-interactive # プロンプトをスキップ(CI/エージェント向け)
テンプレート: blank、warm-grain、play-mode、swiss-grid、vignelli、decision-tree、kinetic-type、product-promo、nyt-graph。
init は適切なファイル構造を作成し、メディアをコピーし、Whisper で音声を文字起こしし、AI コーディングスキルをインストールします。手動でファイルを作成する代わりに使用してください。
リント
npx hyperframes lint # カレントディレクトリ
npx hyperframes lint ./my-project # 特定のプロジェクト
npx hyperframes lint --verbose # 情報レベルの発見事項
npx hyperframes lint --json # 機械可読
index.html と compositions/ 内の全ファイルをリントします。エラー(修正必須)、警告(修正推奨)、情報(--verbose 時)を報告します。
プレビュー
npx hyperframes preview # カレントディレクトリをサーブ
npx hyperframes preview --port 4567 # カスタムポート(デフォルト 3002)
ファイル変更時にホットリロードします。ブラウザでスタジオが自動的に開きます。
レンダリング
npx hyperframes render # 標準 MP4
npx hyperframes render --output final.mp4 # 出力先を指定
npx hyperframes render --quality draft # 高速イテレーション
npx hyperframes render --fps 60 --quality high # 最終納品
npx hyperframes render --format webm # 透明 WebM
npx hyperframes render --docker # バイト同一出力
| フラグ | オプション | デフォルト | 備考 |
|---|---|---|---|
--output | パス | renders/名前_タイムスタンプ.mp4 | 出力パス |
--fps | 24, 30, 60 | 30 | 60fps はレンダリング時間が2倍 |
--quality | draft, standard, high | standard | draft はイテレーション用 |
--format | mp4, webm | mp4 | WebM は透明度をサポート |
--workers | 1-8 または auto | auto | 各ワーカーが Chrome を起動 |
--docker | フラグ | off | 再現可能な出力 |
--gpu | フラグ | off | GPU アクセラレーションエンコーディング |
--strict | フラグ | off | リントエラーで失敗 |
--strict-all | フラグ | off | エラーと警告の両方で失敗 |
品質ガイダンス: イテレーション中は draft、レビューには standard、最終納品には high を使用してください。
文字起こし
npx hyperframes transcribe audio.mp3
npx hyperframes transcribe video.mp4 --model medium.en --language en
npx hyperframes transcribe subtitles.srt # 既存のものをインポート
npx hyperframes transcribe subtitles.vtt
npx hyperframes transcribe openai-response.json
テキスト音声合成
npx hyperframes tts "ここにテキスト" --voice af_nova --output narration.wav
npx hyperframes tts script.txt --voice bf_emma
npx hyperframes tts --list # すべての音声を表示
トラブルシューティング
npx hyperframes doctor # 環境をチェック(Chrome、FFmpeg、Node、メモリ)
npx hyperframes browser # バンドルされた Chrome を管理
npx hyperframes info # バージョンと環境の詳細
npx hyperframes upgrade # アップデートを確認
レンダリングが失敗したら最初に doctor を実行してください。よくある問題: FFmpeg の欠落、Chrome の欠落、メモリ不足。
その他
npx hyperframes compositions # プロジェクト内のコンポジション一覧
npx hyperframes docs # ドキュメントを開く
npx hyperframes benchmark . # レンダリングパフォーマンスのベンチマーク