Files
frames/docs/contributing/testing-local-changes.mdx
T
zooqueenandHanzo Dev 70b41673a3 frames: rebrand the fork to Hanzo Frames
Forked from HyperFrames (Apache-2.0), full history preserved.

Hosts are mapped explicitly and BEFORE the identifier rename, because
hyperframes.heygen.com is not decoration: 175 of its occurrences are $schema
identifiers that a validator dereferences. A blind rename would have left them
naming a host that never serves them. The schema files are in this repo under
docs/schema, so the mapped host is one we can actually serve -- that is the
condition that makes the rewrite safe, and serving them is a deploy task, not
an edit. docs/schema/hyperframes.json is renamed to frames.json to match the
identifier it is now published under.

api.heygen.com and the CLI auth against heygen.com are left UNRENAMED on
purpose. They are a dependency on HeyGen's SaaS, not a name of ours to take,
and the right move is to remove that integration rather than rebrand it.

LICENSE and CREDITS.md are untouched; NOTICE records the lineage.

Co-authored-by: Hanzo Dev <[email protected]>
2026-07-28 23:42:24 -07:00

133 lines
4.0 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: Testing Local CLI Changes
description: How to test unreleased CLI changes outside the monorepo using your local build.
---
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 `frames preview`.
## Prerequisites
Build the monorepo first. Every time you change source files, rebuild before testing.
```bash
# From the monorepo root
bun run build
```
## Option 1: bun link (recommended)
`bun link` makes the `frames` binary in your `$PATH` point at your local build. It survives across terminal sessions and auto-picks up new builds without re-linking.
```bash
# If you previously installed frames globally, remove it first —
# a global install takes priority over bun link and shadows your local build.
npm uninstall -g frames 2>/dev/null
# Link your local build
cd packages/cli
bun link
# Verify — should print your local version AND point to the monorepo
frames --version
which frames
```
Now use `frames` normally in any directory:
```bash
cd ~/my-video-project
frames preview .
```
**After every `bun run build`** the linked binary is already up to date — no re-linking needed.
To restore the published release when you're done:
```bash
bun unlink frames
npm install -g frames@latest
```
## Option 2: node alias (no PATH changes)
If you don't want to touch your global `$PATH`, add a shell alias or call `node` directly:
```bash
# Temporary alias for your current shell session
alias frames="node /path/to/frames/packages/cli/dist/cli.js"
# Or invoke directly
node /path/to/frames/packages/cli/dist/cli.js preview .
```
Replace `/path/to/frames` with your actual monorepo path.
## Option 3: npm pack (test the exact published artifact)
Use this when you want to verify what would actually ship in a release, including the bundled studio and examples.
```bash
cd packages/cli
npm pack
# Creates: frames-<version>.tgz
# Test it in an isolated directory
mkdir /tmp/pack-test && cd /tmp/pack-test
npx /path/to/frames/packages/cli/frames-<version>.tgz init my-video
cd my-video
npx /path/to/frames/packages/cli/frames-<version>.tgz preview .
```
## Testing the fix branches
When validating a specific bug fix, extract one of the test project archives and run through the scenario:
```bash
# Example: testing audio-after-seek fix
unzip golden-lyric-video.zip && cd golden-lyric-video
frames preview .
# 1. Press Play — confirm audio plays
# 2. Drag the timeline scrubber to a different position
# 3. Press Play again — audio should resume from the seeked position
```
Common test scenarios:
| Bug | Project | Steps |
|---|---|---|
| Audio silent after seek | `golden-lyric-video` | Play → seek → play again, verify audio |
| Render stuck at 0% | any | Renders tab → Export → watch progress bar |
| Download 404 after restart | any | Complete a render → `Ctrl+C` → restart → Download |
| Timeline stops early | `intro-vid` | Play → should reach `0:05`, not stop at `0:03` |
| Lottie missing | `hyperframe-build-up-demo` | Play → rocket visible during 0–2 s |
| Blank thumbnails | any | Compositions sidebar should show previews |
## Troubleshooting
**Changes not reflected after `bun run build`**
The CLI binary is a single bundled file at `packages/cli/dist/cli.js`. If your change is in `@frames/core` or another workspace package, make sure `bun run build` rebuilt _all_ packages — the CLI bundles its dependencies at build time.
**`frames` still shows the old version / old UI**
A globally installed `frames` package shadows `bun link`. Check which binary is active:
```bash
which frames
```
If it points to a global store rather than your monorepo, remove the global install and re-link:
```bash
npm uninstall -g frames
cd packages/cli && bun link
```
**Port already in use**
`frames preview` defaults to port 3002 and auto-increments if it's taken. Pass `--port` to use a specific port:
```bash
frames preview . --port 4000
```