Dashboard › cli › Distillation
3235b71a-3f06-4090-9914-bcfa623ba24a["lore_tm_v1_v_-3Fz0E-lCYdmjQeD_Pv5y06QSZEUQLnyF8FHT2UJk","lore_tm_v1_SFKCv9_FE-mi8bPJXi3wR2leyd3HgwlK9DF-iiTdOHI","lore_tm_v1_GpO5RRAItk_bVeLzC1mpuwqalBgYPVI7PaySolv3Cxg","lore_tm_v1_ZtQtldG3i1yKtVvUtMh12FsKnfUzdzIv4ErNw_vFSSk","lore_tm_v1_AaFcySrR_A4iVwFeWZ1hyJ8r3y0hzuwpd4TxrPqmTFg","lore_tm_v1_R9cNhwGF0c_eHGPbc7FktuPDOYfO4lhStGVgHBRs1Ns","lore_tm_v1_rs9XZIuFHYa8187W0MLMD9FHsZwAqpqvoivfp-oQGZg","lore_tm_v1_lGiM5CHHalT-mKvaP9OFJnsKEHWNYCCPtGcVWAYo4J0","lore_tm_v1_XhijUBldJX6mLseFJQFZqMMVl3ticV2c5HZI3EAiNnk","lore_tm_v1_vtc6Nco4XJOvgbTB1JVq9KvzjTjE3h-OW3n_nrIvsRk","lore_tm_v1_HB4NboPBIRXxFR4wUSbrpwOo2njufmtioqMTsQUWPaI","lore_tm_v1_fGdzesgq7Tic_4vdy4QnslpOrGHjWOcjRc_ADGMwMEQ","lore_tm_v1_oVa8HCsUQ1-jIe4JScQRVjw7QOMJcYeSviW6v2DNq_0","lore_tm_v1_weSS0dP_Qkmz72m60IyHkLpsqdgZPWbLR1uhkmnmKFs","lore_tm_v1_Q7OMJMQe9Mgp_0y4YkntBGC9nGpM0sCkSPc8QeRLFqA","lore_tm_v1_i0nTybTVo2Zr5mcZNQyLRbqmWRbkSXIqpO0wIt9Oq1s"]
packages/cli/src/index.ts is the library entry point and exposes createSentrySDK() as the public API: it calls createSDKMethods(buildInvoker(options)), creates run via buildRunner(options), and returns Object.assign(methods, { run }); it defaults-exports createSentrySDK, exports SentryError, SentryOptions, SentrySDK, and AsyncChannel, and re-exports startCli as internal _cli for dist/bin.cjs.createSentrySDK() typed methods bypass Stricli string dispatch and invoke command handlers directly with pre-built flags, while run() remains an arbitrary-command escape hatch; documented examples include sdk.org.list(), sdk.issue.list({ orgProject: "acme/frontend" }), sdk.run("--version"), and sdk.run("issue", "list", "-l", "5").packages/cli/test/commands/agent-conversation/list.test.ts adds a resolution-error test asserting the canonical command usage is exactly sentry agent-conversation list [<org>] when resolveOrg returns null.packages/cli/test/lib/command.test.ts adds structured-example introspection coverage: buildCommand() receives docs.examples = [{ description: "Select an organization explicitly", command: "sentry thing list my-org" }] and must retain the same array as __examples.packages/cli/test/lib/introspect.test.ts adds precedence coverage requiring buildCommandInfo() to prefer command metadata in __examples over legacy document examples; descriptions are converted to shell comments, producing # Use automatic organization detection\nsentry thing list and # Select an organization explicitly\nsentry thing list my-org, while the stale legacy example sentry thing list stale-org is discarded.packages/cli/test/script/generate-skill-markdown.test.ts replaces generated-file assertions for agent-conversation docs with direct command-metadata introspection through buildCommandInfo(listCommand, "sentry agent-conversation list") and buildCommandInfo(viewCommand, "sentry agent-conversation view").[<org>] and include example # Explicit organization\nsentry agent-conversation list my-org; view positional usage is [<org>/]<conversation-id> with ordered examples: 1. # View full transcript (organization auto-detected)\nsentry agent-conversation view conv-123, 2. # Explicit organization\nsentry agent-conversation view my-org/conv-123, 3. # JSON output\nsentry agent-conversation view my-org/conv-123 --json.formatCommandExamples(view.examples) is tested to emit **Examples:**, then a single bash fenced block containing the 3 agent-conversation view examples in metadata order, separated by blank lines.: and must never use a space-separated form. Valid examples include sentry project create web:javascript api:python-django worker:node and sentry project create my-new-app:javascript-nextjs; invalid forms include sentry project create my-new-app javascript-nextjs, sentry project create my-org/my-new-app javascript-nextjs, and sentry project create "My New App":.buildListCommand() is used in 15 located command definitions: packages/cli/src/commands/agent-conversation/list.ts, trace/list.ts, span/list.ts, alert/metrics/list.ts, alert/issues/list.ts, issue/list.ts, issue/events.ts, feedback/list.ts, explore.ts, event/list.ts, log/list.ts, dashboard/list.ts, release/list.ts, project/list.ts, and replay/list.ts.customUsage: packages/cli/src/commands/project/create.ts with ["[<org>/]<name>:<platform>..."], packages/cli/src/commands/agent-conversation/view.ts with [USAGE], and packages/cli/src/commands/agent-conversation/list.ts with [USAGE].--yes unless the command already defines it.”buildDeleteCommand() in packages/cli/src/lib/mutate-command.ts is a destructive-operation wrapper around buildCommand that auto-injects --yes, --force, and --dry-run, plus aliases -y, -f, and -n; existing flags or alias keys are preserved, and options.noForceFlag / options.noDryRunFlag can suppress their corresponding injection, but no option suppresses --yes.buildDeleteCommand() merges builderArgs.parameters.flags and .aliases into mergedFlags and mergedAliases; it assigns YES_FLAG, FORCE_FLAG, and DRY_RUN_FLAG, maps aliases to "yes", "force", and "dry-run", and passes the merged parameters into the wrapped command.buildDeleteCommand() pre-hook calls guardNonInteractive() unless options.noNonInteractiveGuard is set; non-interactive execution refuses to proceed without --yes or --force, while --dry-run bypasses the guard because it makes no changes. Commands remain responsible for data-dependent confirmation using confirmByTyping() and isConfirmationBypassed() inside func().packages/cli/script/check-fragments.ts validates documentation fragments against the CLI route tree: 1. every non-skipped route plus index.md has a fragment, 2. every fragment maps to a route or index, 3. fragments contain neither YAML frontmatter nor <!-- GENERATED:END -->, 4. required top-level fragments exist, and 5. fragments cover every subcommand, with warnings by default and errors under --strict.packages/cli/script/check-fragments.ts ensures src/generated/skill-content.ts exists before importing the app; if absent, it creates src/generated recursively and writes export const SKILL_FILES: [string, string][] = [];\n.DOCS_FRAGMENTS, sets command fragments to ${DOCS_FRAGMENTS}/commands, skips route "help" via SKIP_ROUTES, expects one .md file per route plus index.md, and requires the top-level fragment ${DOCS_FRAGMENTS}/configuration.md.fragmentMentionsSubcommand() in packages/cli/script/check-fragments.ts considers a subcommand documented when the fragment contains its full sentry <route> <subcommand> path, when a default command is represented by a bare sentry <route> match, or when a level 1–4 Markdown heading outside fenced code blocks mentions the leaf subcommand name.stripCodeBlocks() removes fenced backtick or tilde code blocks using FENCED_CODE_BLOCK_RE before heading checks, preventing shell comments in code blocks from being mistaken for Markdown headings.sentry ${route.name} and skip individual commands whose cmd.examples.length > 0; commands with structured examples are therefore treated as already covered without requiring fragment prose.findDefaultInRouteMap() identifies a route’s default command by object-reference comparison between target.getDefaultCommand() and entries from target.getAllEntries(); getDefaultCommandName(routeName) searches the top-level route map and returns that matching subcommand’s name.original.Fragment missing subcommand coverage: ${fragmentPath}, followed by Not documented: ${missing.join(", ")} and a hint such as sentry ${routeName} ${missing[0]}; findings enter warnings normally or errors with --strict, and validation exits with status 1 when errors exist.All ${actualFragments.size} command fragment files valid (${routeNames.size} routes + index) and All ${REQUIRED_TOP_LEVEL_FRAGMENTS.length} top-level fragment(s) valid.