feat(cli): hyperframes pick — open the design picker, gated behind feature flag
Summary
hyperframes pick — new CLI command that builds the design picker (from PR #971 — #974), serves it on localhost:8723, and opens the browser. Gated behind a feature flag so it ships dark until you flip it on.
Scope
- 7 files, ~430 lines
packages/cli/src/commands/pick.ts(new)packages/cli/src/cli.ts(1 line: registerpick)packages/cli/src/help.ts(8 lines: conditionally show in--help)packages/cli/src/utils/env.ts(new helper:isDesignPickerEnabled())docs/packages/cli.mdx(new### picksection under Preview tab).fallowrc.jsonc(exclude vendored picker assets from the fallow audit).gitignore(.hyperframes/+/templates/— picker output dirs)
Behavior
HYPERFRAMES_DESIGN_PICKER=1 npx hyperframes pick
HYPERFRAMES_DESIGN_PICKER=1 npx hyperframes pick --port 8723
HYPERFRAMES_DESIGN_PICKER=1 npx hyperframes pick --build-only
- Builds
.hyperframes/pick-design.htmlvia the skill's Python script (PR #973) - Serves the result on
localhost:8723with a small built-in HTTP server (NodecreateServer, ~70 lines) - Routes
/templates/<slug>/*to the installed skillspresentations/directory so the picker's iframes resolve regardless of where the page is served from - Runs the Python build from a neutral temp
cwdso a project's localDESIGN.htmldoesn't auto-advance the picker past the templates grid - Reads
.hyperframes/picker-data.jsonif present, writes a sensible default otherwise - Opens the browser via
openafter the server is up
Feature flag
isDesignPickerEnabled() in packages/cli/src/utils/env.ts returns true when:
- Running from source (
isDevMode()— contributor convenience, no env var needed) - OR
HYPERFRAMES_DESIGN_PICKERis set to1/true/on/yes
In any other case:
hyperframes pickshort-circuits with a hint pointing at the env var- The command is hidden from
hyperframes --helpoutput (omitted from the "Getting Started" group) - The command stays registered in
cli.tsso direct invocation by an enabled user works
Why a feature flag
The picker depends on:
python3on PATH (build script is Python)skills/hyperframes/installed in the project (viahyperframes skills)- A free port at
8723
That's a lot of preconditions for a CLI command in default user flow. Shipping behind a flag lets the picker mature before flipping on for everyone.
Hot spots for review
findSkillsRootwalks up from cwd looking forskills/hyperframes/templates/design-picker.html+skills/hyperframes/scripts/build-design-picker.py. Falls back to walking up from the CLI binary's own location for monorepo dev mode. Limited to 10 parent dirs.serveStaticis the inline HTTP server. Single file mime-types,/templates/<slug>/*route, basic forbidden-path guard. No auth — local-only via127.0.0.1bind.buildPickerinvokespython3with stdin JSON. Errors surface as a clack spinner failure.
Tests
No new unit tests. Behavior is covered by:
- TypeScript type-checking (
bun run typecheckpasses) - Manual:
bun x tsx packages/cli/src/cli.ts pickopens the picker (dev mode auto-enables flag)
What's not in scope
- The picker HTML itself — PR #974
- The build script the CLI invokes — PR #973
- The templates the picker renders — PR #971 + #972
Test plan
- [ ]
HYPERFRAMES_DESIGN_PICKER=1 npx hyperframes pickin a project withhyperframes skillsinstalled opens the picker - [ ] Without the env var,
npx hyperframes pickshort-circuits with a hint - [ ] Without the env var,
hyperframes --helpdoes not listpick - [ ] Running from the monorepo (
bun x tsx packages/cli/src/cli.ts pick) auto-enables (dev mode) - [ ] Build (
bun run build) succeeds with the new files - [ ]
bunx oxlint packages/cli/src/commands/pick.ts packages/cli/src/utils/env.tspasses
Stack
Top of stack. Depends on #971, #972, #973, #974.
🤖 Generated with Claude Code
[!WARNING] This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite. Learn more
- #975
👈 (View in Graphite) - #974

- #973

- #972

- #971

main
This stack of pull requests is managed by Graphite. Learn more about stacking.