Skip to main content

Claude Telemetry Agent

Lightweight Python agent that collects Claude Code usage data and syncs to Supabase.

Prerequisites

Install

cd agent
python3 -m venv venv
source venv/bin/activate  # Windows: .\venv\Scripts\Activate
pip install -e .

Setup

# Interactive
cc-telemetry setup

# Non-interactive (from Deploy page)
cc-telemetry setup --non-interactive \
  --name "My PC" \
  --supabase-url "https://xxx.supabase.co" \
  --supabase-key "eyJ..." \
  --machine-id "uuid"

Commands

Command Description
cc-telemetry setup Configure agent
cc-telemetry sync Manual sync
cc-telemetry sync --verbose Sync with details
cc-telemetry sync --force Re-sync all data
cc-telemetry daemon Auto-sync foreground
cc-telemetry daemon --interval 10 Custom interval
cc-telemetry daemon --background Run detached
cc-telemetry install-service Install as system service
cc-telemetry uninstall-service Remove service
cc-telemetry service-status Check daemon status
cc-telemetry status Show config info
cc-telemetry local --daily View data locally
cc-telemetry local --sessions View sessions locally
cc-telemetry local --projects View project summary

How It Works

The agent does not parse JSONL files directly. It calls ccusage as the parsing layer:

  1. npx ccusage@latest daily --json --instances — daily usage by project and model
  2. npx ccusage@latest session --json — session-level usage
  3. Reads ~/.claude/stats-cache.json — hour counts, activity data
  4. Adds machine_id to all records
  5. UPSERTs to Supabase with incremental sync

Tests

pip install -e ".[dev]"
pytest -v

Metadata

Release files for cc-telemetry 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cc-telemetry 0.3.1
File Size Uploaded Provenance Actions
cc_telemetry-0.3.1.tar.gz 29.5 kB With provenance Details for cc_telemetry-0.3.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cc-telemetry 0.3.1
File Interpreter ABI Platform Actions
cc_telemetry-0.3.1-py3-none-any.whl Python 3 none any Details for cc_telemetry-0.3.1-py3-none-any.whl

Total release size: 61.8 kB

Release files / cc_telemetry-0.3.1.tar.gz

Download URL cc_telemetry-0.3.1.tar.gz
Size 29.5 kB
Tags Source
SHA-256 checksum
How to use checksums
1a5d881b3da0fe9613fec07af784ce56c887bf7b6ca096563d5c9b597bf7cccc
BLAKE2b-256 checksum
How to use checksums
fe3589f2371a579d6bf4d29b044e4d0bec954c2e2ad15e9226a928e499084b43
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 8, 2026.

Transparency log

Release files / cc_telemetry-0.3.1-py3-none-any.whl

Download URL cc_telemetry-0.3.1-py3-none-any.whl
Size 32.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
556dc6e59058f37f48b23e45ce4bd80c64958fead1e431bab9f13a133baf52b7
BLAKE2b-256 checksum
How to use checksums
459aa64d7f89e64b1afdf75cddde1b7bb8e7339de85160940713027f99ff274e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 8, 2026.

Transparency log

Security for cc-telemetry 0.3.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for cc_telemetry-0.3.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 8, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.3.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page