Dashboard › cli › Distillation
8ddb7dd3-2cc7-47db-9a63-e5b9791a6980["lore_tm_v1_P3wW3CcORVqwN7e3RKd58gPAZudtzXhCxYT5Wi2-Llw","lore_tm_v1_9VR7S_frpFI4AkrG7dRKxdi7Kq21BU4NzBp4voe5bGQ","lore_tm_v1_pVyMMNq88cKMGJSvFSH8LNUya0Jlry8ZRfEykvZb8UU","lore_tm_v1_FvWznR0uM0EuwhiR9K0EMsUh0jhRXSoTl_jptVYt_dg","lore_tm_v1_0HEqz_7rk32Cx1TPwZLN5Rlmlu188gUASNZd2zfOuXI","lore_tm_v1_sjB9j0VNyp4mDrNAMw4EloICQ2aNArShDwDuVNwqr28","lore_tm_v1_TZfQp0pg2rJ7skrgsjkGVAtkadEkq8fnnitYnBWrxzg","lore_tm_v1_s1sABCHHQig-QKYsM0kNTIgxTRqQA5tXC6nCgcaJ1XQ","lore_tm_v1_tjvKuRkIxQRdz4g-xpCVKzMhphk-qA31n9yKNgG3DCg","lore_tm_v1_B1iNWx7tP5PLW8PihVBcJ2AxJbRCXK4r_fl9VKG7RVU","lore_tm_v1_alYBF0Bu3E1O35JmUj4ySwBJ0A8EXRAcw1ss-JOzcCo","lore_tm_v1_GhED2dTs7UkXZ9c1l78LQ4K0bna5TqljUAPYzkX6rgA","lore_tm_v1_UppbxjBEHTD_n7Pox4zfpvHurh5a9B7HNUtgrDhskE0"]
packages/cli/node_modules/@stricli/core/dist/index.js calls the loaded command function with commandFunction.call(context, ...parsedArguments); returned Error values are formatted with commandErrorResult() and exceptions with exceptionWhileRunningCommand(). When configured, determineExitCode handles both returned errors and thrown exceptions; otherwise both paths return ExitCode.CommandRunError, while successful execution returns ExitCode.Success.prepareNativeDocs() in packages/cli/src/lib/command.ts removes the extended examples field before passing documentation to Stricli, then appends examples to fullDescription as ${command} # ${description} under an Examples: heading.attachDocumentationMetadata() in packages/cli/src/lib/command.ts stores the first docs.customUsage entry on __primaryUsage—using the string directly or an object entry’s .input—and stores examples on __examples.GLOBAL_FLAG_DEFAULTS in packages/cli/src/lib/command.ts defines defaults for [LOG_LEVEL_KEY], verbose, org, and project.ALWAYS_STRIP are always stripped and never seen by the command; currently ALWAYS_STRIP = new Set([LOG_LEVEL_KEY]).Application<CONTEXT> contains root, config, and defaultText; buildApplication() supports either a top-level RouteMap<CONTEXT> or a standalone Command<CONTEXT>, and generateHelpTextForAllCommands() accepts an Application<CommandContext> plus an optional locale and returns readonly [route, helpText] tuples.packages/cli/src/app.ts exports app = buildApplication(routes, ...) with name "sentry", CLI_VERSION, scanner case style "allow-kebab-for-camel", allowArgumentEscapeSequence: true, global route-scanner flags from buildTopLevelFlags(), determineExitCode: getExitCode, JSON-help rendering through renderJsonHelp(prefix, unprocessedInputs), and localization via loadText: () => customText.packages/cli/src/app.ts permits -- to stop flag parsing for wrapper commands such as sentry monitor run <slug> -- <command>, and supports global flags before subcommands at any route depth through the patched @stricli/core route scanner.packages/cli/src/app.ts routes --help --json through the same structured introspection path as sentry help --json, returns undefined for non-JSON help, and replaces the former argv rewrite from --help --json to the help command.packages/cli/test/lib/help-positional.test.ts runs commands through Stricli’s run(app, args, mockContext), captures stdout/stderr, and supplies forCommand({ prefix }) so commandPrefix is available to buildCommand help-recovery logic.packages/cli/test/lib/help-positional.test.ts mocks otherwise-unhandled resolution fetches with an HTTP 404 body { detail: "Not found" }, preserving resolution-error-to-help recovery while suppressing preload warnings.sentry issue list help, sentry project list help, and sentry span list help recover from ResolutionError; sentry trace view help and sentry log view help recover from ValidationError; the recovery hint contains the exact path sentry issue list --help.sentry help remains branded, sentry help issue list shows introspected help, and neither emits the recovery "Tip".packages/cli/test/lib/help-positional.test.ts requires both sentry help project create and generated --help output to contain sentry project create [<org>/]<name>:<platform>...; generated help must omit --platform and <name-or-platform> and include "cannot contain whitespace".--platform and -p when invoked as ["project", "create", "my-app:node", flag, "javascript"], requiring an error matching /No (flag|alias) registered/.packages/cli/src/lib/introspect.ts models positional definitions as either { kind: "tuple"; parameters } or { kind: "array"; parameter }; extracted PositionalInfo includes exact placeholder, brief, and optional fields.getPositionalString() in packages/cli/src/lib/introspect.ts renders tuple entries as <placeholder> or [<placeholder>], with fallback names arg${i}, and renders array positionals as <placeholder...> with fallback "args".extractPositionals() in packages/cli/src/lib/introspect.ts preserves tuple optionality via p.optional ?? false, but currently renders every array positional’s placeholder with ... and hard-codes optional: true, regardless of params.parameter.optional.formatPositionalsTable() in packages/cli/script/generate-command-docs.ts emits an **Arguments:** Markdown table, renders optional entries as [<${p.placeholder}>] and required entries as <${p.placeholder}>, and escapes </> in descriptions as </>.generateCommandSection() in packages/cli/script/generate-command-docs.ts builds a heading from cmd.path plus cmd.positional, then emits the brief, positional table when present, visible-options table when present, and formatted examples.packages/cli/node_modules/@stricli/core/dist/index.js that check "forCommand" in context and call await context.forCommand({ prefix: result.prefix }), at approximately lines 1496–1498 and 1729–1731.