Command Center - panel CC
Modern SQLite-based analytics for Claude Code usage with intelligent caching.
Inspiration: The idea and analysis approach were inspired by cc-wrapped. Pricing: Pricing data is fetched from https://www.litellm.ai/.
Features:
- 📅 Activity heatmap with daily usage patterns
- 📊 Top models by token consumption
- 💾 Cache efficiency metrics (read/write/hit rate)
- 📈 Total sessions, messages, and tokens
- 🔥 Current usage streak tracking
Option 1: Global installation (recommended)
uv tool install -e .After this, you can run command-center from anywhere without activation.
Option 2: Local virtual environment
uv sync
source .venv/bin/activateAfter global installation (uv tool install -e .):
# Generate report for current year
command-center --verbose
# Generate report for specific date range
command-center --from 2024-01-01 --to 2024-12-31
# Generate report with compact date format
command-center --from 20250101 --to 20250131
# Show database statistics
command-center --db-statsWith local venv (uv sync):
# Activate venv first
source .venv/bin/activate
# Then run
command-center --verboseWithout installation:
uv run command-center --verbose--from DATE- Start date in YYYY-MM-DD or YYYYMMDD format (default: January 1 of current year)--to DATE- End date in YYYY-MM-DD or YYYYMMDD format (default: today)--verbose- Show detailed progress and statistics--force-rescan- Ignore file tracking, rescan all files--rebuild-db- Delete and rebuild database from scratch--db-stats- Show database statistics and exit--update-pricing- Update pricing cache from LiteLLM and exit--list-projects- List all discovered projects with metadata--update-project- Update project: PROJECT_ID "name" "description"
First Run: Imports ALL historical data from all years (~1-2 minutes) Subsequent Runs: Only processes new/modified files (<5 seconds)
Data stored in ~/.claude/db/command_center.db with hourly aggregation (local time).
Command Center is local-first, but not strictly offline in all modes.
Core CLI (command-center) behavior:
- Reads local JSONL logs from
~/.claude/projects/and~/.config/claude/projects/ - Stores analytics in local SQLite:
~/.claude/db/command_center.db - Does not send prompts/responses to external APIs
Outbound network can happen when:
--update-pricingis used (or a missing model price triggers refresh) to download pricing JSON from LiteLLM GitHub sourcescripts/cc_usage_web.pyis used with Telegram env vars (TELEGRAM_BOT_TOKEN,TELEGRAM_CHAT_ID)
Additional local data stores used by optional flows:
~/.claude/db/pricing_cache.json(pricing cache)~/.claude/db/command-center-projects.json(project metadata)~/.claude/db/cc_usage.db(optional usage accounts logger; contains account email and usage snapshot fields)
Run these checks before release:
# Python tests (current repo layout requires PYTHONPATH)
PYTHONPATH=src pytest
# CLI smoke check
PYTHONPATH=src python -m command_center --db-stats
# Frontend quality gates
npm --prefix desktop/ui run lint
npm --prefix desktop/ui run build
# Tauri/Rust backend check
cargo check --manifest-path desktop/src-tauri/Cargo.tomlIf you use command-center via installed entrypoint and want API smoke tests:
PYTHONPATH=src python -m command_center.tauri_api dashboard --from 2025-01-01 --to 2025-12-31 --refresh 0 --granularity month- PNG Image:
cc-usage-report-{date_from}_{date_to}.png - Terminal display (Kitty/iTerm2/WezTerm/Ghostty/Konsole/VS Code)
- Python >= 3.10
- Pillow >= 10.0.0
- rich >= 13.0.0
Complete technical documentation is available in separate chapters:
- 4. Data Pipeline Architecture
- 5. Database Schema & Design
- 6. Time Handling & UTC Conversion
- 7. Incremental Update Mechanism
- 8. Deduplication Strategy
