# Telemetry

What the repowise CLI and local servers send as anonymous usage telemetry, what they never send, how to see the exact payload, and how to turn it off.

The repowise CLI sends anonymous usage telemetry so the team can see which
commands and MCP tools people use, which versions and platforms to support,
and where runs fail. It is on by default and off with one command. The first
command you run prints a one-time notice that ends with
`Details: https://repowise.dev/telemetry`; this page is those details.

No event can be tied to you, your machine or your code: there are no
usernames, IP addresses, file paths or source content in anything sent.

## Turn it off

Any one of these disables all telemetry:

```bash
repowise telemetry disable          # stored in ~/.repowise/platform.json
export REPOWISE_TELEMETRY_DISABLED=1
export DO_NOT_TRACK=1               # the cross-tool convention; also hides the first-run notice
export REPOWISE_OFFLINE=1           # also blocks update checks, plan status, agent sign-in checks and decision sync
```

Check the state, and why:

```bash
repowise telemetry status
```

You should see `Telemetry: disabled` with a `reason` line naming the switch
that turned it off. `repowise telemetry enable` turns it back on. An
environment variable wins over the stored setting. Disabling also discards
anything still queued, so no last batch is sent.

## See exactly what is sent

`REPOWISE_TELEMETRY_DEBUG=1` prints each payload to stderr and sends nothing:

```bash
REPOWISE_TELEMETRY_DEBUG=1 repowise status
```

## What every event carries

| Field | Example | Purpose |
|---|---|---|
| `event` | `command_run`, `mcp_tool_call`, `view_opened` | Event type |
| `anon_id` | `194639...d48a` | Random per-install id (see below) |
| `session_id` | `e2ecb2...1158` | Random per-process id that groups one run |
| `cli_version` | `0.62.0` | Version adoption |
| `os` | `darwin`, `linux`, `windows` | Platform priorities |
| `arch` | `arm64`, `x86_64` | Architecture priorities |
| `python_version` | `3.12` | Major and minor only |
| `is_ci` | `true`, `false` | Separates automation from people |

`properties.client` names the host that ran repowise as one fixed label:
`claude_code`, `codex`, `cursor`, `vscode`, `ci` or `terminal` (an MCP call
can also name another supported agent such as `opencode`, or `unknown`). It
comes from which host-specific environment variables are set, never their
values, or from the name an MCP client announces.

## `command_run`: once per CLI command

| Field | Example | Purpose |
|---|---|---|
| `command` | `init`, `update`, `health` | Which command ran |
| `subcommand` | `decision.add` | A known subcommand name only |
| `flags` | `["--resume", "--provider"]` | Option names only, never values |
| `status` | `ok`, `error`, `usage_error`, `interrupted` | How the run ended |
| `error_type` | `LLMProviderError` | Exception class name only |
| `duration_ms` | `71840` | Run time |
| `failure_reason` | `no_sync_base` | A fixed code for a known failure, never the message |

For `init` and `update`, a few coarse ranges and enums describe the run, never
exact counts or names: `file_count_bucket` (`500-999`), `top_language`,
`docs_mode` (`none`, `deterministic`, `llm`), `provider` and `model`,
`embedder`, and `pages_bucket` (`100-499`). `coverage add` reports how the
ingest ended as `outcome` and a range of matched files.

## `mcp_tool_call`: once per MCP tool call

Sent by `repowise mcp` and `repowise serve`. Only the tool name, fixed codes,
booleans and the response size; never the question, query, results, paths, or
repo and symbol names.

| Field | Example | Purpose |
|---|---|---|
| `tool` | `get_answer` | Which tool was called |
| `status`, `error_reason`, `error_source` | `error`, `no_index`, `tool` | Error rate and fixed reason |
| `duration_ms`, `<stage>_ms`, `cold_start` | `820`, `retrieve_ms: 310` | Latency, per stage |
| `confidence`, `retrieval_quality`, `grounding` | `high`, `partial`, `symbol_body` | Answer quality distribution |
| `results_bucket`, `empty_result` | `4-10`, `false` | Result counts as ranges |
| `index_behind`, `embedder_degraded`, `semantic_search`, `degraded` | `false` | How often answers are stale or run without vectors or a model |
| `index_mode`, `provider_kind` | `model`, `api_key` | Who wrote the index; how the model runs, never its name |
| `response_chars`, `response_tokens` | `10979`, `2744` | Response size, a count only |
| `include` | `["callers"]` | Which `include` blocks were asked for, by block name |

## `view_opened`: once per dashboard view

Sent by the local server when the web UI opens a navigation view. The browser
sends only the view's fixed id (such as `repo.codeHealth` or
`workspace.contracts`) to its own server, which refuses any id not on its
list. Never the repo, the page path or anything shown on the page. Moving
within a view, or to the same view in another repo, sends nothing.

## What is never collected

- Source code or file contents
- File paths or directory names
- Repository, package, symbol or function names
- Generated documentation text
- Flag values (only flag names)
- Environment variable values
- API keys or credentials
- Error messages or stack traces (only the exception class name)
- IP addresses (the server does not record the request source)
- Usernames, hostnames, email or anything personally identifiable

## The anonymous id

`anon_id` is a random UUID generated once and stored in
`~/.repowise/platform.json`. It is not derived from your hostname, username or
any machine identifier, so it cannot be reversed to a person; it only counts
distinct installs. Delete the file and a new, unrelated id is generated.

## When events are sent

A command never waits on the network. It appends events to
`~/.repowise/telemetry-spool.jsonl` and, on exit, starts a small detached
process that sends the queue and removes the file, so you can read the queued
file to see what is about to leave your machine. A failed send is discarded,
not retried. Nothing is queued or sent while a test runner drives repowise.

Events are kept for 90 days and then deleted. Only aggregate figures (such as
the share of runs on Windows) are used or shared.

The full field list, including every `failure_reason` code and view id, is in
[docs/reference/TELEMETRY.md](https://github.com/repowise-dev/repowise/blob/main/docs/reference/TELEMETRY.md).

## Next

- [`repowise telemetry`](https://docs.repowise.dev/cli/config#repowise-telemetry) is the command reference.
- [Environment variables](https://docs.repowise.dev/installation/env-vars#telemetry) lists the switches with the other runtime variables.
- [What leaves your network](https://docs.repowise.dev/security#telemetry-stated-precisely) covers what the rest of repowise sends and stores.
