Dashboard › cli › Distillation
39d8a98c-9353-49c9-a94d-3647fcb2c030["lore_tm_v1_ih8M5ehDEA9xO-F9HwGVl0FpPxiH31ntc5HrSDkmEqU","lore_tm_v1_0nhlJTAw71UoPTb269OjtFs7r18hHw2jb2twtunlWho","lore_tm_v1_i7ofz6pWdsH4J71QIWZ_jCBWnj1j1lJoUFCQb0awuHo","lore_tm_v1_weCGkVC83sAmoFy-F9oeUc_IupDzcZQvEffpWnpcohQ","lore_tm_v1_5896FcpG1_cTA90ncV1Yg7DGGTEsNvWeARyP9ESN-Tw","lore_tm_v1_I1lYgvFF1XbHT-0JruVSsgtfjUZzyUy9EXsQPvibQ_M","lore_tm_v1_Lfmcn_mUxfFutvLtGK_7kjLhVQmRnZPCrz33lGyXnbo","lore_tm_v1_2nVdS4BZLRyucBWtidha5MfN1W1gqQG0uOK7S2r2FvU"]
Date: Sep 10, 2026
/home/byk/Code/getsentry/cli-pr-1558/packages/cli/src/lib/command.ts:802-849, command generators are iterated manually with .next() rather than for-await-of so the done: true return value carrying the final hint is retained; each yielded value is passed to handleYieldedValue(), and the return is treated as CommandReturn | undefined./home/byk/Code/getsentry/cli-pr-1558/packages/cli/src/lib/command.ts:810-820, the auth guard and deferred rc-URL trust check are inside the main try: missing auth throws new AuthError("not_authenticated"), while assertRcUrlTrusted(this.cwd as string) is dynamically imported from ./sentryclirc.js unless skipRcUrlCheck is true. This placement lets maybeRecoverWithHelp() intercept auth or resolution failures when "help" was supplied positionally./home/byk/Code/getsentry/cli-pr-1558/packages/cli/src/lib/command.ts:841-849, render finalization computes finalHint as returned ? appendCacheHint(returned.hint) : undefined; bare return; paths such as --web receive no footer, while completed output can receive an automatic cache-age hint such as "cached · 3m ago · use -f to refresh"./home/byk/Code/getsentry/cli-pr-1558/packages/cli/src/lib/command.ts:850-875, error handling finalizes streaming state without a hint only in human mode, avoiding JSON corruption; it then calls maybeRecoverWithHelp(err, stdout, context, args) and returns when recovery succeeds, otherwise calls handleOutputError(err)./home/byk/Code/getsentry/cli-pr-1558/packages/cli/src/lib/command.ts:878-905, stricliCommand() receives the prepared docs, merged parameters, and wrapped function through a cast to StricliBuilderArgs<CONTEXT> because hidden-flag injection and function wrapping break Stricli’s original FLAGS/ARGS alignment enforced by NoInfer./home/byk/Code/getsentry/cli-pr-1558/packages/cli/src/lib/command.ts receive documentation metadata via attachDocumentationMetadata(cmd, builderArgs.docs), optional JSON schema metadata in __jsonSchema for introspect.ts and SKILL.md generation, and the original unwrapped async generator in __rawFunc for internal dispatchers such as bare sentry auth that must bypass telemetry, auth guard, rc trust, and output processing./home/byk/Code/getsentry/cli-pr-1558/packages/cli/test/lib/help-positional.test.ts tests positional "help" recovery end-to-end through Stricli’s run(). A mocked fetch returns HTTP 404 {"detail":"Not found"} so target-resolution cascades fail without real network calls, and buildMockContext() implements forCommand({ prefix }) to populate commandPrefix.sentry issue list help, sentry project list help, and sentry span list help recover from ResolutionError to their respective command help; sentry trace view help and sentry log view help recover from ValidationError; recovery writes a Tip and the canonical path sentry issue list --help to stderr./home/byk/Code/getsentry/cli-pr-1558/packages/cli/test/lib/help-positional.test.ts asserts sentry help remains branded, sentry help issue list remains introspected, and neither emits the positional-recovery Tip.sentry project create [<org>/]<name>:<platform>..., require help text to include cannot contain whitespace, prohibit --platform and <name-or-platform> from help, and verify removed flags --platform and -p fail with /No (flag|alias) registered/./home/byk/Code/getsentry/cli-pr-1558/packages/cli/test/lib/command.test.ts verifies command metadata: customUsage: ["<name>:<kind>..."] is retained exactly as __primaryUsage, while the structured example { description: "Select an organization explicitly", command: "sentry thing list my-org" } is retained in __examples./home/byk/Code/getsentry/cli-pr-1558/packages/cli/test/lib/command.test.ts verifies prompt availability is derived from parsed semantic flags rather than ambiguous aliases: init -y and init -n disable prompts because they resolve to yes and dry-run; init --yes=false, data -n 10, and data -y 2 leave prompts enabled even though -n/-y are aliases for unrelated numeric limit/row flags in the data command./home/byk/Code/getsentry/cli-pr-1558/packages/cli/test/lib/scanner-flags.integration.test.ts; patch file /home/byk/Code/getsentry/cli-pr-1558/packages/cli/patches/@stricli%2Fcore@1.2.8.patch permits --verbose, --json, --org, --project, --log-level, --fields, and alias -v at any route depth and forwards them to the leaf command, replacing the old argv-glue/argv-hoist preprocessors.-v as a version alias so -v remains Sentry CLI’s --verbose; --version is instead recognized at any route depth through scanner state versionRequested, and documentation.renderHelp enables structured JSON for --help --json.--verbose bash-hook, -v bash-hook, --log-level debug bash-hook, --org acme bash-hook, --org=acme bash-hook, --verbose bash-hook --release 1.0.0, cli --verbose defaults, --verbose cli defaults, and cli --org acme defaults must not produce "No command registered"; the bash-hook cases emit _sentry_err_trap, and the release case includes --release '1.0.0'.--org --help and cli --org --help render USAGE, while --org --version prints exactly ${CLI_VERSION}\n.-- escape: bash-hook -- --verbose leaves --verbose positional/pass-through, produces a case-insensitive "too many arguments" error, and does not emit _sentry_err_trap.--version, cli --version, and issue list --version each print exactly ${CLI_VERSION}\n without a "No command registered" routing failure.