1#!/usr/bin/env node2// Turn Expo skills usage telemetry on or off, or check its status.3//4// Telemetry is OFF by default (opt-in) — nothing is sent until you enable it here or5// via EXPO_SKILLS_TELEMETRY=1. Usage:6// node telemetry.cjs --status # show whether telemetry is on/off and why7// node telemetry.cjs --on # enable (writes the opt-in marker)8// node telemetry.cjs --off # disable (removes the opt-in marker — the default)9//10// The opt-in marker is the reliable switch: it works no matter how the agent was11// launched. EXPO_SKILLS_TELEMETRY=1/0 and DO_NOT_TRACK also work (handy for CI), but12// env vars don't always reach hook subprocesses.1314const fs
51 fs.writeFileSync(OPT_IN_PATH, "Expo skills telemetry enabled by user.\n");
52 console.log(`Telemetry enabled — wrote ${OPT_IN_PATH}`);
53 if (telemetryEnvSignal() === "off") console.log("Note: an env var (EXPO_SKILLS_TELEMETRY=0 / DO_NOT_TRACK) still forces it OFF; unset it to send.");
54 else if (isCI()) console.log("Note: this looks like CI, where telemetry stays OFF regardless.");
55 console.log("Turn off any time with: telemetry.cjs --off");