Usage Data
Sync token consumption data from Claude Code (Anthropic) and Cursor.
Sync Recent Data
Sync the last N days of usage data:
# Sync all providers (last 7 days)pnpm cli sync
# Sync specific providerpnpm cli sync anthropic --days 30pnpm cli sync cursor --days 7
# Skip API key mapping sync (faster)pnpm cli sync --skip-mappingsBackfill Historical Data
For longer time ranges, use backfill:
# Anthropic backfill (requires --from and --to)pnpm cli backfill anthropic --from 2025-01-01 --to 2025-06-01
# Cursor backfillpnpm cli backfill cursor --from 2025-01-01 --to 2025-06-01Backfill Management
Mark a backfill as complete (prevents cron from re-running):
pnpm cli backfill:complete anthropicpnpm cli backfill:complete cursorReset to allow re-backfilling:
pnpm cli backfill:reset anthropicpnpm cli backfill:reset cursorCheck Sync Status
View the current state of each provider:
pnpm cli anthropic:statuspnpm cli cursor:statusShows last sync time, records synced, and any errors.
Check for Data Gaps
Identify missing days in usage data:
# Check all providerspnpm cli gaps
# Check specific providerpnpm cli gaps anthropicpnpm cli gaps cursorImport from CSV
Import Cursor usage from a CSV export (useful when API isn’t available):
pnpm cli import:cursor-csv /path/to/export.csvSync Options
| Option | Description |
|---|---|
--days <n> | Number of days to sync (default: 7) |
--from <date> | Start date for backfill (YYYY-MM-DD) |
--to <date> | End date for backfill (YYYY-MM-DD) |
--skip-mappings | Skip API key mapping sync (faster) |