|
| 1 | +--- |
| 2 | +title: Usage data |
| 3 | +description: What the CLI reports about how it is used, what it never sends, and how to turn reporting off |
| 4 | +--- |
| 5 | + |
| 6 | +The `sim` CLI reports anonymous usage data so the team can see which commands |
| 7 | +are used, which fail, and how long they take. Reporting is on by default and |
| 8 | +takes one command to turn off. |
| 9 | + |
| 10 | +## What is sent |
| 11 | + |
| 12 | +One event per command, after the command finishes: |
| 13 | + |
| 14 | +| Field | Example | Notes | |
| 15 | +| --- | --- | --- | |
| 16 | +| Command | `workflows list` | The command's name, never its arguments | |
| 17 | +| Flags | `--output`, `--workspace` | Flag names only, never their values | |
| 18 | +| Argument count | `1` | How many positional arguments, never what they were | |
| 19 | +| Outcome | exit code `0`, `SimApiError`, HTTP `404`, API code `NOT_FOUND` | Never an error message | |
| 20 | +| Duration | `1432` ms | From process start to completion | |
| 21 | +| CLI, Node, OS, CPU | `2.1.2`, `22.14.0`, `darwin`, `arm64` | | |
| 22 | +| Terminal and CI | `is_tty`, `is_ci` | Whether stdout is a terminal, whether a CI variable is set | |
| 23 | +| Coding agent | `claude-code` | When the CLI runs inside an AI coding agent's shell | |
| 24 | +| Deployment kind | `hosted` or `self_hosted` | Never the address | |
| 25 | +| Device and session ids | random UUIDs | See below | |
| 26 | + |
| 27 | +## What is never sent |
| 28 | + |
| 29 | +Nothing you type. No argument values, flag values, file paths, workflow or |
| 30 | +workspace ids, error messages, environment variable values, credentials, or the |
| 31 | +address of the deployment you talk to. The report leaves your machine from a |
| 32 | +separate short-lived process that is not given your API key. |
| 33 | + |
| 34 | +## Identity |
| 35 | + |
| 36 | +The first run mints a random device id and stores it in `telemetry.json` under |
| 37 | +`~/.sim` (or `SIM_CONFIG_DIR`). It is not derived from your hardware, account, |
| 38 | +or network. Commands run within thirty minutes of each other share a session id |
| 39 | +and are numbered, so a sequence of commands can be read back. No profile is |
| 40 | +created for the device, and the data is not joined to your Sim account. |
| 41 | + |
| 42 | +Deleting `telemetry.json` forgets the device id and shows the first-run notice |
| 43 | +again. |
| 44 | + |
| 45 | +## Turning it off |
| 46 | + |
| 47 | +Any of these turns reporting off. The first one that applies is the one |
| 48 | +`sim telemetry status` names. |
| 49 | + |
| 50 | +```bash |
| 51 | +export DO_NOT_TRACK=1 # the cross-tool convention, honoured before anything else |
| 52 | +export SIM_TELEMETRY_DISABLED=1 # this CLI only, for one shell or CI job |
| 53 | +sim telemetry disable # this machine, saved in telemetry.json |
| 54 | +``` |
| 55 | + |
| 56 | +`sim telemetry enable` reverses the saved setting. `sim telemetry status` shows |
| 57 | +the current state. |
| 58 | + |
| 59 | +Turning reporting off also stops the CLI from telling the API which coding |
| 60 | +agent, if any, is driving it. The CLI still identifies itself as the CLI on |
| 61 | +every request, the way every official client does; that is how a request is |
| 62 | +attributed, not usage data. |
| 63 | + |
| 64 | +## The first-run notice |
| 65 | + |
| 66 | +The first time the CLI would report from an interactive terminal it prints a |
| 67 | +short notice on stderr and does not report that run. The notice is not shown in |
| 68 | +CI or when stderr is redirected, and it is shown once per device. |
| 69 | + |
| 70 | +## Self-hosted deployments |
| 71 | + |
| 72 | +Reporting is tied to the CLI build, not to the deployment it talks to. The |
| 73 | +published `sim` package reports to Sim. A build made from the repository without |
| 74 | +`SIM_CLI_TELEMETRY_KEY` set has no destination and reports nothing; setting it |
| 75 | +to your own PostHog project token at build time reports to your own project. |
0 commit comments