Skip to content

docs(cli): document open, catch-up, timeline and history - #5442

Merged
jrusso1020 merged 1 commit into
heygen-com:mainfrom
meghna810:docs/cli-reference-missing-commands
Oct 12, 2026
Merged

jrusso1020 merged 1 commit into
heygen-com:mainfrom
meghna810:docs/cli-reference-missing-commands

Conversation

@meghna810

Copy link
Copy Markdown
Contributor

What

Adds open, catch-up, timeline and history to the CLI reference (docs/packages/cli.mdx). hyperframes --help lists all four, but the page didn't document them.

Why

They only appeared in the changelog, plus a passing mention of timeline in docs/developers/cli.mdx.

Related work

Fixes #5386

How

  • open and catch-up: one section under "Look at it, or share it", next to publish, since they are the two halves of the desktop-app hand-off.
  • timeline and history: a new "Edit from the command line" group before "Render to a file". Both have subcommands (timeline move|trim|split|delete|set|duplicate|apply|undo|ids, history show|undo|restore|peek|pin|begin|end). Each section has a table of subcommands and a table of flags.
  • "Find your command" lists the four commands, and "What every command shares" now names history and the timeline edit commands among the commands that take --dir.

Every documented option comes from the command's args in packages/cli/src/commands/{open,catch-up,timeline,history}.ts and matches --help. Behaviour the args don't spell out (time expressions, set fields, the apply plan shape, conflict handling on history undo) comes from packages/cli/src/timeline/ and history.ts.

Two things the args define that I left out on purpose:

  • timeline set reads volume, rate and track as field=value positionals. It also checks for --volume/--rate/--track, but those aren't in its args, so I documented only the field=value form.
  • --start, --end, --duration, --at and --snap are defined on all six clip edits, but only trim, duplicate and the time-taking verbs use them. The flag table lists where each one has an effect.

Test plan

  • Ran every example on the page against a sample project (hyperframes init plus two extra clips) with the CLI built from main: timeline (print, --json, move with --plan, offset, frame and after: anchor times, the overlap refusal (exit 2), trim, split, set, duplicate --at, delete --json, then undo with that receipt), history (list, begin/end, --since mine --who, undo --who), open --json (app not installed: exit 1 with reason and downloadUrl), and catch-up (project not handed off).
  • npx mint validate and npx mint broken-links --check-redirects pass (run in docs/ on Node 22, as in docs.yml).
  • bun run check:docs-snippet-motion and check:studio-copy-dashes pass.
  • Documentation updated

🤖 Generated with Claude Code

Add the four commands that `hyperframes --help` lists but the CLI reference
page left out, with their options taken from each command's args and
examples checked against a sample project.

Closes heygen-com#5386

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@meghna810

Copy link
Copy Markdown
Contributor Author

FYI, unrelated to this PR: while running the timeline examples against a sample project, I noticed that a single edit (e.g. timeline trim '#intro' --duration 2) rewrites the whole index.html, not just the changed attribute. <!doctype html> became <!DOCTYPE html>, <meta ... /> lost its /, and a multi-line <div> was collapsed onto one line. It looks like the mutation helpers re-serialise the whole document with linkedom (document.toString() in packages/studio-server/src/helpers/sourceMutation.ts). The rendered output is unchanged, but the diff is noisy. Not sure if that's intended, so just flagging it. Happy to open an issue if useful.

@meghna810
meghna810 marked this pull request as ready for review October 10, 2026 23:28

@jrusso1020 jrusso1020 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @meghna810, nice work. I checked every new claim against packages/cli/src/commands/ and found nothing wrong. The timeline sample output even matches the printer column for column. Three optional wording notes are inline.

— Rames

Comment thread docs/packages/cli.mdx

### `open` and `catch-up`

`open` opens a project in the HyperFrames desktop app and adds it to Home.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worth a note: the hand-off is macOS-only for now (HANDOFF_READY = process.platform === "darwin" in utils/desktopApp.ts:27), so on Windows and Linux open always exits 1 with the download link.

Comment thread docs/packages/cli.mdx

| Flag | Applies to | Description |
| ------------- | -------------------------------------------------------------- | ------------------------------------------------------------- |
| `--plan` | `move`, `trim`, `split`, `delete`, `set`, `duplicate`, `apply` | Print the result and the diff without writing |

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small nuance: apply --plan in text mode prints only planned N files. The diff shows with --json (a2Commands.ts:239-253). The single verbs print the diff as described.

Comment thread docs/packages/cli.mdx
| Command | What it does |
| ----------------------- | ------------------------------------------------------------------------------------------------------ |
| `show <ref> [--diff]` | One entry's files, before and after. `--diff` prints a text diff (needs `git`). |
| `undo [ref]` | Undo an entry, or with `--who <name>` and no ref, that name's newest turn still in effect |

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More exact: it undoes what is still in effect from that name's last recorded turn. If none of that turn is still in effect, it refuses rather than falling back to an older turn (history.ts:192-207).

@jrusso1020

Copy link
Copy Markdown
Collaborator

Thanks @meghna810! I checked every flag, argument, default and exit code here against the command sources, and they match, including which timeline verbs take --plan, --overwrite and --snap. Two optional wording tweaks; neither blocks the merge:

  • open: say that hand-off only works on macOS today. Elsewhere it always exits 1 with handoff-unavailable and prints the download link (HANDOFF_READY = process.platform === "darwin").
  • history undo: without --who it undoes your own newest entry. With --who it only undoes that name's last turn, and it refuses rather than going back further if nothing from that turn is still in effect.

Auto-merge is on.

— Rames

@jrusso1020
jrusso1020 added this pull request to the merge queue Oct 12, 2026
Merged via the queue into heygen-com:main with commit 2973b3c Oct 12, 2026
57 checks passed
pattoneirc pushed a commit to pattoneirc/hyperframes that referenced this pull request Oct 24, 2026
…and history (heygen-com#6110)

Note that the desktop hand-off in `open` is macOS-only for now, that
`timeline apply --plan` prints only a count without --json, and what
`history undo --who` reverts.

Refs heygen-com#5386

Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: add open, catch-up, timeline and history to the CLI reference

2 participants