{"id":48646510,"url":"https://github.com/jayson-jia-dev/cc-token-status","last_synced_at":"2026-04-15T10:00:42.858Z","repository":{"id":350009989,"uuid":"1204915794","full_name":"jayson-jia-dev/cc-token-status","owner":"jayson-jia-dev","description":"Claude Code usage dashboard in your macOS menu bar — costs, tokens, plan limits, trends, multi-machine sync","archived":false,"fork":false,"pushed_at":"2026-04-11T11:27:47.000Z","size":7712,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-12T07:02:36.681Z","etag":null,"topics":["anthropic","claude","claude-code","developer-tools","macos","menu-bar","swiftbar","token-usage","usage-tracker"],"latest_commit_sha":null,"homepage":"https://github.com/echowonderfulworld/cc-token-status#quick-install","language":"Python","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/jayson-jia-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"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-04-08T13:07:35.000Z","updated_at":"2026-04-11T11:27:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"de2c8b76-d8a4-4dc9-8bd2-c6628ed50d99","html_url":"https://github.com/jayson-jia-dev/cc-token-status","commit_stats":null,"previous_names":["echowonderfulworld/cc-token-stats","echowonderfulworld/cc-pulse","jayson-jia-dev/cc-token-status","echowonderfulworld/cc-token-status"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/jayson-jia-dev/cc-token-status","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jayson-jia-dev%2Fcc-token-status","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jayson-jia-dev%2Fcc-token-status/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jayson-jia-dev%2Fcc-token-status/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jayson-jia-dev%2Fcc-token-status/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jayson-jia-dev","download_url":"https://codeload.github.com/jayson-jia-dev/cc-token-status/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jayson-jia-dev%2Fcc-token-status/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31744404,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T06:26:45.479Z","status":"ssl_error","status_checked_at":"2026-04-13T06:26:44.645Z","response_time":93,"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":["anthropic","claude","claude-code","developer-tools","macos","menu-bar","swiftbar","token-usage","usage-tracker"],"created_at":"2026-04-10T05:01:11.159Z","updated_at":"2026-04-14T09:00:58.755Z","avatar_url":"https://github.com/jayson-jia-dev.png","language":"Python","readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\".github/demo.gif\" width=\"400\" alt=\"cc-token-status demo\" /\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003ecc-token-status\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  Claude Code usage dashboard in your macOS menu bar.\u003cbr/\u003e\n  Costs, plan limits, trends, user level — all in one click.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/jayson-jia-dev/cc-token-status/releases\"\u003e\u003cimg src=\"https://img.shields.io/github/v/tag/jayson-jia-dev/cc-token-status?label=version\u0026sort=semver\" alt=\"Version\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/jayson-jia-dev/cc-token-status\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/jayson-jia-dev/cc-token-status?style=social\" alt=\"Stars\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/jayson-jia-dev/cc-token-status/blob/main/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/jayson-jia-dev/cc-token-status\" alt=\"License\" /\u003e\u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/badge/python-3.8+-blue\" alt=\"Python 3.8+\" /\u003e\n  \u003cimg src=\"https://img.shields.io/badge/platform-macOS-lightgrey\" alt=\"macOS\" /\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\".github/screenshot-zh.png\" height=\"700\" alt=\"中文\" /\u003e\n  \u0026nbsp;\u0026nbsp;\n  \u003cimg src=\".github/screenshot-en.png\" height=\"700\" alt=\"English\" /\u003e\n\u003c/p\u003e\n\n## Quick Install\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/jayson-jia-dev/cc-token-status/main/install.sh | bash\n```\n\nNo dependencies to install manually. SwiftBar is auto-installed if missing.\n\n## Why cc-token-status?\n\n| | cc-token-status | CLI tools | Web dashboards |\n|---|---|---|---|\n| **See limits at a glance** | Menu bar, one click | Run a command | Open browser |\n| **Official plan limits** | 5h/7d from Anthropic API | Most don't have | Some have |\n| **Burn rate warning** | Auto-alert when approaching limit | No | No |\n| **Multi-machine sync** | iCloud, zero config | No | No |\n| **Install effort** | One command, no server | npm/pip install | Docker + server |\n| **User level system** | 5-dimension scoring | No | No |\n\n## Features\n\n| Feature | Description |\n|---------|-------------|\n| **Plan Usage Limits** | Live 5h session \u0026 7d weekly quotas with color-coded progress bars (Session/Weekly/Sonnet/Opus/Extra) |\n| **Burn Rate Alert** | Warns when session pace projects to hit rate limit within 30 minutes |\n| **Cost \u0026 Token Overview** | API-equivalent cost, session count, total tokens with input/output/cache breakdown |\n| **Today + Trend** | Today's spending with trend vs 30-day active-day average (↑12% when above average) |\n| **Subscription ROI** | How much your Pro/Max/Team plan saves vs API pricing, with daily/monthly projections |\n| **User Level** | 🌑→🌒→🌓→🌔→🌕→👑 rank with progress bar and upgrade hints |\n| **Daily Details** | Full cost history (newest first, older dates collapsible) |\n| **Model Breakdown** | Per-model usage (Opus / Sonnet / Haiku) with percentages |\n| **Hourly Activity** | Sparkline charts: `▅▇██▇▄` shows which hours you're most active |\n| **Project Ranking** | Which projects consume the most tokens |\n| **Multi-Machine Sync** | iCloud Drive auto-sync across Macs — zero config |\n| **Usage Alerts** | macOS notifications at 80% and 95% for Session/Weekly/Sonnet/Opus limits |\n| **Extra Usage** | Shows extra usage gauge with spent amount, monthly limit, and on/off status when enabled |\n| **Auto-Update** | SHA256-verified updates from GitHub, checks daily |\n| **5 Languages** | EN, 中文, ES, FR, 日本語 — auto-detected from system |\n| **Dark \u0026 Light Mode** | Adapts color scheme to macOS appearance |\n\n## User Level System\n\nMulti-dimension scoring based on your Claude Code usage maturity:\n\n```\n🌑 Lv.1  Starter      练气期\n🌒 Lv.2  Planner      筑基期\n🌓 Lv.3  Engineer     金丹期\n🌔 Lv.4  Integrator   元婴期\n🌕 Lv.5  Architect    化神期\n👑 Lv.6  Orchestrator 大乘期\n```\n\nScored across 5 dimensions (100 points total):\n- **Usage depth** — median session length, activity density\n- **Context management** — CLAUDE.md, memory system, rules\n- **Tool ecosystem** — MCP servers, plugins (work tools discounted)\n- **Automation** — self-built commands, hooks, skills (framework installs weighted at 30%)\n- **Scale** — substantial projects, worktrees, tenure\n\n## How It Works\n\n```\n┌─────────────────────────────────────────────────────────────┐\n│  SwiftBar (5-min refresh)                                   │\n│   ↓                                                         │\n│  cc-token-stats.5m.py                                       │\n│   ├─ scan()        → parse ~/.claude/projects/**/*.jsonl    │\n│   │                  (incremental: mtime fingerprint cache)  │\n│   ├─ get_usage()   → Anthropic OAuth API (4-min cache)      │\n│   │                  ↳ macOS Keychain → OAuth token          │\n│   ├─ save_sync()   → write to iCloud Drive                  │\n│   ├─ auto_update() → GitHub + SHA256 verify                 │\n│   └─ check_and_notify() → macOS notifications               │\n└─────────────────────────────────────────────────────────────┘\n```\n\n- **Token \u0026 cost** — scans Claude Code JSONL session logs with incremental caching (only re-parses changed files), calculates API-equivalent cost with official Anthropic pricing\n- **Plan limits** — reads OAuth token from macOS Keychain, queries `api.anthropic.com/api/oauth/usage` with smart caching (4-min fresh + 30-min stale fallback)\n- **Auto-update** — downloads new versions from GitHub, verifies SHA256 checksum before replacing plugin file\n- **Multi-machine sync** — writes stats to iCloud Drive, reads other machines' data automatically\n- **Refresh** — SwiftBar executes the plugin every 5 minutes\n\n## Pricing\n\n| Model | Input | Output | Cache Write (1h) | Cache Read |\n|-------|-------|--------|-----------------|------------|\n| Opus 4.5 / 4.6 | $5 | $25 | $10 | $0.50 |\n| Sonnet 4.5 / 4.6 | $3 | $15 | $6 | $0.30 |\n| Haiku 4.5 | $1 | $5 | $2 | $0.10 |\n\n*USD per 1M tokens. [Official pricing](https://platform.claude.com/docs/en/about-claude/pricing)*\n\n## Configuration\n\nEdit `~/.config/cc-token-stats/config.json` or use the in-app Settings menu:\n\n| Key | Description | Default |\n|-----|-------------|---------|\n| `subscription` | Monthly plan cost in USD | `0` |\n| `subscription_label` | `\"Pro\"`, `\"Max\"`, `\"Team\"` | `\"\"` |\n| `language` | `\"auto\"`, `\"en\"`, `\"zh\"`, `\"es\"`, `\"fr\"`, `\"ja\"` | `\"auto\"` |\n| `notifications` | Usage limit alerts | `true` |\n| `auto_update` | Daily update check | `true` |\n| `sync_mode` | `\"auto\"` / `\"off\"` | `\"auto\"` |\n| `machine_labels` | Custom device names, e.g. `{\"RL001\":\"Office\"}` | `{}` |\n| `menu_bar_icon` | SwiftBar icon style | `\"sfSymbol=sparkles.rectangle.stack\"` |\n\n## Update\n\nAuto-updates daily with SHA256 verification. Manual update:\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/jayson-jia-dev/cc-token-status/main/install.sh | bash -s -- --update\n```\n\n## Uninstall\n\n```bash\ncurl -fsSL https://raw.githubusercontent.com/jayson-jia-dev/cc-token-status/main/uninstall.sh | bash\n```\n\n## Requirements\n\n- macOS\n- [Claude Code](https://docs.anthropic.com/en/docs/claude-code/overview)\n- Python 3.8+\n- [SwiftBar](https://github.com/swiftbar/SwiftBar) (auto-installed)\n\n## License\n\nMIT\n","funding_links":[],"categories":["Companion Apps \u0026 GUIs"],"sub_categories":["GateGuard — Fact-Forcing PreToolUse Gate"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjayson-jia-dev%2Fcc-token-status","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjayson-jia-dev%2Fcc-token-status","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjayson-jia-dev%2Fcc-token-status/lists"}