Dashboard › cli › Distillation
1cdd3903-79eb-4266-a620-e5008f8e6f4a["lore_tm_v1_p3i_CRiiOJpDytkGeZGP0viyvywYznxwD4kOK_hg7IE","lore_tm_v1_day0P0ufo69CDdXqQfkSErmwMXLG3JGuA2tSJzmUo5Q","lore_tm_v1_mEJoAbq99ex_HFd9gCO6Lv4520DvjN6ssteoHYD84KA","lore_tm_v1_S__Wv9U8fYfX_3inaKk4QxJEyHI7bj6dRnZIE7Aj7pM","lore_tm_v1_pNoM2ri0oHGkON24eLZGXYEE4uf2-BDCohjKp4cs23Y"]
getsentry/cli references in packages/cli/package.json, packages/cli/README.md, packages/cli/warden.toml, tests including packages/cli/test/lib/upgrade.test.ts, packages/cli/test/lib/api/releases.test.ts, packages/cli/test/lib/api/issues.test.ts, packages/cli/test/lib/db/repo-cache.test.ts, packages/cli/test/lib/binary.test.ts, packages/cli/test/lib/ghcr.test.ts, and source files including packages/cli/src/lib/release-notes.ts, packages/cli/src/lib/ghcr.ts, and the packages/cli/install script.packages/cli/install is a 354-line Bash installer using set -euo pipefail; it defines report_error() for fire-and-forget Sentry envelope telemetry, with opt-out via SENTRY_CLI_NO_TELEMETRY=1, and states that telemetry “never blocks installation or propagates failures” and must “never fail the script.”packages/cli/install telemetry uses the CLI’s public write-only DSN, collects no PII, tags errors with os, arch, libc, requested release channel, step, and install version, and sends with curl -sf --max-time 2 to the Sentry envelope API from a background subshell using set +e.gen_uuid() in packages/cli/install tries /proc/sys/kernel/random/uuid, then uuidgen lowercased, then a 32-character hexadecimal awk fallback. report_error() removes UUID hyphens, generates a UTC %Y-%m-%dT%H:%M:%SZ timestamp, JSON-escapes backslashes, quotes, and newlines via _esc(), and defaults missing message/step/version values to unknown.die() in packages/cli/install prints a red error to stderr, invokes report_error, runs wait 2>/dev/null || true so background telemetry may finish without propagating its status, then exits 1. An ERR trap reports Unexpected failure at line $LINENO with step trap.packages/cli/install supports -h|--help, -v|--version <version>, --no-modify-path, --no-completions, and --no-agent-skills; environment variables include SENTRY_INSTALL_DIR, SENTRY_VERSION, and SENTRY_INIT=1.packages/cli/install maps Darwin to darwin, Linux to linux, and MINGW/MSYS/CYGWIN to windows; maps x86_64 to x64 and aarch64|arm64 to arm64; rejects unsupported OS/architecture values and supports only windows-x64 among Windows combinations.packages/cli/install checks /lib/ld-musl-${musl_arch}.so.1 first and then searches ldd --version for musl; musl builds use libc_suffix="-musl" and libc_variant="musl".packages/cli/install checks for libstdc++; on Alpine with root it runs apk add --no-cache libstdc++ libgcc, while a non-root user is told to run apk add libstdc++ libgcc and installation terminates because Bun musl binaries dynamically link libstdc++ and libgcc_s.${TMPDIR:-${TMP:-${TEMP:-/tmp}}}/sentry-install-$$${suffix} and is initially protected by trap 'rm -f "$tmp_binary"' EXIT.packages/cli/install performs 6 steps: 1. anonymously obtains a GHCR pull token with curl -sf and awk; 2. fetches the OCI nightly manifest with bearer authorization and Accept: application/vnd.oci.image.manifest.v1+json; 3. extracts manifest annotation version with awk; 4. finds the digest for sentry-${os}-${arch}${libc_suffix}${suffix}.gz by tracking the most recently seen digest until matching org.opencontainers.image.title; 5. manually extracts the GHCR redirect URL without curl -L; 6. downloads the redirected blob without authorization and pipes it through gunzip into $tmp_binary.curl -L for authenticated GHCR blob requests because forwarding the Authorization header to Azure Blob Storage produces HTTP 404.ghcr-token, ghcr-manifest, ghcr-version, ghcr-digest, and ghcr-redirect; a missing platform layer reports No nightly build found for ${gz_filename}.https://api.github.com/repos/getsentry/cli/releases/latest unless a version was requested, strips a leading v, and downloads https://github.com/getsentry/cli/releases/download/${version}/sentry-${os}-${arch}${libc_suffix}${suffix}.curl -fsSL "${url}.gz" | gunzip > "$tmp_binary" because it is approximately 37 MB versus approximately 99 MB for the raw binary (about 60% smaller); if that fails, it downloads the raw asset with curl -fsSL --progress-bar "$url" -o "$tmp_binary".packages/cli/install runs chmod +x "$tmp_binary" and delegates installation to "$tmp_binary" cli setup with --install --method curl --channel nightly|stable, conditionally forwarding --no-modify-path, --no-completions, and --no-agent-skills; it removes the EXIT trap first because setup handles successful cleanup.SENTRY_INIT=1, packages/cli/install searches ${SENTRY_INSTALL_DIR:-}, $HOME/.local/bin, $HOME/bin, and $HOME/.sentry/bin in order for an executable sentry; it requires /dev/tty and then executes "$sentry_bin" init </dev/tty.packages/cli/package.json defines package sentry version 0.40.0-dev.0, repository git+https://github.com/getsentry/cli.git, "type": "module", Node engine >=18.0, development runtime Node >=22.15, package manager pnpm@10.11.0, and binary mapping "sentry": "./dist/bin.cjs".packages/cli/package.json exports ESM from ./dist/index.mjs with types ./dist/index.d.mts, CommonJS from ./dist/index.cjs with types ./dist/index.d.cts, and uses ./dist/index.cjs as main.packages/cli/package.json are dist/bin.cjs, dist/index.cjs, dist/index.mjs, dist/index.d.cts, dist/index.d.mts, dist/ink-app.js, dist/node-sqlite3-wasm.wasm, dist/vendor/symbolic_bg.wasm, LICENSE.md, and README.md.build using script/build.ts --single, build:all using script/build.ts, bundle using script/bundle.ts, typecheck using tsc --noEmit, lint/lint:fix using Biome, test delegating to test:unit, test:unit running Vitest over test/lib test/commands test/types test/script --coverage, test:changed using vitest run --changed, and test:e2e running vitest run test/e2e.package.json for the latest scripts before running project commands.devDependencies, never dependencies, because everything is bundled at build time with esbuild; CI enforces this through pnpm run check:deps.pnpm add -D <package> with the -D flag.buildRouteMap from ../../lib/route-map.js, never directly from @stricli/core, because the wrapper injects standard aliases according to available route keys; the visible alias example maps delete to remove and rm.isPlainOutput() is SENTRY_PLAIN_OUTPUT > NO_COLOR > FORCE_COLOR when TTY-only conditions apply > !isTTY.packages/cli/src/lib/version-check.ts, packages/cli/src/lib/upgrade.ts, packages/cli/src/lib/scan/binary.ts, packages/cli/src/lib/release-notes.ts, packages/cli/src/lib/ghcr.ts, packages/cli/src/lib/db/version-check.ts, packages/cli/src/lib/binary.ts, packages/cli/src/lib/delta-upgrade.ts, packages/cli/src/commands/cli/upgrade.ts, and corresponding tests in packages/cli/test/lib/, packages/cli/test/e2e/delta-upgrade.test.ts, and packages/cli/test/commands/cli/upgrade.test.ts.