| name | no-telemetry |
| description | Disable and verify telemetry opt-outs for JS/TS libraries (Next.js, Prisma, Turborepo, Storybook, etc.). Use after scaffolding, after adding dependencies, or before opening a PR. Offline, no network, structured JSON + exit codes. |
no-telemetry
Detect installed JS/TS libraries that collect telemetry and set the correct environment variables to disable it. Verify the result for CI and agents.
When to run
- After scaffolding a new app (
create-next-app, npm create, etc.)
- After
pnpm add / npm install / yarn add of framework or CLI tooling
- Before opening a PR, or as a CI step
- When the user asks to disable telemetry or prove it is off
- When you need to know which libraries are covered (
list / why)
Commands (copy-paste)
npx no-telemetry init -y --json=compact
npx no-telemetry check --json=compact
npx no-telemetry doctor --json=compact
npx no-telemetry list --json=compact
npx no-telemetry why next --json=compact
Optional:
npx no-telemetry init -y --target .env.local
npx no-telemetry init -y --example
npx no-telemetry init -y --target stdout
npx no-telemetry doctor --only installed
npx no-telemetry check --ignore netlify-cli
npx no-telemetry check --json --quiet
Exit codes
| Code | Meaning |
|---|
0 | Success (doctor always; check when policy passes; init applied or noop) |
1 | Policy failure - check found enabled telemetry; or user aborted init |
2 | Tool/usage error - bad flags, no package.json, or non-interactive init without --yes |
Agents must pass --yes / -y for init. Non-TTY and CI=true sessions refuse to prompt.
Prefer --json=compact (or --json --quiet) for agent pipes - one line, no pretty-print padding.
Interpreting --json
Top-level shape (version: 1) for doctor/check/init:
summary.enabled / summary.disabled / summary.applicable
libraries[]: id, status, failsCheck, env[] with source (process-env | env-file | unset)
actions[] on init (adds / placeholder fills / conflicts)
--only filters libraries[]; summary always describes the full post---ignore policy set.
list returns { version: 1, libraries: [...] } (full registry).
why returns a single-entry object with id, env, docs, notes, …
Status tokens: disabled | enabled | not_applicable | not_found | unsupported.
check fails when any non-ignored library has failsCheck: true (status enabled).
Bindings may report multiple accepts values or "non-empty". Alternate signals use OR semantics by default. If a why / list row reports alternatePolicy: "fallback", its alsoSatisfiedBy values apply only while the primary env key is unset.
Rules
- Never send network requests as part of this tool - it is offline by design.
- Do not invent env vars - only write what
init plans.
- Do not overwrite conflicting values; report conflicts and let the human fix them.
- Prefer committing opt-out vars that belong in the project (
.env / .env.local / .env.example per team policy). Do not commit secrets; these opt-outs are not secrets.
- After changing dependencies, re-run
check --json=compact.
- Use
list / why <id> before guessing coverage.
Programmatic (Node)
import { scan, planInit, applyInit, failsCheck, buildReport, REGISTRY } from "no-telemetry";
const results = scan(process.cwd());
if (results.some(failsCheck)) {
const plan = planInit(process.cwd());
applyInit(process.cwd(), plan);
}