MCPcopy Create free account
hub / github.com/backnotprop/plannotator / isSubcommandHelpInvocation

Function isSubcommandHelpInvocation

apps/hook/server/cli.ts:148–154  ·  view source on GitHub ↗
(args: string[])

Source from the content-addressed store, hash-verified

146 * print usage and exit before a subcommand branch can launch the UI.
147 */
148export function isSubcommandHelpInvocation(args: string[]): string | null {
149 const sub = args[0];
150 if (!sub) return null;
151 const canonical = SUBCOMMAND_HELP_ALIASES[sub] ?? sub;
152 if (!(canonical in SUBCOMMAND_HELP)) return null;
153 return hasHelpFlag(args.slice(1)) ? canonical : null;
154}
155
156/** Usage text for a canonical subcommand (falls back to top-level help). */
157export function formatSubcommandHelp(subcommand: string): string {

Callers 2

index.tsFile · 0.90
cli.test.tsFile · 0.90

Calls 1

hasHelpFlagFunction · 0.85

Tested by

no test coverage detected