{"id":48085244,"url":"https://github.com/androidZzT/cc-statistics","last_synced_at":"2026-04-20T01:00:55.289Z","repository":{"id":345048891,"uuid":"1184107844","full_name":"androidZzT/cc-statistics","owner":"androidZzT","description":"AI Coding stats dashboard — track costs, tokens, and efficiency across Claude Code / Gemini CLI / Codex / Cursor","archived":false,"fork":false,"pushed_at":"2026-04-12T04:33:43.000Z","size":13668,"stargazers_count":58,"open_issues_count":0,"forks_count":7,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-12T06:20:50.298Z","etag":null,"topics":["ai-coding","claude-code","cli","cost-estimation","developer-tools","gemini-cli","macos-app","menu-bar-app","python","swiftui","token-tracking","token-usage","usage-tracker"],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/androidZzT.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-17T09:02:43.000Z","updated_at":"2026-04-12T04:33:46.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/androidZzT/cc-statistics","commit_stats":null,"previous_names":["androidzzt/cc-statistics"],"tags_count":45,"template":false,"template_full_name":null,"purl":"pkg:github/androidZzT/cc-statistics","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/androidZzT%2Fcc-statistics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/androidZzT%2Fcc-statistics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/androidZzT%2Fcc-statistics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/androidZzT%2Fcc-statistics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/androidZzT","download_url":"https://codeload.github.com/androidZzT/cc-statistics/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/androidZzT%2Fcc-statistics/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32028547,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T00:18:06.643Z","status":"ssl_error","status_checked_at":"2026-04-20T00:17:31.068Z","response_time":55,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-coding","claude-code","cli","cost-estimation","developer-tools","gemini-cli","macos-app","menu-bar-app","python","swiftui","token-tracking","token-usage","usage-tracker"],"created_at":"2026-04-04T15:14:13.317Z","updated_at":"2026-04-20T01:00:55.282Z","avatar_url":"https://github.com/androidZzT.png","language":"Swift","readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"docs/desktop_now.png\" width=\"480\" alt=\"cc-statistics macOS App\" style=\"border-radius: 16px;\"\u003e\n  \u003ch1\u003ecc-statistics\u003c/h1\u003e\n  \u003cp\u003e\u003cstrong\u003eThe only AI coding tracker that unifies Claude Code, Gemini CLI, Codex CLI, and Cursor — in one native macOS app.\u003c/strong\u003e\u003c/p\u003e\n  \u003cp\u003e\u003cem\u003eTrack every token, cost, and session across all your AI tools. 100% local. Zero dependencies.\u003c/em\u003e\u003c/p\u003e\n\n  \u003cp\u003e\n    \u003ca href=\"https://pypi.org/project/cc-statistics/\"\u003e\u003cimg src=\"https://img.shields.io/pypi/v/cc-statistics?color=blue\u0026style=flat-square\u0026logo=python\" alt=\"PyPI\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://pypi.org/project/cc-statistics/\"\u003e\u003cimg src=\"https://img.shields.io/pypi/dm/cc-statistics?color=green\u0026style=flat-square\" alt=\"Downloads\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/androidZzT/cc-statistics/stargazers\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/androidZzT/cc-statistics?style=flat-square\" alt=\"Stars\"\u003e\u003c/a\u003e\n    \u003ca href=\"LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/androidZzT/cc-statistics?style=flat-square\" alt=\"License\"\u003e\u003c/a\u003e\n    \u003cimg src=\"https://img.shields.io/badge/zero--dependencies-stdlib%20only-orange?style=flat-square\" alt=\"Zero Dependencies\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/platform-macOS%20%7C%20Linux%20%7C%20Windows-lightgrey?style=flat-square\" alt=\"Platform\"\u003e\n  \u003c/p\u003e\n\n  \u003cp\u003e\n    \u003ca href=\"#-why-cc-statistics\"\u003eWhy?\u003c/a\u003e \u0026bull;\n    \u003ca href=\"#-features\"\u003eFeatures\u003c/a\u003e \u0026bull;\n    \u003ca href=\"#%EF%B8%8F-screenshots\"\u003eScreenshots\u003c/a\u003e \u0026bull;\n    \u003ca href=\"#-quick-start\"\u003eQuick Start\u003c/a\u003e \u0026bull;\n    \u003ca href=\"#-cli-reference\"\u003eCLI\u003c/a\u003e \u0026bull;\n    \u003ca href=\"README_CN.md\"\u003e中文\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n---\n\n## 🤔 Why cc-statistics?\n\nYou're using multiple AI coding tools. But do you actually know:\n\n- 💸 **What your combined spend is** across Claude Code, Gemini CLI, Codex, and Cursor?\n- 🔧 **Which MCP tools are being called most** — and whether they're worth the tokens?\n- ⏱️ **How much time Claude is actually working** versus waiting for you?\n- 📈 **Which projects are consuming the most** — and across which models?\n\nMost tools only answer this for Claude Code. cc-statistics answers it for all four.\n\n### How does it compare?\n\n| | cc-statistics | CCDash | claude-usage | ccflare |\n|---|:---:|:---:|:---:|:---:|\n| **Claude Code** | ✅ | ✅ | ✅ | ✅ |\n| **Gemini CLI** | ✅ | ❌ | ❌ | ❌ |\n| **Codex CLI** | ✅ | ❌ | ❌ | ❌ |\n| **Cursor** | ✅ | ❌ | ❌ | ❌ |\n| **Native macOS App** | ✅ | ❌ | ❌ | ❌ |\n| **Pixel-Art Mascot (Clawd)** | ✅ | ❌ | ❌ | ❌ |\n| **Session Search \u0026 Resume** | ✅ | ✅ | ❌ | ❌ |\n| **Weekly / Monthly Reports** | ✅ | ✅ | ❌ | ❌ |\n| **Webhook** (Slack / Feishu / DingTalk) | ✅ | ✅ Slack/Discord | ❌ | ❌ |\n| **Tool Call Analytics** | ✅ | ✅ | ❌ | ❌ |\n| **Code Changes by Language** | ✅ | ❌ | ❌ | ❌ |\n| **AI vs User Time** | ✅ | ❌ | ❌ | ❌ |\n| **Usage Alerts** | ✅ | ✅ | ❌ | ❌ |\n| **Usage Quota Predictor** | ✅ | ✅ | ❌ | ❌ |\n| **Share Session Messages** | ✅ | ❌ | ❌ | ❌ |\n| **Web Dashboard** | ✅ | ✅ | ✅ | ✅ |\n| **CLI Tool** | ✅ | ✅ | ❌ | ✅ |\n| **Zero Dependencies** | ✅ | ✅ | ❌ | ❌ |\n| Cache Efficiency Grade | ⏳ planned | ✅ | ❌ | ❌ |\n| Live Stream | ⏳ planned | ✅ | ❌ | ❌ |\n\n\u003e cc-statistics is a community project, not affiliated with Anthropic, Google, or OpenAI.\n\n---\n\n## 🚀 Features\n\n### 🌐 4-Platform Unified View\n\u003e Claude Code · Gemini CLI · Codex CLI · Cursor — switch between platforms or aggregate all four into a single report. Each source is read entirely from local files; no API keys, no accounts, no network requests.\n\n### 🖥️ Native macOS Menu Bar App\n\u003e Pre-built SwiftUI binary — launch with `cc-stats-app` and it lives in your menu bar permanently. Shows Claude logo + today's token count + estimated cost at a glance. Turns **red** when you hit your daily usage quota. Right-click to switch display modes. Global hotkey `Cmd+Shift+C` opens the full dashboard from anywhere.\n\n### 🐾 Clawd — Pixel-Art Status Bar Mascot\n\u003e A pixel-art Clawd mascot reacts to Claude Code's agent state in real time: idle, thinking, typing, happy, sleeping, and error — each with its own animated sprite. Built on [clawd-on-desk](https://github.com/rullerzhou-afk/clawd-on-desk) hook integration.\n\n\u003cimg src=\"docs/clawd-states.png\" width=\"600\" alt=\"Clawd Animation States\"\u003e\n\n### 📊 Usage Quota Predictor\n\u003e Real-time prediction of when you'll hit your usage quota based on current burn rate. Displays estimated time remaining, projected reset time, and risk level — so you can pace your usage and avoid unexpected throttling.\n\n### 🔍 Session Search \u0026 Resume\n\u003e Search your entire session history by keyword across all platforms. Results show timestamps and a ready-to-run resume command — one copy-paste and you're back in context:\n\u003e ```bash\n\u003e claude --resume \u003csession-id\u003e\n\u003e ```\n\n### 💬 Share Session Messages\n\u003e Export and share individual session conversations as clean, formatted text — useful for documenting AI-assisted work, sharing context with teammates, or archiving important sessions.\n\n### 📊 Multi-Dimensional Analytics\n\u003e Instructions count · Tool calls Top 10 (Skill and MCP tools broken out by name) · AI processing time vs user active time · Code changes by language (via `git log --numstat`) · Token breakdown by model · Cost estimation with built-in pricing for Opus / Sonnet / Haiku / Gemini 2.5 Pro / Flash / GPT-4o\n\n### 🔔 Usage Alerts\n\u003e Set daily and weekly cost limits. When you're over threshold, the macOS menu bar icon turns red and a native system notification fires — respecting your Focus modes, no app in foreground required.\n\n### 📋 Weekly \u0026 Monthly Reports\n\u003e Auto-generate Markdown summaries for any period: total tokens, cost by model, most active projects, top tool calls, code changes by language. Push directly to your team channel:\n\u003e ```bash\n\u003e cc-stats --report week\n\u003e cc-stats --notify https://hooks.slack.com/services/xxx\n\u003e ```\n\u003e Slack, Feishu, and DingTalk webhooks all supported.\n\n### ⚡ Project Comparison\n\u003e See which projects are consuming the most resources side by side:\n\u003e ```bash\n\u003e cc-stats --compare --since 1w\n\u003e ```\n\n### 🌐 Web Dashboard\n\u003e Browser-based dark-themed dashboard for all platforms — useful on Linux/Windows or when you want a larger view than the menu bar panel.\n\n### 🔒 100% Local \u0026 Zero Dependencies\n\u003e All data is read from local files. Nothing is sent over the network. Pure Python standard library — no `pip install`, no npm, no Docker.\n\n---\n\n## 🖼️ Screenshots\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003cstrong\u003e🖥️ macOS App — Dark Mode\u003c/strong\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003cstrong\u003e🖥️ macOS App — Light Mode\u003c/strong\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003cimg src=\"docs/screenshots/cc-stat-dark.png\" alt=\"macOS App Dark\" width=\"100%\"\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cimg src=\"docs/screenshots/cc-stat-light.png\" alt=\"macOS App Light\" width=\"100%\"\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003cstrong\u003e📊 Usage Quota Predictor\u003c/strong\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003cstrong\u003e🔴 Max Usage Reached\u003c/strong\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003cimg src=\"docs/screenshots/cc-stat-predict.png\" alt=\"Usage Quota Predictor\" width=\"100%\"\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cimg src=\"docs/screenshots/cc-stat-max-usage.png\" alt=\"Max Usage\" width=\"100%\"\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003cstrong\u003e🔍 Session List\u003c/strong\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003cstrong\u003e🔧 Tool Call Analytics\u003c/strong\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003cimg src=\"docs/screenshots/cc-stat-sessions.png\" alt=\"Session List\" width=\"100%\"\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cimg src=\"docs/screenshots/cc-stat-tools.png\" alt=\"Tool Call Analytics\" width=\"100%\"\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003cstrong\u003e⚡ Skill / MCP Analytics\u003c/strong\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003cstrong\u003e💬 Share Session Messages\u003c/strong\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003cimg src=\"docs/screenshots/cc-stat-skill.png\" alt=\"Skill Analytics\" width=\"100%\"\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cimg src=\"docs/screenshots/cc-stat-share-msgs.png\" alt=\"Share Messages\" width=\"100%\"\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003cstrong\u003e🌐 4-Platform Unified View\u003c/strong\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003cstrong\u003e⚙️ Settings\u003c/strong\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003cimg src=\"docs/screenshots/cc-stat-multiplatform.png\" alt=\"Multi-Platform\" width=\"100%\"\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cimg src=\"docs/screenshots/cc-stat-settings.png\" alt=\"Settings\" width=\"100%\"\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003cstrong\u003e🔔 Notifications\u003c/strong\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003cstrong\u003e🌐 Web Dashboard\u003c/strong\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003cimg src=\"docs/screenshots/cc-stat-notification.png\" alt=\"Notifications\" width=\"100%\"\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cimg src=\"docs/screenshots/cc-stat-web.png\" alt=\"Web Dashboard\" width=\"100%\"\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n### CLI Demo\n\n\u003cimg src=\"docs/screenshots/cc-stat-cli.png\" width=\"680\" alt=\"CC Stats CLI Demo\"\u003e\n\n---\n\n## ⚡ Quick Start\n\n### Prerequisites\n\n- Python 3.8+\n- At least one of: Claude Code CLI, Gemini CLI, Codex CLI, or Cursor installed and used\n\n### 3 steps\n\n```bash\n# 1. Install\nuv tool install cc-statistics   # or: pipx install cc-statistics\n\n# 2. Run your first report (all platforms, last 7 days)\ncc-stats --all --since 7d\n\n# 3. Launch macOS menu bar app (macOS only)\ncc-stats-app\n```\n\nThat's it. No configuration file needed.\n\n**Alternative install methods:**\n\n```bash\n# pipx\npipx install cc-statistics\n\n# Homebrew (macOS / Linux)\nbrew install androidZzT/tap/cc-statistics\n```\n\n---\n\n## 📖 CLI Reference\n\n```bash\ncc-stats                      # Analyze current directory sessions\ncc-stats --list               # List all detected projects (all platforms)\ncc-stats --all --since 3d     # Last 3 days, all projects, all platforms\ncc-stats --all --since 1w     # Last week\ncc-stats myproject --last 3   # Last 3 sessions for a specific project\ncc-stats --report week        # Generate weekly Markdown report\ncc-stats --report month       # Generate monthly Markdown report\ncc-stats --compare --since 1w # Side-by-side project comparison\ncc-stats --notify \u003curl\u003e       # Push report to Slack / Feishu / DingTalk webhook\ncc-stats-web                  # Open web dashboard in browser\ncc-stats-app                  # Launch macOS menu bar app\n```\n\n---\n\n## 🗂️ Data Sources\n\nAll data is read from local files. Nothing is sent over the network.\n\n| Source | Local path |\n|--------|-----------|\n| Claude Code | `~/.claude/projects/\u003cproject\u003e/\u003csession\u003e.jsonl` |\n| Gemini CLI | `~/.gemini/tmp/\u003cproject\u003e/chats/\u003csession\u003e.json` |\n| Codex CLI | `~/.codex/sessions/*.jsonl` |\n| Cursor | `~/Library/Application Support/Cursor/User/globalStorage/state.vscdb` |\n| Git Changes | `git log --numstat` in project directory |\n\n---\n\n## Acknowledgments\n\nStatus bar Clawd animation sprites from [clawd-on-desk](https://github.com/rullerzhou-afk/clawd-on-desk) — an Electron desktop pet that senses AI coding agent state via hooks and plays pixel-art animations.\n\n---\n\n## Support\n\nIf cc-statistics saves you money on your AI coding bills, consider [sponsoring](https://github.com/sponsors/androidZzT) the project.\n","funding_links":["https://github.com/sponsors/androidZzT"],"categories":["Ecosystem"],"sub_categories":["Quick Setup with cc-safe-setup"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FandroidZzT%2Fcc-statistics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FandroidZzT%2Fcc-statistics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FandroidZzT%2Fcc-statistics/lists"}