Dashboard › cli › Distillation
2f83f0e1-a117-46c6-98c4-5ff7a88e4586["lore_tm_v1_kXzgq3-6r7QOtqVSpv6wdGoSlM9Q1xHYALgd9IO5VuI"]
packages/cli/script/generate-command-docs.ts defines getVisibleFlags(cmd: CommandInfo): FlagInfo[], filtering out flags where f.hidden is true or GLOBAL_FLAG_NAMES contains f.name; this excludes hidden and globally injected flags such as --json and --fields.formatFlagRow(flag: FlagInfo, aliases: Record<string, string>): string finds the first alias whose mapped value equals flag.name, then renders syntax beginning with --${flag.name} or -${alias}, --${flag.name}.formatFlagRow() appends <${flag.name}> for non-variadic "parsed" and "enum" flags, and appends <${flag.name}>... for any variadic flag.formatFlagRow() uses flag.brief as the description and appends (default: ${JSON.stringify(flag.default)}) only when flag.default !== undefined, the flag is not boolean, and the brief does not already contain the case-sensitive text "default:"; it returns a Markdown row in the form | `${syntax}` | ${desc} |.escapeAngleBrackets(text: string): string replaces every < with < and every > with > so literal angle brackets are not interpreted as HTML tags.formatPositionalsTable(positionals: PositionalInfo[]): string returns "" for no positionals; otherwise it emits an **Arguments:** Markdown table with columns Argument and Description.formatPositionalsTable() renders required arguments as `<${p.placeholder}>`, optional arguments as `[<${p.placeholder}>]`, and passes p.brief through escapeAngleBrackets().formatFlagsTable(flags: FlagInfo[], aliases: Record<string, string>): string returns "" for no flags; otherwise it emits an **Options:** Markdown table with columns Option and Description, using formatFlagRow(flag, aliases) for each flag in input order.generateCommandSection(cmd: CommandInfo): string creates a level-3 Markdown heading using ### `${cmd.path} ${cmd.positional} when `cmd.positional` is nonempty, otherwise### ${cmd.path}`` ``, followed by cmd.brief`.generateCommandSection() conditionally adds the arguments table when cmd.positionals.length > 0, filters options through getVisibleFlags(cmd) and adds their table only when visible flags remain, then appends formatCommandExamples(cmd.examples) when that result is nonempty.isStandaloneCommand(route: RouteInfo): boolean identifies a standalone command only when route.commands.length === 1 and route.commands[0].path === \sentry ${route.name}``.