Dashboard › cli › Distillation
fea1a332-d27a-47ba-b76a-1604fa827293["lore_tm_v1_WFmRxyycIt8uyOsGl8CaXZSqdl8ERBT1dnxt6HWle7s","lore_tm_v1_AZ-9xlzEiB6W6KhAnLC4fMDBqdpwc6g2w3IA602048c"]
Date: Sep 10, 2026
package.json must always be checked for the latest scripts; commands run from packages/cli or from repo root via pnpm --filter sentry run <script>.devDependencies, never dependencies, because everything is bundled at build time via esbuild; CI enforces this with pnpm run check:deps.pnpm add -D <package> using the -D flag.apps/cli-docs/src/content/docs/contributing.md in the project-structure block generated by script/generate-docs-sections.ts; it must not be duplicated to avoid drift. Current commands can be checked with ls src/commands/ or sentry --help.async *func() generators, yield new CommandOutput(data), and return { hint }; output.human must receive the same data serialized to JSON; command wrappers inject --json and --fields, so commands must not add their own json flag, call stdout.write(), or branch on if (flags.json).DRY_RUN_FLAG and DRY_RUN_ALIASES for consistent dry-run support.buildPaginationContextKey(), resolveCursor(), advancePaginationState(), hasPreviousPage(), and nextCursor/hasMore state as shown for entity/org/project context.per_page value larger than API_MAX_PER_PAGE to the API because the server silently caps it and commands would return fewer requested items.CliError base class in src/lib/errors.ts.fuzzyMatch() from src/lib/fuzzy.ts and show at most 5 similar candidates rather than listing all entities.src/lib/*.ts utility file.src/lib/list-command.ts provides the buildOrgListCommand factory and shared Stricli constants LIST_TARGET_POSITIONAL, LIST_JSON_FLAG, LIST_CURSOR_FLAG, and buildListLimitFlag; it should be used for simple entity lists such as team list and repo list.fcAssert, property, and { numRuns: DEFAULT_NUM_RUNS } where applicable.test/lib/db/model-based.test.ts and test/lib/db/dsn-cache.model-based.test.ts.*.property.test.ts file, unit tests must not re-check the same invariants with hardcoded examples; the companion property test must be checked first.src/commands/<domain>/; Sentry API types in src/types/sentry.ts; config types in src/types/config.ts; Seer types in src/types/seer.ts; utilities in src/lib/; DSN language support in src/lib/dsn/languages/; DB operations in src/lib/db/; build scripts in script/; property tests in test/lib/<name>.property.test.ts; model-based tests in test/lib/db/<name>.model-based.test.ts; unit tests in test/ mirroring src/; E2E tests in test/e2e/; model-test helpers in test/model-based/helpers.ts; documentation in docs/src/content/docs/; and hand-written command docs in docs/src/fragments/commands/.packages/cli/src/lib/token-host.ts, including isHostTrusted() at line 31 and isHostTrustedForClaim() at line 140; token claim parsing in packages/cli/src/lib/token-claims.ts via parseSntrysClaim() at line 43; and getConfiguredSentryUrl() in packages/cli/src/lib/constants.ts, which derives a normalized URL from an sntrys_ claim in SENTRY_AUTH_TOKEN or SENTRY_TOKEN.packages/cli/src/lib/db/auth.ts: SENTRY_AUTH_TOKEN takes priority over SENTRY_TOKEN, matching legacy sentry-cli behavior.