({ args })
| 699 | }, |
| 700 | }, |
| 701 | async run({ args }) { |
| 702 | if (args.template !== undefined) { |
| 703 | // Quote the value in case it looks flag-like — keeps the suggested |
| 704 | // command copy-pasteable. |
| 705 | console.error( |
| 706 | c.error( |
| 707 | `The --template flag was renamed to --example. Example:\n npx hyperframes init ${args.name ?? "my-video"} --example "${args.template}"`, |
| 708 | ), |
| 709 | ); |
| 710 | process.exit(1); |
| 711 | } |
| 712 | if (args["video-legacy"] !== undefined) { |
| 713 | console.error( |
| 714 | c.error( |
| 715 | `The -V short flag no longer maps to --video. Use --video (or -v). Example:\n npx hyperframes init ${args.name ?? "my-video"} --video "${args["video-legacy"]}"`, |
| 716 | ), |
| 717 | ); |
| 718 | process.exit(1); |
| 719 | } |
| 720 | const exampleFlag = args.example; |
| 721 | const videoFlag = args.video; |
| 722 | const audioFlag = args.audio; |
| 723 | const skipTranscribe = args["skip-transcribe"] === true; |
| 724 | // Temporary measure while the skills.sh registry sync lags GitHub main: the |
| 725 | // `--skip-skills` FLAG is neutered so an agent (or user) that passes it can |
| 726 | // NOT dodge the GitHub skills freshness check. The "don't pass --skip-skills" |
| 727 | // guidance lives in SKILL.md, which ships through the same laggy skills.sh |
| 728 | // channel and can't be relied on to reach the agent — so the guarantee has to |
| 729 | // live in the CLI, the one channel that updates promptly (`npx |
| 730 | // hyperframes@latest`). CI and unit tests still opt out via the |
| 731 | // HYPERFRAMES_SKIP_SKILLS=1 env var, which the agent/user CLI path never sets. |
| 732 | // Revert to `args["skip-skills"] === true` once skills.sh catches up. |
| 733 | const skipSkills = process.env.HYPERFRAMES_SKIP_SKILLS === "1"; |
| 734 | const skipSkillsFlagIgnored = args["skip-skills"] === true && !skipSkills; |
| 735 | const tailwind = args.tailwind === true; |
| 736 | const nonInteractive = args["non-interactive"] === true; |
| 737 | const modelFlag = args.model; |
| 738 | const languageFlag = args.language; |
| 739 | const interactive = !nonInteractive && process.stdout.isTTY === true; |
| 740 | |
| 741 | if (skipSkillsFlagIgnored) { |
| 742 | console.log( |
| 743 | c.dim( |
| 744 | "Note: --skip-skills is temporarily ignored — init always checks AI skills " + |
| 745 | "against GitHub while the skills.sh registry catches up.", |
| 746 | ), |
| 747 | ); |
| 748 | } |
| 749 | |
| 750 | let resolutionPreset: CanvasResolution | undefined; |
| 751 | if (args.resolution !== undefined) { |
| 752 | resolutionPreset = normalizeResolutionFlag(args.resolution); |
| 753 | if (!resolutionPreset) { |
| 754 | console.error( |
| 755 | c.error( |
| 756 | `Invalid --resolution: "${args.resolution}". ` + |
| 757 | `Use one of: landscape, portrait, landscape-4k, portrait-4k, square, square-4k ` + |
| 758 | `(or aliases 1080p, 4k, uhd, 1080p-square, square-1080p, 4k-square).`, |
nothing calls this directly
no test coverage detected