How to Disable Telemetry in Claude Code, Bun, Next.js, Astro, and Other CLIs with One Block of Env VarsBrief · digest for November 28
Brief≈ 1 min

How to Disable Telemetry in Claude Code, Bun, Next.js, Astro, and Other CLIs with One Block of Env Vars

Almost every CLI tool sends usage stats and crash reports by default. Disabling collection manually per project is tedious, and local configs don't survive CI builds. It's simpler to add seven environment variables once to ~/.zshrc or ~/.bashrc.

All seven flags are official and cover Claude Code, Bun, Supabase CLI, Cloudflare Wrangler, GitHub CLI, Next.js, Astro, and Vercel CLI. gh collects telemetry too—GH_TELEMETRY=false or DO_NOT_TRACK=1 turns it off.

# Claude Code, Bun, Supabase, and GitHub CLI
export DO_NOT_TRACK=1
# Disable Claude Code crash reports to Sentry
export DISABLE_ERROR_REPORTING=1

# Wrangler and GitHub CLI expect false instead of 1
export WRANGLER_SEND_METRICS=false
export GH_TELEMETRY=false

# Next.js, Astro, and Vercel CLI
export NEXT_TELEMETRY_DISABLED=1
export ASTRO_TELEMETRY_DISABLED=1
export VERCEL_TELEMETRY_DISABLED=1

Apply the edits with source ~/.zshrc. Note two Claude Code quirks: DO_NOT_TRACK=1 also disables remote feature flags like Remote Control (/rc), while DISABLE_ERROR_REPORTING=1 only stops error reports. Also, Claude Code checks whether the variable is set at all: =0 won't turn it back on—you have to unset it. Desktop editors (Cursor, Codex, Antigravity) disable data collection in their UI settings.

Want a deep diveVotes help us choose what to break down in detail. This material has 0 votes.
Sources · 9