Local token capture
The local-first guarantee: what leaves your machine, and what never does.
Centrail reads agent logs and Git locally. It uploads allowed usage and Git metadata; the server uses that evidence to match usage to recorded commits.
What leaves your machine
Per usage event (one model request), exactly these fields:
- Token counts (input, output, cache read, cache creation)
- The model name
- The timestamp
- An opaque event id (the agent's own request id, used to dedupe)
- The session id your agent gave the conversation
- The branch name
- The repository the event belongs to: its canonical remote (for example
github.com/acme/api, never a path or a credential; for a repository with no remote, its first commit's sha), its first commit's sha, and its folder name. A clone of a local checkout reports the hosted remote of the repository it was cloned from; only that resolved remote is sent, never the path it was cloned from. When a repository was sent as its first commit's sha, the server counts it under your one hosted repository with the same first commit; if two of yours share it, as a fork and its upstream do, it stays separate. A folder that is not a git repository is sent as its folder name and a keyed hash of its path, never the path. - How the CLI chose that repository: the session's folder is inside it, the files the turn touched are in it, or the session's previous turn was there. The touched paths themselves stay on your machine.
- A random install id, generated once by the CLI in place of your machine's name
- Fast mode and the number of web searches, when your agent logs them
- Cache-write counts split by five-minute and one-hour duration when reported
Per sync: which agent the events came from (Claude Code, Codex, Copilot CLI, Gemini CLI, or Pi) and the CLI version.
For commit attribution, per commit: the repository (as above) and folder name, the commit sha, the branch name, the commit time, lines added and deleted, files changed, whether the commit shipped to the default branch, the squash commit it shipped as when it was squash-merged, and whether you authored it (yes or no; your git email stays on your machine). Per repository: its size (line and file counts), and whether the list of its recent commits is complete.
Two settings in ~/.config/centrail/config.json send less:
hideRepoNames replaces the repository with a hash and keeps its folder name
and first commit on your machine; hideBranchNames keeps the branch name on your machine. Hiding names does not
make the upload anonymous: the repository hash remains a stable pseudonym,
and install identifiers, commit hashes, and patch hashes can link records.
Gemini CLI and Pi can also send bounded billing-route evidence (billing provider and service class); commit attribution can include content hashes
from git patch-id to match rebased or squashed work. These hashes are not diffs, but can correlate a known change.
That is the network contract. The CLI keeps the network shape as an explicit allowlist, so a field cannot start leaving because a parser learned to read it. The server enforces the same allowlist on arrival and drops anything else, whatever the client version. This is a field allowlist, not a secret scanner: allowed repository labels, branch names, model names, and identifiers are not checked for sensitive text. Avoid putting secrets in those names.
What never leaves
- Source code
- Prompts or completions
- Git diffs or commit messages
- File contents
- Working-directory paths, or the paths of files your agent touched
- Hostnames or your operating system
- Your agent's account details (email, organization ids) or its version
- Your git email
- Copilot's
encryptedContentandreasoningOpaqueblobs - Any prompt or completion text from any agent
The CLI does read some of this locally: agent logs can contain prompts and completions, and Git attribution reads tracked files to count repository size and computes diffs to match patches. Only the fields listed above are sent.
You can exclude a repository from future usage and Git metadata uploads with
centrail exclude <repo> (this does not delete earlier uploads),
and revoke any machine's token from Settings → Devices, which immediately stops that
machine from syncing.