Skip to main content

Multi-PC Claude Code usage tracker — agent, real-time hooks, MCP server, and dashboard sync

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cc_telemetry-0.3.1.tar.gz (29.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cc_telemetry-0.3.1-py3-none-any.whl (32.3 kB view details)

Uploaded Python 3

File details

Details for the file cc_telemetry-0.3.1.tar.gz.

File metadata

  • Download URL: cc_telemetry-0.3.1.tar.gz
  • Upload date:
  • Size: 29.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cc_telemetry-0.3.1.tar.gz
Algorithm Hash digest
SHA256 1a5d881b3da0fe9613fec07af784ce56c887bf7b6ca096563d5c9b597bf7cccc
MD5 f770e09a0560e07ef190a74a653f4482
BLAKE2b-256 fe3589f2371a579d6bf4d29b044e4d0bec954c2e2ad15e9226a928e499084b43

See more details on using hashes here.

Provenance

The following attestation bundles were made for cc_telemetry-0.3.1.tar.gz:

Publisher: publish-pypi.yml on RyanTech00/claude-telemetry

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cc_telemetry-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: cc_telemetry-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 32.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for cc_telemetry-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 556dc6e59058f37f48b23e45ce4bd80c64958fead1e431bab9f13a133baf52b7
MD5 31eabed34b92fa44f7cc85d39c03ae65
BLAKE2b-256 459aa64d7f89e64b1afdf75cddde1b7bb8e7339de85160940713027f99ff274e

See more details on using hashes here.

Provenance

The following attestation bundles were made for cc_telemetry-0.3.1-py3-none-any.whl:

Publisher: publish-pypi.yml on RyanTech00/claude-telemetry

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page