Communitygithub.com

christiansalazar-wk/ai-lore

HyperFrames CLI 開發循環 — 提供 init、lint、preview、render 與 doctor 指令,支援在地端開發與測試。

ai-lore 是什麼?

HyperFrames CLI 是一個專為影片腳本開發者設計的命令列工具,讓您能在本機端快速建立、檢查、預覽與輸出影片專案。它透過五個核心指令(init、lint、preview、render、doctor)形成完整的開發循環。init 可依範本建立結構,lint 檢查 data-hf-* 屬性、時間格式等常見錯誤,preview 提供即時預覽伺服器並支援場景切換與熱重載,render 需 HEYGEN_API_KEY 以輸出 mp4/webm/gif 影片,doctor 則驗證環境與設定。支援 Node 18 以上,並可透過 hyperframes.config.json 設定畫布、TTS 語音與資源路徑。適用於 Claude Code、Cursor、Codex 等 AI 代理工具,協助開發者高效迭代影片專案。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/christiansalazar-wk/ai-lore/tree/HEAD/skills/hyperframes-cli

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

HyperFrames CLI

npm install -g hyperframes   # 或使用 npx

指令

init

npx hyperframes init <名稱> [--template blank|product|explainer|slideshow] [--fps 30] [--width 1920] [--height 1080]

lint

npx hyperframes lint [檔案] [--fix] [--strict] [--json]

檢查項目:有效的 data-hf-* 屬性、時間格式、重疊片段、缺少持續時間、無法存取的資源、TTS 長度限制。

preview

npx hyperframes preview [檔案] [--port 3000] [--open] [--scene <名稱>] [--time <t>]

提供即時開發伺服器,包含時間軸拖曳、場景選擇與熱重載功能。

render

export HEYGEN_API_KEY=your_key
npx hyperframes render [檔案] [--out output.mp4] [--format mp4|webm|gif] [--quality 85] [--scene <名稱>]

doctor

npx hyperframes doctor

檢查 Node 版本 ≥ 18、API 金鑰、網路連線、資源路徑與設定語法。

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" }
}

環境變數

變數說明
HEYGEN_API_KEY渲染時必須提供
HEYGEN_REGIONus(預設)或 eu
HF_LOG_LEVELdebug、info、warn、error

開發循環

npx hyperframes init my-video --template product
cd my-video
# 編輯 index.html
npx hyperframes lint
npx hyperframes preview --open
npx hyperframes render --out output.mp4

Individual skills in this repo

This repo contains 6 individual skills — each has its own dedicated page.

相關技能