Skip to content

feat(cli): hyperframes <dir> opens the project in the app - #6426

Merged
miguel-heygen merged 3 commits into
mainfrom
feat/cli-dir-opens-app
Oct 26, 2026
Merged

miguel-heygen merged 3 commits into
mainfrom
feat/cli-dir-opens-app

Conversation

@miguel-heygen

@miguel-heygen miguel-heygen commented Oct 26, 2026 •

Copy link
Copy Markdown
Collaborator

What changes for people

npx hyperframes . (or ./my-video, or an absolute path) opens that project in the HyperFrames app, exactly like hyperframes open <dir>. Nothing else changes: a bare hyperframes, every command name, and unknown words behave as before.

The one decision: when is the first word a project?

When it is not a known command and it resolves to an existing directory.

Option Verdict
Not a command and an existing directory (chosen) A typo like hyperframes rendr keeps today's "unknown command" error.
Anything that is not a command Turns every typo into a failed open.
A folder wins over a command ./render the folder would hijack render.

A known command always wins, even if a folder has that name; hyperframes open ./render reaches it. The rule lives in one function, openShortcutArgv, which rewrites process.argv once before command lookup and argv is derived from it, so telemetry, --help and the app-history notice all see open. The command word is found by commandWordIndex (first non-flag before --), the same lookup the capture .env check now uses, so hyperframes --verbose . works. open.ts is untouched apart from its examples (hyperframes . is now first), so there is still one open path. The CLI docs show the shortcut too.

Tests

  • projectShortcut.test.ts: ., relative, bare name and absolute folders open; flags after the folder are kept; a known command wins over a same-named folder; no argument, a leading flag, a file and a missing path are left alone.
  • cli.lifecycle.test.ts: through the real cli.ts, hyperframes <dir> runs the open command with the folder, and hyperframes render still runs render. It goes red when the rewrite line is removed.
  • Flags before the folder, the -- separator and commandWordIndex are covered; the lifecycle test also runs --verbose <dir>.
  • 45 passed across the three CLI files, 3 runs in a row.

@mintlify

mintlify Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
hyperframes 🟢 Ready View Preview Oct 26, 2026, 2:19 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Edit accuracy: accurate 271 (base branch 271), smooth 151 of those

The gate passes.
Smoothness is reported in the artifact, not gated. A case fails only if it fails 2 of 3 runs.

Quarantined, measured but not gated (0)

@heygengenesis heygengenesis Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Verdict: APPROVE · 0 blocker · 0 important · 0 nits · head bf21873f

I checked how the command word is picked: a known command wins over a same-named folder, an argument after -- is ignored, and leading root flags are skipped (--verbose . becomes --verbose open .). The captureEnv refactor on top of commandWordIndex behaves the same as the old separator logic. Telemetry, --help, the usage resolver and runCommand all see the rewritten argv.

CI notes

All required checks are green. Comments (comment ratchet, not required) is red because the new projectShortcut.ts has a 12.5% comment share against the package's 10.8%.

@heygengenesis heygengenesis Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Verdict: APPROVE — 0 resolved, 0 open, 0 new · bf21873 → 0caa9f6

@miguel-heygen
miguel-heygen added this pull request to the merge queue Oct 26, 2026
Merged via the queue into main with commit 3246718 Oct 26, 2026
72 checks passed
@miguel-heygen
miguel-heygen deleted the feat/cli-dir-opens-app branch October 26, 2026 16:33
SanHsien added a commit to SanHsien/hyperframes that referenced this pull request Oct 26, 2026
Merge 20 more upstream commits (acd0bc3..ad4d3fa, v0.8.205: heygen-com#6403,
heygen-com#6363, heygen-com#6209, heygen-com#6395, heygen-com#6424, heygen-com#6426, heygen-com#6442, heygen-com#6430, heygen-com#6402, heygen-com#6435, heygen-com#6439,
heygen-com#6449, heygen-com#5436, heygen-com#6455 and docs). No conflicts. Record the 11 open PRs
heygen-com#6440-heygen-com#6458 and issue heygen-com#6443 in docs/DECISIONS.md (none adopted), re-check
the earlier open PRs, and advance the commit watermark to ad4d3fa, the
PR watermark to heygen-com#6458 and the issue watermark to heygen-com#6443.

Co-Authored-By: Claude Sonnet 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.

1 participant