Repository navigation
feat(cli): hyperframes <dir> opens the project in the app - #6426
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Automations to automatically generate PRs for you. |
… for the folder shortcut
Edit accuracy: accurate 271 (base branch 271), smooth 151 of thoseThe gate passes. Quarantined, measured but not gated (0) |
There was a problem hiding this comment.
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%.
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]>
What changes for people
npx hyperframes .(or./my-video, or an absolute path) opens that project in the HyperFrames app, exactly likehyperframes open <dir>. Nothing else changes: a barehyperframes, 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.
hyperframes rendrkeeps today's "unknown command" error../renderthe folder would hijackrender.A known command always wins, even if a folder has that name;
hyperframes open ./renderreaches it. The rule lives in one function,openShortcutArgv, which rewritesprocess.argvonce before command lookup andargvis derived from it, so telemetry,--helpand the app-history notice all seeopen. The command word is found bycommandWordIndex(first non-flag before--), the same lookup the capture.envcheck now uses, sohyperframes --verbose .works.open.tsis 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 realcli.ts,hyperframes <dir>runs theopencommand with the folder, andhyperframes renderstill runsrender. It goes red when the rewrite line is removed.--separator andcommandWordIndexare covered; the lifecycle test also runs--verbose <dir>.