Skip to content

Telemetry ​

Official ccusage releases collect minimal usage data so the project can understand adoption and platform support. Collection is on by default after the first-run notice (statusline commands have no notice; see below), sends at most one small ping per UTC day, and can be turned off with one command. Agent logs stay on your machine.

Fully Transparent ​

Every part of the pipeline is public, so you never have to take this page's word for it:

  • Client source - the code that decides what to send and when lives in rust/crates/ccusage/src/telemetry.rs.
  • Server source - the collector that receives the ping is a small Cloudflare Worker in telemetry, in the same repository. You can read exactly what it validates and stores.
  • Public statistics - the usage dashboard publishes the daily aggregates used to understand adoption. Its JSON endpoint is public too; neither exposes installation IDs.
  • One definition of the payload - the ping's format is defined once, as the Rust Ping type. The Worker's validation schema is generated from it, and CI fails if the two ever disagree, so the CLI cannot quietly start sending a field the collector does not document.
  • Builds and npm publishing - release binaries are built and published to npm by the public release workflow on GitHub Actions, never from a developer machine. Every package is published with npm provenance, so the npm page for each version links to the exact commit and workflow run that produced it.

Builds you compile yourself with cargo build contain no collector address and never send anything; only official release builds do.

What Is Sent ​

After the first-run notice, or from the first statusline run, the first eligible ccusage run of each UTC day sends one JSON document:

json
{
	"event": "cli_daily_active",
	"anonymousId": "4fd4c40cb4140e0e8952ceb2b3502e07",
	"version": "20.0.38",
	"os": "macos",
	"arch": "aarch64",
	"command": "codex monthly"
}
FieldMeaning
eventAlways cli_daily_active
anonymousIdRandom 128-bit value generated on your machine, not derived from anything
versionccusage version
os, archOperating system and CPU architecture
commandThe first eligible command that day, such as daily, codex monthly, or statusline; never arguments or option values

That is the complete list. ccusage never sends anything read from your agent logs: no token counts, costs, model names, project names, paths, session IDs, or prompts. Arguments and option values are not sent either.

The ping is sent by a short-lived background copy of ccusage, so the command you ran, including statusline, never waits for the network. It never changes report output, never writes to stdout, and a slow or failed request is dropped without a retry.

What Is Stored ​

The collector writes only the six fields above to its dataset. It does not write IP addresses, headers, or request metadata, and Workers Logs are disabled. Cloudflare handles the connection and therefore processes the source IP as part of operating its network. The random persistent ID allows activity from the same configuration environment to be linked across days; this is pseudonymous measurement, not untraceable data.

  • Individual pings expire after Analytics Engine's three-month retention period. Project maintainers with account access can query them.
  • Daily totals are computed once a day and kept long-term: the number of distinct users that day and over the last 7 and 30 days, plus user counts per OS and architecture, version, and command. These totals contain no anonymous IDs.

Public Usage Dashboard ​

The public dashboard shows up to 90 completed UTC days of daily, weekly and monthly active environments, plus platform and version breakdowns for the latest available day. The Worker reads stored KV aggregates; viewing the dashboard does not query individual pings or trigger telemetry. It uses no third-party scripts or page analytics.

Each breakdown keeps up to 20 groups with the highest observed counts per day. Smaller groups may be omitted; the daily, weekly and monthly totals still count all installation IDs.

An active environment means a distinct random installation ID observed in the relevant window, not a verified person. Multiple devices and reset IDs can increase counts; opt-outs, blocked requests and failed sends can reduce them. These are adoption indicators, not an exact population or a guaranteed lower bound. Command breakdowns are omitted because only the first command of each UTC day is reported.

Daily aggregates are generated after 00:15 UTC. The aggregate JSON is cached at the edge until the next aggregate is published, and for up to five minutes in browsers. Missing days appear as gaps, not zero activity. An empty dashboard means no aggregates are available yet; an error or stale data is shown explicitly.

Analytics Engine can sample data, particularly over longer query windows. New aggregates include samplingObserved to report whether a query observed a sampling interval greater than one; older archives may omit that metadata. The interval is not an error estimate, and counts are not scaled by it. The dashboard warns about observed sampling and inconsistent window counts, such as a monthly count below the weekly count, without changing the returned figures. See Cloudflare's sampling documentation and sampling FAQ.

Each scheduled run recomputes the previous three completed UTC days and rebuilds the public snapshot from daily archives. This recovers missed runs within that lookback and repairs a corrupted public snapshot without discarding valid archives. Longer outages remain visible as gaps. A daily GitHub Actions health check runs at 02:23 UTC and fails if the previous UTC day is absent. Workers request logs remain disabled.

First-Run Notice ​

The first eligible invocation saves its notification state and prints a short notice to stderr explaining what is collected and how to opt out. That invocation does not send a ping; collection can start on a subsequent invocation. --json output on stdout is unaffected.

The statusline and codex statusline commands print no notice. Claude Code consumes their output and redraws it every few seconds, so a notice there would never be read. They send the daily ping without one, and this page and the statusline guide disclose it instead. Opting out works the same way for them.

Opting Out ​

Any of these turns telemetry off:

bash
# Store the preference for this user
ccusage telemetry disable

# Or set an environment variable
export CCUSAGE_TELEMETRY_DISABLED=1
export DO_NOT_TRACK=1

Telemetry is also off automatically in CI and when you select --offline on the command line or in the config file. Statusline commands use offline pricing by default; that default does not turn telemetry off, but an explicit --offline does. If the settings cannot be read or updated safely, no ping is sent.

Disabling deletes the stored anonymous ID, so enabling it again later starts over as a new anonymous user.

Checking the Current State ​

bash
ccusage telemetry          # same as `ccusage telemetry status`
ccusage telemetry enable
ccusage telemetry disable

ccusage telemetry status reports whether telemetry is on, and if it is off, which setting turned it off. The preference is stored in $XDG_CONFIG_HOME/ccusage/telemetry.json, or ~/.config/ccusage/telemetry.json when XDG_CONFIG_HOME is not set.

To see the exact payload without sending it, set CCUSAGE_TELEMETRY_DEBUG=1:

bash
CCUSAGE_TELEMETRY_DEBUG=1 ccusage daily

Environment Variables ​

VariableEffect
CCUSAGE_TELEMETRY_DISABLEDAny value except empty, 0, or false disables it
DO_NOT_TRACKSame as above, following the DO_NOT_TRACK convention
CISame as above; set by most CI providers
CCUSAGE_TELEMETRY_DEBUGPrints the payload to stderr instead of sending it

See Environment Variables for every variable ccusage reads.

Released under the MIT License.