Dashboard › cli › Distillation
223d52b4-d9a1-4931-9d62-740ab358232c["lore_tm_v1_FqVvZA-4JqB1ktV7eTm0fCy1_QlLDmC0FNlSwPqnqwc","lore_tm_v1_f3ZRKtTynC--wl5d9Ufrz5SH-XzDFN3q6P405vzOx2Y","lore_tm_v1_lCZOqg7okfwnqrM0ipXBr7zDmqgU8y-xoaMhR0yYGaU","lore_tm_v1_5XIGNUnUDU3y2PRXfng52Wuegt8nA5z_h8gr53t4GTg","lore_tm_v1_N2NHPHXpbBbn04q751XUBbREQ7XevKptCFasQMJGbRQ","lore_tm_v1_UxEpNQYSmy47dyjfVfgIJyy9W_CG7PBORtFSuQ5Igto","lore_tm_v1_HdGs5sgpXIUIl6V_hXCxUCxWaOzqpM19gj2zdSxc7xM","lore_tm_v1_56zmH3DxpTr16RpWtSAnBFENV3DkbAJ1NLZQMVG320I","lore_tm_v1_FWdZ5bxwtATDPAEOQF9rrEcuonpc0_6tUXOm_ZsTeNk"]
Date: September 10, 2026
packages/cli/src/context.ts defines SentryContext extends CommandContext with readonly process, env, cwd, homeDir, configDir, stdout, stderr, stdin, and optional commandPrefix?: readonly string[]; commandPrefix contains the full Stricli prefix including program name, e.g. ["sentry", "issue", "list"], for positional help handling in buildCommand.buildContext(process: NodeJS.Process, span?: Span) in packages/cli/src/context.ts creates baseContext from process, process.env, process.cwd(), homedir(), getConfigDir(), process.stdout, process.stderr, and process.stdin; its forCommand({ prefix }) calls setCommandSpanName(span, prefix.join(".")) and returns { ...baseContext, commandPrefix: prefix }.packages/cli/script/generate-skill-markdown.ts defines COMMAND_HEADING_RE = /^sentry\s+([^<[\s]+(?:\s+[^<[\s]+))(?:\s(?:<|[)[^]*)?$/` to match generated command headings while stopping before positional usage.extractCommandPathFromHeading(heading) in packages/cli/script/generate-skill-markdown.ts returns the literal path as sentry ${match[1]} when COMMAND_HEADING_RE matches, otherwise undefined.matchExampleToCommand(code, commandPaths, groupFallback, defaultCommandPath?) sorts command paths by descending length so a path such as sentry auth login takes precedence over sentry auth, then returns the first path included in code; if no path matches and code excludes groupFallback, it returns undefined, otherwise it returns defaultCommandPath ?? groupFallback.formatCommandExamples(examples) in packages/cli/script/generate-skill-markdown.ts returns "" for zero examples; otherwise it produces a Markdown **Examples:** section with a fenced bash block and examples separated by blank lines via examples.join("\n\n").formatUsageLineForParameters(parameters, args) omits hidden flags and, when args.config.onlyRequiredInUsageLine is enabled, flags optional at runtime; flag names honor convert-camel-to-kebab, and a sole alias replaces the long name when parameters.aliases exists and args.config.useAliasInUsageLine is enabled.value1|value2; other flags use flag.placeholder ?? "value". Optional flags are wrapped as [...], required flags as (...), and parsed variadic flags append ... outside the optional/required wrapper.<placeholder>... with fallback placeholder "args"; tuple positionals may be filtered to required-only under onlyRequiredInUsageLine, use fallback names arg${i + 1}, render optional/defaulted entries as [<name>], and required entries as <name>. The complete usage line joins args.prefix, flag usage, and positional usage with spaces.formatDocumentationForFlagParameters() in patched Stricli filters hidden flags unless args.includeHidden; formats aliases as -x; uses configured case style for long names; displays boolean negation as --name/--negated-name when default is not false and withNegated !== false; wraps runtime-optional flags in brackets; and appends ... for parsed variadic flags.|, defaults labeled with the localized default keyword, empty-array defaults as [], empty-string defaults as "", array defaults joined by the configured variadic separator or a space, and string variadic separators labeled with the localized separator keyword.-h/--help documentation row; when enabled, it also appends --helpAll formatted through the configured case style and marks it hidden unless alwaysShowHelpAllFlag is true, plus a -v/--version row when version support is enabled.generateCommandHelpLines(parameters, docs, args) renders a usage header, then either every customUsage entry under the joined command prefix or the default formatUsageLineForParameters() output; object custom-usage entries render input followed by an indented italicized brief when ANSI styling is active.generateCommandHelpLines() emits built-in flag usage lines, fullDescription ?? brief, an aliases section when aliases exist using the parent prefix, and a flags section generated by formatDocumentationForFlagParameters().packages/cli/src/lib/errors.ts documents semantic CLI exit codes grouped into decades and kept below 128 to avoid Unix signal exits; shown mappings are GENERAL: 1, auth/identity AUTH_NOT_AUTHENTICATED: 10, AUTH_EXPIRED: 11, AUTH_INVALID: 12, AUTH_HOST_SCOPE: 13, input/config CONFIG: 20, VALIDATION: 21, CONTEXT_MISSING: 22, RESOLUTION: 23, API/network API: 30, TIMEOUT: 31, and feature/billing SEER_NOT_ENABLED: 40, SEER_NO_BUDGET: 41.