You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cli: invalid catalog --type exits 1 with runtime_error instead of a usage error (exit 2) #7669
bugSomething isn't workingdifficulty/easyLocalized change with a known approach, limited risk, and straightforward verification.good first issueEasy, available, ready work with code/test pointers and a confirmed newcomer mentor.help wantedReady, available work with maintainer review support; any difficulty.
hyperframes catalog --type <value> only accepts block or component. Any other value is a usage mistake, and the CLI's contract for usage mistakes is exit code 2, with a usage_error envelope under --json (see packages/cli/src/cli.agentMode.test.ts).
catalog doesn't follow that contract today:
$ hyperframes catalog --type widget --json
Invalid --type: "widget". Use "block" or "component".
# exit code 1, error kind runtime_error
The cause is in packages/cli/src/commands/catalog.ts (around line 228). The invalid-value branch prints the message and calls finishCommand(1).
What to do
Report the bad value as a usage error, the way other commands do. check.ts throws CliUsageError, and failUsage in packages/cli/src/utils/commandResult.ts is a helper for the same job.
Add a test showing that catalog --type widget exits 2 and, with --json, returns usage_error with the message. cli.agentMode.test.ts has a table of similar cases you can extend.
bugSomething isn't workingdifficulty/easyLocalized change with a known approach, limited risk, and straightforward verification.good first issueEasy, available, ready work with code/test pointers and a confirmed newcomer mentor.help wantedReady, available work with maintainer review support; any difficulty.
Activity
jvarah commentedon Nov 13, 2026
I'll take this issue!
fix(cli): report an invalid catalog --type as a usage error (heygen-c…
fix(cli): report an empty catalog --type= as a usage error (heygen-co…