Dashboard › cli › Distillation
db5c8a99-d537-45a4-971e-d5d0b07b0ebf["lore_tm_v1_wpL0AJNFdRmUwsWa0DldrQaQqlbNY5tn50cd5N2YQT4","lore_tm_v1_hyX3fFvYN3QsSXcQMOJIYJJwILtofuDoGI6JFGcBGX0","lore_tm_v1_Mpe9IbCpAIb6qaYxwCQaLaqCVwX2qo9fhICo7W3G494","lore_tm_v1_uVsKjNPM0d4SE8fz65fUGQlliPI21eoSVG9K2i4WhRc","lore_tm_v1_GegQg-Cy-Q0aKbq_55B8Q6MtZjc7R3Y6Cy9LXuhatR8","lore_tm_v1_CDt7StMhwjA8s9XbYNYGeicWal3yTfIhTP1iebGFrro","lore_tm_v1_lgsMMBHY5WFrG1IWZ5dch1a2tVygrjFwnCAI6k68YcE","lore_tm_v1_VNhjk7s2ZpEs6pCOhZPgyKn7YecMfxWnuiQwGlHWmY0"]
packages/cli/src/lib/env.ts states CLI mode never calls setEnv(), so getEnv() returns process.env; library mode calls setEnv() with a merged environment copy and never mutates the consumer’s process.env. The active environment is held in _env, initialized to process.env.packages/cli/test/lib/introspect.property.test.ts asserts extractFlags() always returns one FlagInfo per input entry and preserves every flag name; boolean flags default to optional=true when their definition omits optional.packages/cli/test/lib/introspect.property.test.ts asserts tuple positional parameters always produce angle-bracket placeholders: required parameters render as <placeholder>, optional parameters as [<placeholder>], and omitted placeholders fall back to arg${index}.packages/cli/test/lib/introspect.property.test.ts asserts array positional parameters always include an ellipsis (...).packages/cli/src/lib/introspect.ts models PositionalParams as either { kind: "tuple"; parameters: readonly PositionalParam[] } or { kind: "array"; parameter: PositionalParam }; PositionalInfo currently contains only placeholder, brief, and optional, without preserving whether the source positional was a tuple or array.getPositionalString() in packages/cli/src/lib/introspect.ts renders tuple positionals as space-separated <placeholder> or [<placeholder>], defaults missing tuple placeholders to arg${i}, and renders an array positional as <${placeholder}...> with fallback placeholder args.extractPositionals() in packages/cli/src/lib/introspect.ts maps tuple positionals using optional: p.optional ?? false, but maps every array positional to one entry with placeholder ${params.parameter.placeholder ?? "args"}... and hard-coded optional: true; this is the source of required array arguments being shown as optional in generated argument tables.buildCommandInfo() in packages/cli/src/lib/introspect.ts prefers cmd.__primaryUsage over getPositionalString(cmd.parameters.positional) for the command heading/signature, while structured argument tables independently use extractPositionals(cmd.parameters.positional).formatPositionalsTable() in packages/cli/script/generate-command-docs.ts renders each PositionalInfo as [<${p.placeholder}>] when p.optional is true and <${p.placeholder}> otherwise; it escapes angle brackets only in descriptions via escapeAngleBrackets().generateCommandSection() in packages/cli/script/generate-command-docs.ts builds the heading from cmd.path plus cmd.positional, then independently emits the arguments table from cmd.positionals, visible options from getVisibleFlags(cmd), and formatted examples from cmd.examples.packages/cli/test/lib/help-positional.test.ts runs commands through Stricli’s run(app, args, mockContext) with a forCommand({ prefix }) mock that sets commandPrefix; an intercepted 404 fetch preserves resolution-failure-to-help-recovery behavior while suppressing preload warnings.sentry issue list help, sentry project list help, and sentry span list help recover from resolution errors; sentry trace view help and sentry log view help recover from validation errors; the recovery hint includes sentry issue list --help.sentry help remains branded without a recovery tip, sentry help issue list uses introspected help without a recovery tip, and sentry help project create displays canonical syntax sentry project create [<org>/]<name>:<platform>....generateHelpTextForAllCommands(app) is tested to require sentry project create [<org>/]<name>:<platform>..., omit --platform and <name-or-platform>, and include the phrase cannot contain whitespace; parser-contract tests require removed flags --platform and -p to fail with /No (flag|alias) registered/.packages/cli/src/app.ts custom parsing errors handle three UX cases: bare route groups via detectBareRouteGroup(), extra positional/plural-alias misuse via detectPluralAliasMisuse() or getSynonymSuggestionFromArgv(), and unknown commands via getCommandSuggestion(routeContext, input).packages/cli/src/app.ts rethrows OutputError, AuthError with reason not_authenticated or expired, and ApiError statuses 401 or 403 to outer middleware; other command failures pass through reportCliError(), with rendered WizardError returning an empty string, other CliError instances formatted as Error: ${exc.format()}, and unexpected errors including their stack or stringified value.allowArgumentEscapeSequence: true, derives topLevelFlags from buildTopLevelFlags(), delegates exit codes to getExitCode, and uses renderJsonHelp(prefix, unprocessedInputs) for structured --help --json while leaving ordinary text help unchanged.packages/cli/node_modules/@stricli/core/dist/index.js implements each built command’s formatUsageLine(args) by calling formatUsageLineForParameters(builderArgs.parameters, args); route-group help calls each child route’s route.formatUsageLine() with the child route name appended to args.prefix. Therefore, changing or wrapping a command’s formatUsageLine affects the usage lines shown in parent route help.formatDocumentationForPositionalParameters(positional, args); command construction reserves flags help, helpAll, and help-all, and alias h.