Skip to content

Commit 9cbfec1

Browse files
vanceingallsclaude
andauthored
feat(skills): add hyperframes-cli skill (heygen-com#154)
* feat(skills): add hyperframes-cli skill for CLI workflow guidance Adds a new skill that teaches AI agents how to use the HyperFrames CLI (init, lint, dev, render, doctor). Previously, agents had no way to discover the CLI — the compose-video skill only covered HTML authoring. This led to agents searching for binaries, finding the monorepo, and running bun run studio manually instead of using npx hyperframes dev. Also registers the skill in init.ts so new projects get it bundled alongside hyperframes-compose and hyperframes-captions. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * refactor(cli): rename dev command to preview The command starts a preview server — "preview" describes what users are doing more accurately than "dev". Updates the command name, file name, all CLI references, docs, skills, and template CLAUDE.md. 22 files updated across CLI source, docs, skills, and templates. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(skills): replace stale dev reference with preview in CLI skill Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(docs): catch remaining dev references missed in rename - testing-local-changes.mdx: two inline command examples - troubleshooting.mdx: anchor link #dev → #preview, "dev server" → "preview server" - cli.mdx: "dev server" → "preview server" Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent bc956bb commit 9cbfec1

22 files changed

Lines changed: 172 additions & 53 deletions

File tree

DOCS_GUIDELINES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ window.__timelines["my-video"] = tl;
9090
After CLI commands, show what the user should see:
9191

9292
```bash
93-
npx hyperframes dev
93+
npx hyperframes preview
9494
# ✓ Server running at http://localhost:3000
9595
# ✓ Watching for changes...
9696
```

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ cd my-video
2525
Then open the project with your AI coding agent (Claude Code, Cursor, etc.) — it has HyperFrames skills installed and knows how to create and edit compositions.
2626

2727
```bash
28-
npx hyperframes dev # preview in browser (live reload)
28+
npx hyperframes preview # preview in browser (live reload)
2929
npx hyperframes render # render to MP4
3030
```
3131

docs/contributing/testing-local-changes.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Testing Local CLI Changes
33
description: How to test unreleased CLI changes outside the monorepo using your local build.
44
---
55

6-
When you modify the CLI or any package it bundles (core, engine, producer, studio), you need to test those changes against real projects _outside_ the monorepo — the same way an end user would run `hyperframes dev`.
6+
When you modify the CLI or any package it bundles (core, engine, producer, studio), you need to test those changes against real projects _outside_ the monorepo — the same way an end user would run `hyperframes preview`.
77

88
## Prerequisites
99

@@ -37,7 +37,7 @@ Now use `hyperframes` normally in any directory:
3737

3838
```bash
3939
cd ~/my-video-project
40-
hyperframes dev .
40+
hyperframes preview .
4141
```
4242

4343
**After every `pnpm build`** the linked binary is already up to date — no re-linking needed.
@@ -58,7 +58,7 @@ If you don't want to touch your global `$PATH`, add a shell alias or call `node`
5858
alias hyperframes="node /path/to/hyperframes-oss/packages/cli/dist/cli.js"
5959

6060
# Or invoke directly
61-
node /path/to/hyperframes-oss/packages/cli/dist/cli.js dev .
61+
node /path/to/hyperframes-oss/packages/cli/dist/cli.js preview .
6262
```
6363

6464
Replace `/path/to/hyperframes-oss` with your actual monorepo path.
@@ -76,7 +76,7 @@ npm pack
7676
mkdir /tmp/pack-test && cd /tmp/pack-test
7777
npx /path/to/hyperframes-oss/packages/cli/hyperframes-<version>.tgz init my-video
7878
cd my-video
79-
npx /path/to/hyperframes-oss/packages/cli/hyperframes-<version>.tgz dev .
79+
npx /path/to/hyperframes-oss/packages/cli/hyperframes-<version>.tgz preview .
8080
```
8181

8282
## Testing the fix branches
@@ -86,7 +86,7 @@ When validating a specific bug fix, extract one of the test project archives and
8686
```bash
8787
# Example: testing audio-after-seek fix
8888
unzip golden-lyric-video.zip && cd golden-lyric-video
89-
hyperframes dev .
89+
hyperframes preview .
9090
# 1. Press Play — confirm audio plays
9191
# 2. Drag the timeline scrubber to a different position
9292
# 3. Press Play again — audio should resume from the seeked position
@@ -129,8 +129,8 @@ cd packages/cli && pnpm link --global
129129

130130
**Port already in use**
131131

132-
`hyperframes dev` defaults to port 3002 and auto-increments if it's taken. Pass `--port` to use a specific port:
132+
`hyperframes preview` defaults to port 3002 and auto-increments if it's taken. Pass `--port` to use a specific port:
133133

134134
```bash
135-
hyperframes dev . --port 4000
135+
hyperframes preview . --port 4000
136136
```

docs/guides/rendering.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Render your Hyperframes [compositions](/concepts/compositions) to MP4 with the [
2929
Before rendering, preview your composition in the browser to verify it looks correct:
3030

3131
```bash Terminal
32-
npx hyperframes dev
32+
npx hyperframes preview
3333
```
3434
</Step>
3535
<Step title="Render to MP4">

docs/guides/troubleshooting.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,12 @@ If your issue is about a specific coding mistake (animations not working, video
6161
</Accordion>
6262

6363
<Accordion title="Preview not updating">
64-
Make sure you are editing the `index.html` in the project directory. The [preview server](/packages/cli#dev) watches for file changes and auto-reloads.
64+
Make sure you are editing the `index.html` in the project directory. The [preview server](/packages/cli#preview) watches for file changes and auto-reloads.
6565

6666
If changes still do not appear:
6767

68-
1. Check the terminal for errors from the dev server
69-
2. Stop and restart `npx hyperframes dev`
68+
1. Check the terminal for errors from the preview server
69+
2. Stop and restart `npx hyperframes preview`
7070
3. Hard-refresh the browser: **Ctrl+Shift+R** (Windows/Linux) or **Cmd+Shift+R** (macOS)
7171
4. Clear the browser cache if CSS changes are not reflected
7272
</Accordion>

docs/introduction.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Run `npx hyperframes render --output demo.mp4` and this produces an MP4 with det
5454
Define your video as an HTML document. Each element gets data attributes for timing (`data-start`, `data-duration`) and layout (`data-track-index`). Add animations with GSAP, Lottie, CSS transitions, or any seekable runtime via the Frame Adapter pattern.
5555
</Step>
5656
<Step title="Preview in the browser">
57-
Run `npx hyperframes dev` to open a live preview in your browser. Edit your HTML and see changes instantly — no build step, no compilation.
57+
Run `npx hyperframes preview` to open a live preview in your browser. Edit your HTML and see changes instantly — no build step, no compilation.
5858
</Step>
5959
<Step title="Render to MP4">
6060
Run `npx hyperframes render --output output.mp4` to produce a final video. The engine seeks each frame in headless Chrome, captures it with `beginFrame`, and pipes the result through FFmpeg. Run locally or in Docker for fully reproducible output.

docs/packages/cli.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ This is suppressed in CI environments, non-TTY shells, and when `HYPERFRAMES_NO_
106106
Start the development server with live hot reload:
107107
```bash
108108
cd my-video
109-
npx hyperframes dev
109+
npx hyperframes preview
110110
```
111111
The Hyperframes Studio opens in your browser. Edit `index.html` and the preview updates instantly.
112112
</Step>
@@ -227,23 +227,23 @@ This is suppressed in CI environments, non-TTY shells, and when `HYPERFRAMES_NO_
227227
For music or noisy audio, use `--model medium.en` for better accuracy. For the best results with production content, transcribe via the OpenAI or Groq Whisper API and import the JSON.
228228
</Tip>
229229
</Tab>
230-
<Tab title="Develop">
231-
### `dev`
230+
<Tab title="Preview">
231+
### `preview`
232232

233233
Start a live preview server with hot reload:
234234

235235
```bash
236-
npx hyperframes dev [dir]
237-
npx hyperframes dev --port 4567
236+
npx hyperframes preview [dir]
237+
npx hyperframes preview --port 4567
238238
```
239239

240240
| Flag | Description |
241241
|------|-------------|
242-
| `--port` | Port to run the dev server on (default: 3002) |
242+
| `--port` | Port to run the preview server on (default: 3002) |
243243

244244
Opens your composition in the Hyperframes Studio with live preview. Edits to `index.html` and any referenced sub-compositions are reflected automatically. The preview uses the same Hyperframes runtime as production rendering, so what you see is what you get.
245245

246-
The dev server runs in three modes, auto-detected:
246+
The preview server runs in three modes, auto-detected:
247247

248248
1. **Embedded mode** (default for `npx`) — runs a standalone server with the studio bundled in the CLI. Zero extra dependencies.
249249
2. **Local studio mode** — if `@hyperframes/studio` is installed in your project's `node_modules`, spawns Vite with full HMR for faster iteration.
@@ -482,7 +482,7 @@ This is suppressed in CI environments, non-TTY shells, and when `HYPERFRAMES_NO_
482482
The rendering pipeline the CLI calls under the hood. Use directly for programmatic rendering.
483483
</Card>
484484
<Card title="Studio" icon="palette" href="/packages/studio">
485-
The editor UI that powers `hyperframes dev`. Use directly to embed in your own app.
485+
The editor UI that powers `hyperframes preview`. Use directly to embed in your own app.
486486
</Card>
487487
<Card title="Core" icon="cube" href="/packages/core">
488488
Types, linter, and runtime. Use directly for custom tooling and integrations.

docs/packages/core.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ npm install @hyperframes/core
2323
- Embed the Hyperframes runtime in a custom player
2424

2525
**Use a different package if you want to:**
26-
- Preview compositions in the browser — use the [CLI](/packages/cli) (`npx hyperframes dev`) or [studio](/packages/studio)
26+
- Preview compositions in the browser — use the [CLI](/packages/cli) (`npx hyperframes preview`) or [studio](/packages/studio)
2727
- Render compositions to MP4 — use the [CLI](/packages/cli) (`npx hyperframes render`) or [producer](/packages/producer)
2828
- Capture frames from a headless browser — use the [engine](/packages/engine)
2929

docs/packages/studio.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,20 @@ npm install @hyperframes/studio
1717
- Extend the editor with custom panels, toolbars, or integrations
1818

1919
**Use a different package if you want to:**
20-
- Preview compositions during development — use the [CLI](/packages/cli) (`npx hyperframes dev`), which launches the studio for you
20+
- Preview compositions during development — use the [CLI](/packages/cli) (`npx hyperframes preview`), which launches the studio for you
2121
- Render compositions to MP4 — use the [CLI](/packages/cli) or [producer](/packages/producer)
2222
- Capture frames programmatically — use the [engine](/packages/engine)
2323

2424
<Tip>
25-
**For most development workflows, you do not need to install the studio directly.** Running `npx hyperframes dev` starts the studio automatically with hot reload. Install `@hyperframes/studio` only if you are embedding the editor into your own application.
25+
**For most development workflows, you do not need to install the studio directly.** Running `npx hyperframes preview` starts the studio automatically with hot reload. Install `@hyperframes/studio` only if you are embedding the editor into your own application.
2626
</Tip>
2727

2828
## Running the Studio
2929

3030
### Via the CLI (recommended)
3131

3232
```bash
33-
npx hyperframes dev
33+
npx hyperframes preview
3434
```
3535

3636
This starts the studio development server, opens your composition in the browser, and watches for file changes. This is the easiest way to get a live preview.
@@ -239,7 +239,7 @@ export default {
239239

240240
<CardGroup cols={2}>
241241
<Card title="CLI" icon="terminal" href="/packages/cli">
242-
Launches the studio via `npx hyperframes dev` — the easiest way to preview compositions.
242+
Launches the studio via `npx hyperframes preview` — the easiest way to preview compositions.
243243
</Card>
244244
<Card title="Core" icon="cube" href="/packages/core">
245245
Types, parsing, and runtime that the studio uses for preview and timeline rendering.

docs/quickstart.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ A 1920x1080 video with an animated title that fades in from above — rendered t
102102

103103
<Step title="Preview in the browser">
104104
```bash
105-
npx hyperframes dev
105+
npx hyperframes preview
106106
```
107107

108108
This starts the Hyperframes Studio and opens your composition in the browser. Edits to `index.html` reload automatically.

0 commit comments

Comments
 (0)