Dashboard › cli › Distillation
4a431113-2259-42c0-aa86-f8a7a5525224["lore_tm_v1_EeLM8BAheqSzc3aXDT1bCUkKAa6J4arLw9s6zwd5SGM","lore_tm_v1_o-HH4EVD6RchLj-_gO_Iu_e-NF08ua3kli527N5YjW8","lore_tm_v1_gIxvJkkYfw776Cxo6H-Fpvfui8HfpU1h821usnrqhhE"]
/home/byk/Code/getsentry/cli-pr-1558/packages/cli/src/lib/help-json.ts.extractAllRoutes imported at line 22 and used in routes: extractAllRoutes(routeMap) at line 354 of /home/byk/Code/getsentry/cli-pr-1558/packages/cli/src/lib/help.ts; fullDescription occurs at line 25 of /home/byk/Code/getsentry/cli-pr-1558/packages/cli/src/commands/help.ts.packages/cli/src/lib/help.ts, HelpJsonResult is a union of the full-tree object { routes: RouteInfo[]; envVars: HelpEnvVarInfo[]; flags: HelpFlagInfo[] }, CommandInfo, RouteInfo, or { error: string; suggestions?: string[] }.buildTopLevelEnvVars() maps TOP_LEVEL_ENV_VARS to HelpEnvVarInfo[] containing name, brief, description, example, and defaultValue; brief uses v.briefDescription ?? v.description.split("\n")[0] ?? "".buildCommonFlags() maps COMMON_FLAGS to HelpFlagInfo[] containing long, short, and description.introspectAllCommands() casts routes to RouteMap and returns { routes: extractAllRoutes(routeMap), envVars: buildTopLevelEnvVars(), flags: buildCommonFlags() }, exposing all visible routes, top-level environment variables, and common CLI flags.introspectCommand(commandPath: string[]) calls resolveCommandPath(routeMap, commandPath); a missing result returns { error: \Command not found: ${commandPath.join(" ")}` }, an "unresolved"result returns the same error plussuggestionsonly when nonempty, and a resolved path returnsresolved.info`.packages/cli/src/lib/help.ts is wired into Stricli’s documentation.renderHelp hook in app.ts; Stricli passes the resolved route prefix and surviving unprocessedInputs, including forwarded top-level flags such as --json and --fields.--help --json, structured help reproduces sentry help --json [command]: it uses introspectAllCommands() for the full tree or introspectCommand(path) for a specific command/group, serializes via formatJson, and can narrow output using --fields.--json is absent, the structured-help renderer returns undefined, preserving Stricli’s built-in text help behavior for sentry --help and sentry <cmd> --help.