Dashboard › cli › Distillation
cb219faa-cd4e-485f-a65a-21ad4f1d7a78["lore_tm_v1_9TjLcypNPI3Lua88Vwd2-JkqqZLpLJhjhsdIzeYn14I","lore_tm_v1_71WtQFaT7kkXD8ZSREMXXK5eD7N6uQB0trhVchKKmow","lore_tm_v1_mdiVls94CXH9nxcr_kTKAn87vEe8uUz7nhswMCn8TcE","lore_tm_v1_7v8HjE5ysNJwRCMxTQiHCD9_--5jF9J-oOd_be0hSkY","lore_tm_v1_ekkRgatXIQ91NgAA0fVPcOLhUmSgVsV6sc-gtt-sj4E"]
getsentry/cli; notable production references include GitHub release URLs in packages/cli/src/lib/binary.ts, GitHub commit API pagination in packages/cli/src/lib/release-notes.ts, and GHCR repository configuration in packages/cli/src/lib/ghcr.ts.packages/cli/src/lib/release-notes.ts line 662 builds https://api.github.com/repos/getsentry/cli/commits?sha=main&since=${sinceDate}&until=${untilDate}&per_page=100.packages/cli/src/lib/ghcr.ts exports GHCR_REPO = "getsentry/cli" at line 134; comments identify the public package as ghcr.io/getsentry/cli.package.json for the latest scripts. Commands run from packages/cli, or from the repository root via pnpm --filter sentry run <script>.packages/cli/AGENTS.md are: pnpm install from the repository root; pnpm run dev; pnpm run cli -- <args>; pnpm run build; pnpm run build:all; pnpm run typecheck; pnpm run lint; pnpm run lint:fix before committing; pnpm run test:unit; pnpm run test:e2e; pnpm exec vitest run test/lib/foo.test.ts; and pnpm exec vitest for watch mode.devDependencies, never dependencies, because everything is bundled via esbuild; CI enforces this using pnpm run check:deps.pnpm add -D <package>, always including the -D flag.@sentry/api provides API response types, the project imports them directly from @sentry/api rather than creating redundant Zod schemas in src/types/sentry.ts.node:* APIs and must not reintroduce Bun.* globals, bun:test, or bun CLI commands.execFileSync with an argument array over execSync with a command string to avoid shell injection.buildCommand from ../../lib/command.js, never directly from @stricli/core; the wrapper adds telemetry, injects --json/--fields, and handles output rendering. Commands use async *func() generators, yield new CommandOutput(data), and must not add a custom json flag, call stdout.write(), or branch on flags.json.buildRouteMap from ../../lib/route-map.js, never directly from @stricli/core. Standard aliases are auto-injected in this order: list → ls; view → show; delete → remove, rm; create → new; these aliases must not be manually duplicated.buildDeleteCommand(), which injects --yes, --force, and --dry-run with aliases -y, -f, and -n; it rejects non-interactive destructive execution without --yes or --force, while dry-run bypasses the guard. Create commands use DRY_RUN_FLAG and DRY_RUN_ALIASES.LIST_CURSOR_FLAG, buildPaginationContextKey(), resolveCursor(), advancePaginationState(), hasPreviousPage(), and paginationHint(). Navigation supports -c next, -c prev, and -c first; "last" is a silent alias for "next".buildOrgListCommand for fully automatic simple org-scoped lists; 2. dispatchOrgScopedList with overrides for mostly automatic project/issue lists; 3. buildListCommand with manual pagination for trace/span/dashboard lists.--limit exceeds API_MAX_PER_PAGE (100), commands transparently fetch multiple pages, calculate perPage as Math.min(flags.limit, API_MAX_PER_PAGE), and iterate for at most MAX_PAGINATION_PAGES until results.length >= flags.limit or no nextCursor remains.per_page value larger than API_MAX_PER_PAGE to the API; the server silently caps larger values, which otherwise causes commands to return fewer items than requested.packages/cli/src/lib/binary.ts imports compare as semverCompare from semver; compareVersions(a, b): -1 | 0 | 1 returns semverCompare(a, b). Its JSDoc is stale and still says it uses Bun.semver.order, despite the Node.js-only rule and actual semver implementation.packages/cli/src/lib/binary.ts defines InstallationMethod as "curl" | "brew" | "npm" | "pnpm" | "bun" | "yarn" | "unknown", while VALID_METHODS excludes "unknown" and contains "curl", "brew", "npm", "pnpm", "bun", and "yarn" in that order. parseInstallationMethod(value) lowercases input and throws Invalid method: ${value}. Must be one of: ${VALID_METHODS.join(", ")} if unsupported.isMusl() in packages/cli/src/lib/binary.ts returns false outside Linux and caches its Linux result in cachedIsMusl. It first checks /lib/ld-musl-${muslArch}.so.1, where x64 maps to x86_64 and every other architecture maps to aarch64; it then runs ldd --version, concatenates stdout and stderr, and checks case-insensitively for "musl". If ldd fails or is absent, it assumes glibc and returns false.getPlatformBinaryName() maps process.platform to darwin, windows, or default linux; maps process.arch === "arm64" to arm64 and all other architectures to x64; appends -musl when isMusl() is true and .exe on Windows; and returns sentry-${os}-${arch}${libcSuffix}${suffix}.isNightlyVersion(version) returns version.includes("-dev."); documented nightly format is X.Y.Z-dev.<unix-seconds>.packages/cli/src/lib/binary.ts found exactly 22 exported or internal binary-management declarations, including KNOWN_CURL_DIRS, InstallationMethod, VALID_METHODS, parseInstallationMethod(), isMusl(), getPlatformBinaryName(), getBinaryDownloadUrl(), GITHUB_RELEASES_URL, isNightlyVersion(), compareVersions(), isDowngrade(), getBinaryFilename(), getBinaryPaths(), determineInstallDir(), getGitHubHeaders(), fetchWithUpgradeError(), replaceBinarySync(), cleanupOldBinary(), acquireLock(), handleExistingLock(), releaseLock(), and installBinary().packages/cli/src/lib/scan/binary.ts: BINARY_EXTENSIONS, isLikelyBinary(), classifyByExtension(), and readHeadAndSniff().