Dashboard › cli › Distillation
e4253c99-512e-4496-adc9-689955a5fb74["lore_tm_v1_x-ORwd-mX3RtP9QbihtbS4daORkUtsVmsaCXvCRiF54","lore_tm_v1_0dJK_ReBndjbg7lDjhCJtDNCZkZrzsTYgAOoTKqmx1I","lore_tm_v1_qEjePtzIpgW62cYorsfAtZfUck-H9Uyo9XstmU-wZrQ","lore_tm_v1_kf6zqpdSMlGcc05VxyORSbMuxGrQjwR52KQIObdJUN4","lore_tm_v1_xehrWAtjoExWqcGysPNgQ9q53lNFLyjCATsJ2XSTb_0","lore_tm_v1_DcckHChWCJRNsEAXeG5bja1fIjoLTnsk-GGMVrg4zSo","lore_tm_v1_hiP_pTp40H7XwhI3RFxQg2QEgezZQ34mtZA0IoX7SS0","lore_tm_v1_n1ixIMCTc3RZIfdnKR-COggYVwgKMXLZr0VmG8zbx-o","lore_tm_v1_QVqbyoiVgY6cI-ztM9RHxHx_ehcjvv3wo7urcTQwsKA","lore_tm_v1_P8VTcDxlVjNvBornoMUyGP8DZxbI8DMKXk1t1Qf83ww"]
packages/cli/src/lib/help.ts is 792 lines and implements branded top-level help, structured command introspection, JSON help rendering, unknown-command recovery, version-request recovery, fuzzy suggestion formatting, and human rendering of introspection data.packages/cli/src/lib/help.ts:764-770, formatHelpHuman(data: HelpJsonResult) renders full-tree human output through printCustomHelp().trimEnd(); --json “never calls this human formatter,” so JSON help never triggers printCustomHelp()’s sixel probe or terminal I/O.printCustomHelp() in packages/cli/src/lib/help.ts:206-260 probes sixelBanner(cols) ?? formatBanner(cols) only when process.stdout.isTTY; non-TTY output skips the banner to avoid wasting tokens in agent loops. It then renders the tagline, generated commands, common flags, top-level environment variables, an authentication-dependent example, and https://cli.sentry.dev/getting-started/.COMMON_FLAGS in packages/cli/src/lib/help.ts:65-88 contains 5 entries: --json (“Output as JSON (with --fields to select)”); -f, --fresh (“Bypass cache and fetch fresh data”); -v, --verbose (“Enable debug logging”); --help (“Show help for a command”); and --version (“Show version”).generateCommands() in packages/cli/src/lib/help.ts:94-136 introspects visible Stricli routes; route groups display visible subcommand names joined with |, while direct commands prefer entry.target.__primaryUsage over getPositionalString(entry.target.parameters.positional).renderJsonHelp() in packages/cli/src/lib/help.ts:406-428 returns undefined without --json, allowing Stricli’s built-in text help; with --json, it combines prefix.slice(1) with unresolved extraPath, calls introspectAllCommands() or introspectCommand(), optionally applies filterFields(), and returns formatJson(final) with a trailing newline.isVersionRequest() in packages/cli/src/lib/help.ts:447-457 recognizes bare --version only before a -- escape. -v is intentionally excluded because the Sentry CLI maps it to --verbose through GLOBAL_FLAGS.isRecoverableUnknownCommand() in packages/cli/src/lib/help.ts:472-478 suppresses unknown-command telemetry for 3 recoverable shapes: a --version request, a rewritable --help --json request, or an argv whose trailing token is help.rewriteHelpJsonToHelpCommand() in packages/cli/src/lib/help.ts:500-521 rewrites argv containing both --help/-h and --json before -- into ["help", "--json", ...extraPath], appending ["--fields", fields.join(",")] when parsed fields are present.parseHelpJsonFlags() in packages/cli/src/lib/help.ts:541-567 handles --json, spaced and inline --fields, stops at --, collects unresolved non-flag path tokens, and skips values belonging to value-taking global flags such as --org, --project, and --log-level; VALUE_FLAG_TOKENS is derived from GLOBAL_FLAGS to stay synchronized.packages/cli/src/lib/help.ts has 4 principal shapes: full command tree → branded help; route group → subcommand table; single command → signature, brief, visible flags, and selectable JSON fields; error → Error: ... with optional Oxford-comma Did you mean: ...? suggestions.ripgrep execution failed and multiple No files found results; the repository’s top-level node_modules/ contains .modules.yaml, .pnpm-workspace-state.json, and .pnpm/.@stricli/core@1.2.8 and @stricli/core@1.3.0; the CLI uses patched @stricli/core@1.2.8 with patch hash 892258f886d48063b409e0ac6141260023c396d1ed4f915231701f6a34edffcc, while @stricli/auto-complete@1.3.0 depends on @stricli/core@^1.3.0.node_modules/.pnpm/@stricli+core@1.2.8_patch_hash=892258f886d48063b409e0ac6141260023c396d1ed4f915231701f6a34edffcc/node_modules/@stricli/core; its dist/ contains index.cjs, index.d.cts, index.d.ts, and index.js.@stricli/core@1.2.8 declarations expose documentation.renderHelp in dist/index.d.ts:509; runtime hook handling appears in dist/index.js:1464-1470 and the CommonJS equivalent dist/index.cjs:1512-1518. The same package exposes command documentation fields including fullDescription and customUsage.