Dashboard › cli › Distillation
0708cd17-5719-4caf-8f3e-802c4fc8e4fb["lore_tm_v1_Wlk2neGbGrtv1FFroL2Zaw8M03MPpDUfZEjnRr2vcYs","lore_tm_v1_y7zoMpS_zYx1ZLy3M5AogvLWxndVdh8xCh_S-ECNYSg","lore_tm_v1_ZEOEtYykFLhtvJRa-hjClSDizV4vZloyOGQs1O713gA","lore_tm_v1_MLv7yqPNNIX7O8ejeFTRBbZhIypkZS-CaoxglgcZWWA","lore_tm_v1_xh_0hPwiyaxp651QHsq-YXkfFdO74nFpc1X3V01KuHE","lore_tm_v1_x8l5o_Wm1nhHF7pAJqcNlthDzKNR6TTi-QNva7l71w4","lore_tm_v1_GsGf1Ai5r0FKNO1Bj9MkV8GIOSulcyVmsp6OlqGLsJ0","lore_tm_v1_RQKNleylXlHFDGl4OotbKjF12O054P3TsgUncJpA67o","lore_tm_v1_hxiEUbmoRE9nPQ6viXDbO541rItp5bEuotfV4z93_8o"]
packages/cli/src/lib/introspect.ts defines non-standard command metadata __jsonSchema?: import("valibot").GenericSchema, __primaryUsage?: string, and __examples?: readonly CommandExample[]; CommandInfo includes examples: string[], fullDescription?: string, positionals: PositionalInfo[], and optional jsonFields?: SchemaFieldInfo[].buildCommandInfo() in packages/cli/src/lib/introspect.ts lines 283-307 uses cmd.__primaryUsage ?? getPositionalString(cmd.parameters.positional) for positional; canonical cmd.__examples take precedence and are mapped to exact strings of the form # ${description}\n${command}, while the examples argument is only a fallback.extractRouteGroupCommands() recursively traverses visible nested route maps and passes documentation examples from docExamples: Map<string, string[]> into buildCommandInfo(); extractAllRoutes() synchronously extracts all visible routes without loading external documentation examples.resolveCommandPath() in packages/cli/src/lib/introspect.ts supports nested groups, excludes hidden entries, returns up to MAX_SUGGESTIONS = 3 fuzzy matches via fuzzyMatch(), and rewrites nested command paths using SENTRY_PREFIX_RE = /^sentry /.packages/cli/src/lib/help.ts top-level branded help defines 5 common flags in order: 1. --json — “Output as JSON (with --fields to select)”; 2. -f, --fresh — “Bypass cache and fetch fresh data”; 3. -v, --verbose — “Enable debug logging”; 4. --help — “Show help for a command”; 5. --version — “Show version”.printCustomHelp() in packages/cli/src/lib/help.ts emits the tagline The command-line interface for Sentry, dynamically generated commands, common flags, top-level environment variables, a context-dependent example (sentry auth when logged out or sentry issue list when logged in), and https://cli.sentry.dev/getting-started/; sixel/block-art banner probing occurs only when process.stdout.isTTY.HelpJsonResult in packages/cli/src/lib/help.ts is the union of the full { routes, envVars, flags } tree, CommandInfo, RouteInfo, or { error: string; suggestions?: string[] }; introspectAllCommands() builds the full tree, while introspectCommand() resolves a command/group or returns Command not found: <path> with optional fuzzy suggestions.renderJsonHelp() in packages/cli/src/lib/help.ts handles --help --json, optionally applies --fields through filterFields(), returns formatJson(final) plus a trailing newline, and returns undefined without --json so Stricli uses built-in text help.packages/cli/src/lib/help.ts uses isVersionRequest(), isRecoverableUnknownCommand(), and rewriteHelpJsonToHelpCommand(); --version is recognized only before --, -v remains verbose, and recoverable unknown-command forms are a version request, a --help --json request, or an argv ending in help.parseHelpJsonFlags() scans only before --, recognizes spaced and inline --fields, collects leftover non-flag tokens as extraPath, and skips spaced values for value-taking global flags derived from GLOBAL_FLAGS, excluding fields; consumeFieldsFlag(), consumeValueFlag(), VALUE_FLAG_TOKENS, and isValueFlagToken() implement this behavior.formatCommandHuman() in packages/cli/src/lib/help.ts renders only the command signature, brief, visible flags, and JSON fields; it does not render fullDescription, positional argument details, aliases as a separate section, or examples.formatGroupHuman() renders sentry ${group.name}, the group brief, and aligned subcommand names/descriptions; nested paths such as sentry dashboard widget add are displayed as widget add.formatHelpHuman() is bypassed for --json, preventing printCustomHelp() sixel probing and terminal I/O.formatHelpHuman() dispatches full-tree data to printCustomHelp().trimEnd(), route groups to formatGroupHuman(), commands to formatCommandHuman(), and errors to Error: ...; errors with suggestions append Did you mean: ...? using one-, two-, or Oxford-comma three-item grammar.packages/cli/test/script/generate-skill-markdown.test.ts line 54 expects "**Examples:**", while packages/cli/test/lib/introspect.test.ts lines 201 and 223 set and assert fullDescription: "List all the things.".packages/cli/plugins/sentry-cli/skills/sentry-cli/references/agent-conversation.md version 0.45.0-dev.0 contains examples for sentry agent-conversation list: 1. sentry agent-conversation list; 2. sentry agent-conversation list my-org; 3. sentry agent-conversation list --limit 50 --period 24h; 4. sentry agent-conversation list -q "has:errors"; 5. sentry agent-conversation list my-org -c next.sentry agent-conversation view: 1. sentry agent-conversation view conv-123; 2. sentry agent-conversation view my-org/conv-123; 3. sentry agent-conversation view my-org/conv-123 --json.packages/cli/plugins/sentry-cli/skills/sentry-cli/references/agent-conversation.md documents list flags -n, --limit <value> with range 1-1000 and default "25", -q, --query <value>, -t, --period <value> with default "7d", -f, --fresh, and -c, --cursor <value>; it also lists 18 JSON fields: conversationId, title, flow, errors, llmCalls, toolCalls, totalTokens, totalCost, startTimestamp, endTimestamp, traceCount, traceIds, firstInput, lastOutput, user, toolNames, and toolErrors.packages/cli/script/paths.ts centralizes documentation paths relative to packages/cli/: DOCS_ROOT = "../../apps/cli-docs", DOCS_SRC = \${DOCS_ROOT}/src`, DOCS_CONTENT = `${DOCS_SRC}/content/docs`, DOCS_FRAGMENTS = `${DOCS_SRC}/fragments`, and DOCS_PUBLIC = `${DOCS_ROOT}/public``.