[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-93396":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":9,"totalLinesOfCode":9,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":9,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":17,"stars30d":17,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":18,"rankGlobal":9,"rankLanguage":9,"license":9,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":19,"hasPages":19,"topics":9,"createdAt":9,"pushedAt":9,"updatedAt":21,"readmeContent":22,"aiSummary":23,"trendingCount":16,"starSnapshotCount":16,"syncStatus":24,"lastSyncTime":25,"discoverSource":26},93396,"TokenTracker","mm7894215\u002FTokenTracker","mm7894215","Local-first AI token usage & cost tracker for 27 coding tools — with a desktop pet, 4 widgets, achievements, native macOS\u002FWindows apps, and a one-command CLI. Never reads prompts.",null,"https:\u002F\u002Fgithub.com\u002Fmm7894215\u002FTokenTracker","JavaScript",1018,103,4,5,0,1,51.65,false,"main","2026-07-22 04:02:09"," \u003Cdiv align=\"center\">\n\n# Token Tracker\n\n**English** · [简体中文](.\u002FREADME.zh-CN.md) · [日本語](.\u002FREADME.ja.md) · [한국어](.\u002FREADME.ko.md) · [Deutsch](.\u002FREADME.de.md)\n\n### Track every AI token — then bring your usage to life\n\nAn accurate, local-first token usage and cost dashboard for **27 AI coding tools** — plus a desktop pet, **4 native widgets**, and **15 achievement tracks**. No cloud account, no API keys, no setup.\n\n[![npm version](https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002Ftokentracker-cli.svg?color=blue)](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Ftokentracker-cli)\n[![npm downloads](https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fdm\u002Ftokentracker-cli.svg?color=brightgreen)](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Ftokentracker-cli)\n[![Homebrew](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fv\u002Frelease\u002Fmm7894215\u002FTokenTracker?label=brew&color=F8B73E&logo=homebrew&logoColor=white)](https:\u002F\u002Fgithub.com\u002Fmm7894215\u002Fhomebrew-tokentracker)\n[![License: MIT](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT-green.svg)](https:\u002F\u002Fopensource.org\u002Flicenses\u002FMIT)\n[![CLI](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FCLI-macOS%20%C2%B7%20Linux%20%C2%B7%20Windows-lightgrey.svg)](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Ftokentracker-cli)\n[![macOS app](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FmacOS%20app-menu%20bar%20%2B%20widgets-lightgrey.svg?logo=apple&logoColor=white)](https:\u002F\u002Fgithub.com\u002Fmm7894215\u002FTokenTracker\u002Freleases\u002Flatest)\n[![Windows app](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FWindows%20app-system%20tray-lightgrey.svg?logo=windows&logoColor=white)](https:\u002F\u002Fgithub.com\u002Fmm7894215\u002FTokenTracker\u002Freleases\u002Flatest)\n[![GitHub stars](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fmm7894215\u002FTokenTracker?style=social)](https:\u002F\u002Fgithub.com\u002Fmm7894215\u002FTokenTracker\u002Fstargazers)\n[![Featured in 阮一峰周刊 #393](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FFeatured%20in-%E9%98%AE%E4%B8%80%E5%B3%B0%E5%91%A8%E5%88%8A%20%23393-FF6B35?logo=rss&logoColor=white)](https:\u002F\u002Fgithub.com\u002Fruanyf\u002Fweekly\u002Fblob\u002Fmaster\u002Fdocs\u002Fissue-393.md)\n[![Author tokens](https:\u002F\u002Fsrctyff5.us-east.insforge.app\u002Ffunctions\u002Ftokentracker-badge-svg?user_id=0652839f-d19f-4f67-af85-6b7675875443&metric=tokens&compact=1&label=author%20tokens)](https:\u002F\u002Fgithub.com\u002Fmm7894215\u002FTokenTracker)\n\n\u003Cbr\u002F>\n\n\u003Cstrong>📊 See the token dashboard in action\u003C\u002Fstrong>\n\n\u003Cbr\u002F>\u003Cbr\u002F>\n\n\u003Cvideo src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F3275979d-bbed-4639-83e2-8b7d83bed6af\" controls muted playsinline poster=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fmm7894215\u002Ftokentracker\u002Fmain\u002Fdocs\u002Fscreenshots\u002Fdashboard-light.png\" width=\"820\">\u003C\u002Fvideo>\n\n\u003Cbr\u002F>\u003Cbr\u002F>\n\n\u003Ctable>\n\u003Ctr>\n\u003Ctd width=\"58%\">\u003Cimg src=\"docs\u002Fscreenshots\u002Fpet.png\" alt=\"TokenTracker desktop pet powered by real AI coding activity\" \u002F>\u003C\u002Ftd>\n\u003Ctd width=\"42%\">\u003Cimg src=\"docs\u002Fscreenshots\u002Fwidgets-overview.png\" alt=\"TokenTracker desktop widgets for usage, heatmap, models, and limits\" \u002F>\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd>\u003Cstrong>🐾 A living desktop companion\u003C\u002Fstrong>\u003Cbr\u002F>Codes, celebrates streaks, follows your cursor, and rests when you do.\u003C\u002Ftd>\n\u003Ctd>\u003Cstrong>🧩 Four native widgets\u003C\u002Fstrong>\u003Cbr\u002F>Usage, activity heatmap, top models, and rate limits at a glance.\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftable>\n\n\u003Cp>\n  \u003Cimg src=\"dashboard\u002Fpublic\u002Fachievements\u002Ftoken-titan.png\" alt=\"Token Titan achievement\" width=\"64\" \u002F>\n  \u003Cimg src=\"dashboard\u002Fpublic\u002Fachievements\u002Fstreak.png\" alt=\"Streak achievement\" width=\"64\" \u002F>\n  \u003Cimg src=\"dashboard\u002Fpublic\u002Fachievements\u002Fmultitool.png\" alt=\"Multitool achievement\" width=\"64\" \u002F>\n  \u003Cimg src=\"dashboard\u002Fpublic\u002Fachievements\u002Fnight-owl.png\" alt=\"Night Owl achievement\" width=\"64\" \u002F>\n  \u003Cimg src=\"dashboard\u002Fpublic\u002Fachievements\u002Fproject-devotion.png\" alt=\"Project Devotion achievement\" width=\"64\" \u002F>\n\u003C\u002Fp>\n\n\u003Cstrong>🏆 Unlock achievements from the way you actually code.\u003C\u002Fstrong>\n\n\u003Cbr\u002F>\u003Cbr\u002F>\n\n\u003Cstrong>🎬 Meet TokenTracker\u003C\u002Fstrong>\n\n\u003Cbr\u002F>\u003Cbr\u002F>\n\n\u003Cvideo src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F5e709422-5af8-4e4c-8109-f5bb711eb3f8\" controls muted playsinline poster=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fmm7894215\u002Ftokentracker\u002Fmain\u002Fdocs\u002Fscreenshots\u002Fdashboard-dark.png\" width=\"820\">\n  \u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fmm7894215\u002Ftokentracker\u002Fmain\u002Fdocs\u002Fscreenshots\u002Fdashboard-dark.png\" alt=\"Token Tracker Dashboard\" width=\"820\" \u002F>\n\u003C\u002Fvideo>\n\n\u003Cbr\u002F>\u003Cbr\u002F>\n\n⭐ **If TokenTracker saves you time, please [star it on GitHub](https:\u002F\u002Fgithub.com\u002Fmm7894215\u002FTokenTracker) — it helps other developers find it.**\n\n\u003Cbr\u002F>\n\n[![ko-fi](https:\u002F\u002Fko-fi.com\u002Fimg\u002Fgithubbutton_sm.svg)](https:\u002F\u002Fko-fi.com\u002FM4M11XSNWD)\n\n\u003C\u002Fdiv>\n\n---\n\n## ⚡ Quick Start\n\n> **Requirements**: Node.js **20+** (CLI runs on macOS \u002F Linux \u002F Windows; native desktop app ships for both macOS (menu bar) and Windows (system tray). Cursor token reading uses the system `sqlite3` CLI when available and falls back to `node:sqlite` on supported Node releases).\n\n```bash\nnpx tokentracker-cli\n```\n\nThat's it. First run installs hooks, syncs your data, and opens the dashboard at `http:\u002F\u002Flocalhost:7680`.\n\n**What you get in 30 seconds:**\n- 📊 A local dashboard at `localhost:7680` with usage trends, model breakdown, cost analysis\n- 🔌 Auto-detected hooks for every supported AI tool you have installed\n- 🏠 100% local — no account, no API keys, no network calls (except optional leaderboard)\n- 🧩 *Optional:* a Skills tab that browses 250+ public skills and syncs them across Claude · Codex · Grok · Antigravity · Gemini · OpenCode · Hermes\n\n> **Want a native desktop app?**\n> - **macOS** — [Download `TokenTrackerBar.dmg`](https:\u002F\u002Fgithub.com\u002Fmm7894215\u002FTokenTracker\u002Freleases\u002Flatest\u002Fdownload\u002FTokenTrackerBar.dmg) → drag to Applications. Menu bar status icon, desktop widgets, and the dashboard in a WKWebView.\n> - **Windows** — [Download `TokenTracker-Setup.exe`](https:\u002F\u002Fgithub.com\u002Fmm7894215\u002FTokenTracker\u002Freleases\u002Flatest\u002Fdownload\u002FTokenTracker-Setup.exe) → run the per-user installer (no admin needed). System-tray app with the dashboard in WebView2. Portable zip also on the [releases page](https:\u002F\u002Fgithub.com\u002Fmm7894215\u002FTokenTracker\u002Freleases\u002Flatest).\n\nInstall globally for shorter commands:\n\n```bash\nnpm i -g tokentracker-cli\n\ntokentracker              # Open the dashboard\ntokentracker sync         # Manual sync\ntokentracker status       # Check hook status\ntokentracker status --json     # Machine-readable summary (pipe to jq, ingest from AI agents)\ntokentracker status --light    # Plain ASCII table (CI \u002F SSH, no spinner)\ntokentracker doctor       # Health check\n```\n\n### 🍺 Homebrew (macOS)\n\nPrefer `brew`? Install directly — no extra tap step needed:\n\n```bash\n# macOS menu bar app (DMG)\nbrew install --cask mm7894215\u002Ftokentracker\u002Ftokentracker\n\n# CLI only\nbrew install mm7894215\u002Ftokentracker\u002Ftokentracker\n```\n\nUpgrade with `brew upgrade --cask mm7894215\u002Ftokentracker\u002Ftokentracker`. The tap auto-bumps within an hour of every new release.\n\n---\n\n\n## ✨ Features\n\n- 🔌 **27 AI tools out of the box** — Claude Code, Codex CLI, Cursor, Gemini CLI, Antigravity, Kiro, OpenCode, OpenClaw, Every Code, Hermes Agent, GitHub Copilot, Kimi Code, CodeBuddy, WorkBuddy, Grok Build, oh-my-pi, pi, Craft Agents, Kilo CLI, Kilo Code, Roo Code, Zed Agent, Goose, Droid, Mimo Code, ZCode, AnythingLLM Desktop\n- 🏠 **100% local** — Token data never leaves your machine. No account, no API keys.\n- 🚀 **Zero config** — Hooks auto-install on first run. From zero to dashboard in 30 seconds.\n- 📊 **Beautiful dashboard** — Usage trends, cost breakdowns by model, GitHub-style activity heatmap, project attribution\n- 🖥️ **Native desktop app** — macOS menu bar (+ widgets) and Windows system tray, each with an embedded server and the dashboard in a native webview\n- 🐾 **Desktop pet** — A pixel companion powered by real coding activity: it works when you work, celebrates streaks, and sleeps when you rest\n- 🎨 **4 desktop widgets** — Pin Usage \u002F Activity Heatmap \u002F Top Models \u002F Usage Limits to your desktop\n- 🏆 **15 achievement tracks** — Turn daily usage, streaks, tools, models, and milestones into collectible badges worth sharing\n- 📈 **Real-time rate limit tracking** — Claude \u002F Codex \u002F Cursor \u002F Gemini \u002F Kiro \u002F Copilot \u002F Antigravity quota windows with reset countdowns\n- 💰 **Cost engine** — 2,200+ models priced via [LiteLLM](https:\u002F\u002Fgithub.com\u002FBerriAI\u002Flitellm\u002Fblob\u002Fmain\u002Fmodel_prices_and_context_window.json) (auto-refreshed daily) + curated overrides for niche tools (Kiro, Cursor Composer, Kimi, CodeBuddy hy3); 24h disk cache + bundled offline snapshot mean accurate USD without an internet connection. Models without published vendor pricing (e.g. Tencent hy3-preview) are tracked by tokens but show $0 cost until the vendor publishes a rate.\n- 🌐 **Optional leaderboard** — Compare with developers worldwide; drag-to-reorder columns to focus on the providers you care about (opt-in, sign in to participate)\n- 🔄 **Cross-device account view** — Opt in to cloud sync and the dashboard merges your usage across every machine you work on (laptop + desktop + server) into one combined view — totals, trends, heatmap and model breakdown all device-aggregated (opt-in, sign in; the default local-only experience stays instant and offline)\n- 🧩 **Optional Skills tab** — browse 250+ public skills from `anthropics\u002Fskills`, `ComposioHQ\u002Fawesome-claude-skills`, `skills.sh` and any GitHub repo you add; sync them across Claude \u002F Codex \u002F Grok \u002F Antigravity \u002F Gemini \u002F OpenCode \u002F Hermes with named targets and one-click Undo\n- 🔒 **Privacy-first** — Only token counts and timestamps. Never prompts, responses, or file contents.\n\n---\n\n## 🖼️ Showcase\n\n\u003Ctable>\n\u003Ctr>\n\u003Ctd width=\"50%\">\n\n**Dashboard** — usage trends, model breakdown, cost analysis\n\n\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fmm7894215\u002Ftokentracker\u002Fmain\u002Fdocs\u002Fscreenshots\u002Fdashboard-light.png\" alt=\"Dashboard\" \u002F>\n\n\u003C\u002Ftd>\n\u003Ctd width=\"50%\">\n\n**Desktop Widgets** — pin usage to your desktop\n\n\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fmm7894215\u002Ftokentracker\u002Fmain\u002Fdocs\u002Fscreenshots\u002Fwidgets-overview.png\" alt=\"Desktop Widgets\" \u002F>\n\n\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd width=\"50%\">\n\n**Menu Bar App** — animated Clawd companion + native panels\n\n\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fmm7894215\u002Ftokentracker\u002Fmain\u002Fdocs\u002Fscreenshots\u002Fmenubar.gif\" alt=\"Menu Bar App\" \u002F>\n\n\u003C\u002Ftd>\n\u003Ctd width=\"50%\">\n\n**Global Leaderboard** — compare with developers worldwide\n\n\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fmm7894215\u002Ftokentracker\u002Fmain\u002Fdocs\u002Fscreenshots\u002Fleaderboard.png\" alt=\"Leaderboard\" \u002F>\n\n\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd colspan=\"2\">\n\n**Skills Manager** — browse 250+ public skills from GitHub & `skills.sh`, install once, sync to Claude \u002F Codex \u002F Grok \u002F Antigravity \u002F Gemini \u002F OpenCode \u002F Hermes. Per-target toggles, one-click Undo, no manual file copying.\n\n\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fmm7894215\u002Ftokentracker\u002Fmain\u002Fdocs\u002Fscreenshots\u002Fskills.png\" alt=\"Skills Manager\" \u002F>\n\n\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd colspan=\"2\">\n\n**Desktop Pet** — a pixel companion that floats on your desktop and reacts to your real token burn: it codes when you code, celebrates streaks, and sleeps when you rest. Import community pets from [codex-pets.net](https:\u002F\u002Fcodex-pets.net) with a link or a `.codex-pet.zip` — V2 pets even turn their head to follow your cursor in 16 directions. macOS, Windows, and web.\n\n\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fmm7894215\u002Ftokentracker\u002Fmain\u002Fdocs\u002Fscreenshots\u002Fpet.png\" alt=\"Desktop Pet\" \u002F>\n\n\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003Ctr>\n\u003Ctd colspan=\"2\">\n\n**Achievements** — 15 tracks turn usage milestones, streaks, tools, and models into collectible badges — with progress visible before each unlock.\n\n\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fmm7894215\u002Ftokentracker\u002Fmain\u002Fdocs\u002Fscreenshots\u002Fachievements.png\" alt=\"TokenTracker Achievements\" \u002F>\n\n\u003C\u002Ftd>\n\u003C\u002Ftr>\n\u003C\u002Ftable>\n\n---\n\n## 🔌 Supported AI Tools\n\n| Tool | Detection | Method |\n|---|---|---|\n| **Claude Code** | ✅ Auto | SessionEnd hook in `settings.json` |\n| **Codex CLI** | ✅ Auto | TOML notify hook in `config.toml` |\n| **Cursor** | ✅ Auto | API + SQLite auth token |\n| **Kiro** | ✅ Auto | SQLite + JSONL hybrid |\n| **Gemini CLI** | ✅ Auto | SessionEnd hook |\n| **OpenCode** | ✅ Auto | Plugin system + SQLite |\n| **OpenClaw** | ✅ Auto | Session plugin |\n| **Every Code** | ✅ Auto | TOML notify hook |\n| **Hermes Agent** | ✅ Auto | SQLite sessions table (`~\u002F.hermes\u002Fstate.db`) |\n| **GitHub Copilot App \u002F CLI** | ✅ Auto | Unified per-request SQLite usage (`~\u002F.copilot\u002Fsession-store.db`); App DB legacy baseline |\n| **GitHub Copilot Chat extension \u002F legacy CLI** | ✅ Auto | OpenTelemetry file exporter (`COPILOT_OTEL_FILE_EXPORTER_PATH`) |\n| **Kimi Code** | ✅ Auto | Passive `wire.jsonl` reader (`~\u002F.kimi\u002Fsessions\u002F**\u002Fwire.jsonl`) |\n| **oh-my-pi (Pi Coding Agent)** | ✅ Auto | Passive reader (`~\u002F.omp\u002Fagent\u002Fsessions\u002F**\u002F*.jsonl`) |\n| **CodeBuddy** (Tencent) | ✅ Auto | SessionEnd hook in `~\u002F.codebuddy\u002Fsettings.json` (Claude-Code fork) |\n| **WorkBuddy** (Tencent) | ✅ Auto | SessionEnd hook in `~\u002F.workbuddy\u002Fsettings.json` (Claude-Code fork) + passive `projects\u002F**\u002F*.jsonl` scan |\n| **Grok Build** (xAI) | ✅ Auto | SessionEnd hook + passive `updates.jsonl` \u002F `signals.json` scan (`~\u002F.grok\u002Fsessions\u002F**\u002F`) |\n| **Kilo CLI** (kilo.ai) | ✅ Auto | Passive SQLite reader (`~\u002F.local\u002Fshare\u002Fkilo\u002Fkilo.db`, OpenCode-fork schema) |\n| **Kilo Code** (VS Code extension) | ✅ Auto | Passive `ui_messages.json` reader (Cursor\u002FCode\u002FCodeBuddy\u002FWindsurf globalStorage) |\n| **Antigravity** | ✅ Auto | Passive transcript reader (`~\u002F.gemini\u002F{antigravity,antigravity-ide,antigravity-cli}\u002Fbrain\u002F**\u002Ftranscript.jsonl`) |\n| **pi** (`@mariozechner\u002Fpi-coding-agent`) | ✅ Auto | Passive reader (`~\u002F.pi\u002Fagent\u002Fsessions\u002F**\u002F*.jsonl`) |\n| **Craft Agents** | ✅ Auto | Passive session reader (`~\u002F.craft-agent` + workspace session logs) |\n| **Roo Code** (VS Code extension) | ✅ Auto | Passive `ui_messages.json` reader (`rooveterinaryinc.roo-cline`) |\n| **Zed Agent** | ✅ Auto | Passive SQLite reader (`threads.db`, all providers — hosted `zed.dev` + bring-your-own) |\n| **Goose** (Block) | ✅ Auto | Passive SQLite reader (`sessions.db`, cumulative deltas) |\n| **Droid** (Factory) | ✅ Auto | Passive session reader (`~\u002F.factory\u002Fsessions\u002F**\u002Fsettings.json`, cumulative deltas) |\n| **Mimo Code** (mimocode) | ✅ Auto | Passive SQLite reader (`~\u002F.local\u002Fshare\u002Fmimocode\u002Fmimocode.db`, OpenCode-fork schema; counts only mimo-native turns — mirrored Claude\u002Fclaude-mem history is excluded) |\n| **ZCode** (Z.ai) | ✅ Auto | Passive SQLite reader (`~\u002F.zcode\u002Fcli\u002Fdb\u002Fdb.sqlite`, OpenCode-fork schema; counts only Z.ai\u002FBigModel GLM turns — bundled Claude\u002FCodex\u002FGemini sub-agents are excluded) |\n| **AnythingLLM Desktop** | ✅ Auto | Passive SQLite reader (`anythingllm-desktop\u002Fstorage\u002Fanythingllm.db`; reads per-message token metrics only, never prompts or responses) |\n\n> **Do I need to install any plugin or hook manually?** No. `tokentracker` (or `tokentracker init`) handles everything on first run:\n> - **Hook-based** tools (Claude Code, Codex, Gemini, Every Code, **CodeBuddy**, **WorkBuddy**, **Grok Build**) — we write a SessionEnd hook or TOML notify entry into the tool's own config.\n> - **Plugin-based** tools (OpenCode, **OpenClaw**) — plugins ship inside the npm package. OpenClaw's session plugin lives at `~\u002F.tokentracker\u002Ftracker\u002Fopenclaw-plugin\u002Fopenclaw-session-sync\u002F`; we link and enable it via OpenClaw's own CLI, then set `hooks.allowConversationAccess=true` so OpenClaw permits the session-finished event that triggers sync. No download, no drag-and-drop.\n> - **Passive readers** (Cursor, Kiro, Hermes, Kimi Code, Copilot, **Grok Build**, **oh-my-pi**, **pi**, **Craft Agents**, **Kilo CLI**, **Kilo Code**, **Roo Code**, **Antigravity**, **Zed Agent**, **Goose**, **Droid**, **Mimo Code**, **ZCode**, **AnythingLLM Desktop**) — nothing is installed into those tools. We only read files they already produce (SQLite DB, JSONL, OTEL export, session logs). Copilot App \u002F CLI usage is read per request from `~\u002F.copilot\u002Fsession-store.db`; `data.db` provides the one-time legacy adoption baseline and stays observe-only after the store becomes canonical, while the Chat extension and legacy CLI continue using OTEL. TokenTracker coordinates the sources so overlapping requests are counted once. Mixed App\u002FCLI usage that predates adoption is retained as a `github-copilot-legacy` aggregate rather than assigned to a guessed request model.\n> - **Grok Build estimate** — current local telemetry exposes cumulative `updates.jsonl` `totalTokens`, but not a stable prompt\u002Foutput\u002Fcache split; `signals.json` remains a fallback with `contextTokensUsed` snapshots. TokenTracker estimates Grok cost until per-call usage details are available.\n>\n> Run `tokentracker status` anytime to verify every integration's state. If something shows `skipped`, the `detail` column explains why (e.g. tool CLI not on `PATH`, config unreadable).\n>\n> Deeper dives: [OpenClaw integration & troubleshooting](docs\u002Fopenclaw-integration.md).\n\nMissing your tool? [Open an issue](https:\u002F\u002Fgithub.com\u002Fmm7894215\u002FTokenTracker\u002Fissues\u002Fnew) — adding new providers is usually one parser file away.\n\n---\n\n## 🆚 Why TokenTracker? \u003Ca id=\"ccusage-alternative\">\u003C\u002Fa>\n\n> **Looking for a ccusage alternative with a GUI?** TokenTracker covers 27 tools (not just Claude Code), adds native macOS and Windows apps + desktop widgets, and de-duplicates token records correctly across providers — so your numbers match the providers' own billing.\n\n|                          | **TokenTracker** | ccusage     | Cursor stats |\n|--------------------------|:---:|:---:|:---:|\n| **AI tools supported**   | **27**           | 1 (Claude)  | 1 (Cursor)   |\n| **Local-first, no account** | ✅            | ✅           | ❌            |\n| **Native desktop app**   | ✅ macOS + Windows | ❌           | ❌            |\n| **Desktop widgets**      | ✅ 4 widgets      | ❌           | ❌            |\n| **Rate-limit tracking**  | ✅ 7 providers    | ❌           | Cursor only  |\n| **Accurate multi-provider dedup** | ✅      | ❌ ¹         | —            |\n\n\u003Csub>¹ `reqId`-based deduplication over-counts providers that omit a request ID (DeepSeek \u002F Kimi \u002F MiniMax \u002F Claude sub-agents) by 1.6–3.7×. TokenTracker dedups on a composite key, so totals match each provider's own billing dashboard.\u003C\u002Fsub>\n\n---\n\n## 🏗️ How It Works\n\n```mermaid\nflowchart LR\n    A[\"AI coding tools\u003Cbr\u002F>Claude Code · Codex · Cursor · Gemini · Kiro\u003Cbr\u002F>OpenCode · OpenClaw · Every Code · Hermes · Copilot\u003Cbr\u002F>Kimi Code · CodeBuddy · WorkBuddy · Grok Build · Kilo CLI · Kilo Code\u003Cbr\u002F>Antigravity · oh-my-pi · pi · Craft · Roo · Zed · Goose · Droid · Mimo · ZCode · AnythingLLM\"]\n    A -->|hooks trigger| B[Token Tracker]\n    B -->|parse logs\u003Cbr\u002F>30-min UTC buckets| C[(Local SQLite)]\n    C --> D[Web Dashboard]\n    C --> E[Menu Bar App]\n    C --> F[Desktop Widgets]\n    C -.->|opt-in| G[(Cloud Leaderboard)]\n```\n\n1. AI CLI tools generate logs during normal use\n2. Lightweight hooks detect changes and trigger sync (Cursor uses API instead of hooks)\n3. Token counts parsed locally — never any prompt or response content\n4. Aggregated into 30-minute UTC buckets\n5. Dashboard, menu bar app, and widgets all read from the same local snapshot\n\n---\n\n## 🛡️ Privacy\n\n| Protection | Description |\n|---|---|\n| **No content upload** | Only token counts and timestamps. Never prompts, responses, or file contents. |\n| **Local-only by default** | All data stays on your machine. The leaderboard is fully opt-in. |\n| **Auditable** | Open source. Read [`src\u002Flib\u002Frollout.js`](src\u002Flib\u002Frollout.js) — only numbers and timestamps. |\n| **Anonymous usage stats only** | Two things phone home, both anonymous: (1) at most one daily heartbeat — a one-way hash of the machine id, app version, OS platform, and app shell (cli\u002Fmac\u002Fwin); (2) anonymous dashboard pageview\u002Ffeature events (PostHog — autocapture and session recording disabled, browser Do-Not-Track respected). Never token counts, model names, prompts, or paths. Audit [`src\u002Flib\u002Ftelemetry.js`](src\u002Flib\u002Ftelemetry.js) and [`dashboard\u002Fsrc\u002Flib\u002Fanalytics.js`](dashboard\u002Fsrc\u002Flib\u002Fanalytics.js); one switch disables both on your machine: `TOKENTRACKER_NO_TELEMETRY=1` (or `DO_NOT_TRACK=1`). |\n\n---\n\n## 📦 Configuration\n\nMost users never need this — defaults are sensible. For advanced setups:\n\n| Variable | Description | Default |\n|---|---|---|\n| `TOKENTRACKER_DEBUG` | Enable debug output (`1` to enable) | — |\n| `TOKENTRACKER_NO_TELEMETRY` | Disable all anonymous telemetry — daily heartbeat and dashboard analytics (`1` to disable; the `DO_NOT_TRACK` standard is also respected) | — |\n| `TOKENTRACKER_HTTP_TIMEOUT_MS` | HTTP timeout in milliseconds | `20000` |\n| `TOKENTRACKER_WSL_MODE` | WSL install resolution behavior on Windows (for aggregating native and WSL installations). `wsl-first` (prefer WSL), `native-first`, `wsl-only`, `native-only`, `both` (aggregate both installs) | `wsl-first` |\n| `CODEX_HOME` | Override Codex CLI directory | `~\u002F.codex` |\n| `GEMINI_HOME` | Override Gemini CLI directory | `~\u002F.gemini` |\n| `TOKENTRACKER_GROK_HOME` | Override Grok Build directory for the Grok integration and Skills Manager | `~\u002F.grok` |\n| `GROK_HOME` | Legacy Grok Build directory override, used when `TOKENTRACKER_GROK_HOME` is unset | `~\u002F.grok` |\n| `TOKENTRACKER_ANTIGRAVITY_HOME` | Force a single Antigravity Skills directory (auto-detects `~\u002F.gemini\u002Fantigravity` + `~\u002F.gemini\u002Fantigravity-ide` otherwise) | auto |\n\n### 🐧 Windows Subsystem for Linux (WSL) Auto-Discovery\n\nIf you run AI coding agents inside WSL on Windows, TokenTracker can auto-discover and aggregate metrics from both native Windows and WSL installations.\n\nConfigure this behavior using the `TOKENTRACKER_WSL_MODE` environment variable:\n* `both` (Recommended): Scans and aggregates metrics from both native Windows and WSL.\n* `wsl-first` (Default): Checks WSL first; if found, uses WSL metrics, otherwise falls back to Windows.\n* `native-first`: Checks native Windows first; if found, uses Windows metrics, otherwise falls back to WSL.\n* `wsl-only`: Scans WSL environment only.\n* `native-only`: Scans native Windows environment only.\n\n> [!NOTE]\n> **Preference (`-first`) vs. Isolation (`-only`):** Preference modes prioritize your choice but gracefully fall back to scanning the other environment if the tool is missing. Isolation modes strictly lock scanning to that single environment and ignore the other completely.\n\nSupported providers for WSL auto-discovery and aggregation:\n* **Dual-Install Aggregation (`both` mode):**\n  * **File-list & Active CLIs:** Every Code, Kimi (legacy & Code), Gemini CLI, Antigravity, OpenCode (JSON), Codex CLI, CodeBuddy, WorkBuddy, oh-my-pi (omp), pi, GitHub Copilot (OTEL), Roo Code, Craft, Kilo Code, Droid.\n  * **SQLite-based DBs:** Hermes, Zed Agent, Goose, OpenCode (`opencode.db`), Kilo CLI, Mimo Code, ZCode, GitHub Copilot (App DB).\n* **WSL Auto-Discovery (Preference\u002FIsolation only, no dual aggregation):**\n  * Grok Build (dynamically selects either native or WSL depending on the mode, but does not aggregate both in `both` mode).\n\n---\n\n## 🛠️ Development\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fmm7894215\u002FTokenTracker.git\ncd TokenTracker\nnpm install\n\n# Build dashboard + run CLI\ncd dashboard && npm install && npm run build && cd ..\nnode bin\u002Ftracker.js\n\n# Tests\nnpm test\n```\n\n### Building the macOS App\n\n```bash\ncd TokenTrackerBar\nnpm run dashboard:build              # Build the dashboard bundle\n.\u002Fscripts\u002Fbundle-node.sh             # Bundle Node.js + tokentracker source\nxcodegen generate                    # Generate the Xcode project\nruby scripts\u002Fpatch-pbxproj-icon.rb   # Patch in the Icon Composer asset\nxcodebuild -scheme TokenTrackerBar -configuration Release clean build\n.\u002Fscripts\u002Fcreate-dmg.sh              # Package the .app into a DMG\n```\n\nRequires **Xcode 16+** and [XcodeGen](https:\u002F\u002Fgithub.com\u002Fyonaskolb\u002FXcodeGen).\n\n---\n\n## 🔧 Troubleshooting\n\n### CLI\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>\"engines.node\" or unsupported version error\u003C\u002Fb>\u003C\u002Fsummary>\n\n\u003Cbr\u002F>\n\nTokenTracker requires **Node 20+**. Check your version:\n\n```bash\nnode --version\n```\n\nIf lower, upgrade via [nvm](https:\u002F\u002Fgithub.com\u002Fnvm-sh\u002Fnvm), [fnm](https:\u002F\u002Fgithub.com\u002FSchniz\u002Ffnm), or your package manager (`brew upgrade node`, `apt install nodejs`).\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>Port 7680 already in use\u003C\u002Fb>\u003C\u002Fsummary>\n\n\u003Cbr\u002F>\n\nThe dashboard server picks the next free port automatically (`7681`, `7682`, ...) when `7680` is taken. The actual port is logged on startup. If you want to force a specific port:\n\n```bash\nPORT=7700 tokentracker serve\n```\n\nTo find what's holding `7680`:\n\n```bash\nlsof -i :7680\n```\n\n**WSL2 note**: on Windows hosts the Delivery Optimization service (`DoSvc`) listens on `7680`, and under NAT networking the conflict is invisible from inside WSL — the server starts fine but the Windows browser reaches `DoSvc` instead. TokenTracker therefore defaults to `7681` when running under WSL (logged on startup).\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>A provider isn't being detected\u003C\u002Fb>\u003C\u002Fsummary>\n\n\u003Cbr\u002F>\n\nCheck the integration status:\n\n```bash\ntokentracker status\n```\n\nThen run the doctor for a deeper health check:\n\n```bash\ntokentracker doctor\n```\n\nIf a provider shows as not configured even though you use it, try `tokentracker activate-if-needed` to re-run hook detection. If still missing, [open an issue](https:\u002F\u002Fgithub.com\u002Fmm7894215\u002FTokenTracker\u002Fissues\u002Fnew) with the `doctor` output attached.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>How to uninstall hooks and remove all config\u003C\u002Fb>\u003C\u002Fsummary>\n\n\u003Cbr\u002F>\n\n```bash\ntokentracker uninstall\n```\n\nThis removes every hook TokenTracker installed across all detected AI tools, plus the local config and data. Safe to re-run.\n\n\u003C\u002Fdetails>\n\n### macOS App\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>\"TokenTrackerBar can't be opened\" — unidentified developer\u003C\u002Fb>\u003C\u002Fsummary>\n\n\u003Cbr\u002F>\n\nTokenTrackerBar is **ad-hoc signed** (not notarized with an Apple Developer ID — that requires a paid developer account). Gatekeeper blocks it on first launch.\n\n1. Open **System Settings → Privacy & Security**\n2. Scroll to the **Security** section — you'll see *\"TokenTrackerBar was blocked to protect your Mac.\"*\n3. Click **Open Anyway**\n4. Confirm with **Open** in the follow-up dialog (you'll need to authenticate)\n\nYou only need to do this once. Older macOS alternative: right-click the app in Finder → **Open** → **Open** in the confirmation dialog.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>\"TokenTrackerBar is damaged and can't be opened\"\u003C\u002Fb>\u003C\u002Fsummary>\n\n\u003Cbr\u002F>\n\nThis is Gatekeeper reacting to the `com.apple.quarantine` attribute macOS attaches to every downloaded file — not an actual problem. Clear it once with:\n\n```bash\nxattr -cr \u002FApplications\u002FTokenTrackerBar.app\n```\n\nAfter that the app opens normally.\n\n\u003C\u002Fdetails>\n\n\u003Cdetails>\n\u003Csummary>\u003Cb>\"TokenTrackerBar wants to access data from other apps\"\u003C\u002Fb>\u003C\u002Fsummary>\n\n\u003Cbr\u002F>\n\nThis is required for the **Cursor** and **Kiro** integrations. They store auth tokens \u002F usage data inside their own `~\u002FLibrary\u002FApplication Support\u002F` folders, which macOS protects with the App Management permission.\n\n- ✅ Click **Allow** if you use Cursor or Kiro\n- ❌ Click **Don't Allow** if you don't — those providers will be silently skipped, everything else keeps working\n\nOnce granted, the permission is remembered. Note that ad-hoc signed builds re-prompt after each upgrade because each build has a new signing identity.\n\n\u003C\u002Fdetails>\n\n---\n\n## 🪪 README Badges\n\nShow off your token usage on your GitHub profile or project README.\n\nTo get `YOUR_USER_ID`:\n1. Run `tokentracker`, open the dashboard, and sign in to the leaderboard.\n2. Go to **Settings → Account**.\n3. Use the **User ID** shown there. On headless machines, `tokentracker device-login` also writes the same `user_id` to `~\u002F.tokentracker\u002Ftracker\u002Fconfig.json`.\n\nThen drop one of these in:\n\n```markdown\n[![tokens](https:\u002F\u002Fsrctyff5.us-east.insforge.app\u002Ffunctions\u002Ftokentracker-badge-svg?user_id=YOUR_USER_ID&metric=tokens)](https:\u002F\u002Fgithub.com\u002Fmm7894215\u002FTokenTracker)\n[![cost](https:\u002F\u002Fsrctyff5.us-east.insforge.app\u002Ffunctions\u002Ftokentracker-badge-svg?user_id=YOUR_USER_ID&metric=cost)](https:\u002F\u002Fgithub.com\u002Fmm7894215\u002FTokenTracker)\n[![rank](https:\u002F\u002Fsrctyff5.us-east.insforge.app\u002Ffunctions\u002Ftokentracker-badge-svg?user_id=YOUR_USER_ID&metric=rank)](https:\u002F\u002Fgithub.com\u002Fmm7894215\u002FTokenTracker)\n```\n\n> The link target defaults to the TokenTracker repo so every click helps other developers discover the tool. Swap it for your leaderboard profile, personal site, or `https:\u002F\u002Fwww.tokentracker.cc` if you'd rather route clicks elsewhere.\n\nRenders shields.io-compatible badges with your current totals (60s cache):\n\n| Param | Values | Default |\n|---|---|---|\n| `metric` | `tokens` \u002F `cost` \u002F `rank` | `tokens` |\n| `period` | `week` \u002F `month` \u002F `total` | `total` |\n| `style` | `flat` \u002F `flat-square` | `flat` |\n| `label` | any short string | metric name |\n| `color` | hex, e.g. `ff6b35` | brand green |\n\n> **Privacy**: badges only resolve for profiles where leaderboard sharing is **on** (`Settings → Account → Public profile`). Private profiles get a \"private\" placeholder.\n\n---\n\n## ⭐ Star History\n\n\u003Ca href=\"https:\u002F\u002Fwww.star-history.com\u002F?type=date&repos=mm7894215%2FTokenTracker\">\n  \u003Cpicture>\n    \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"https:\u002F\u002Fapi.star-history.com\u002Fchart?repos=mm7894215\u002FTokenTracker&type=date&theme=dark&legend=top-left&sealed_token=Xb4biZj6WI7GnAYqiQdvOITTTMcqLjMHZTNJ2UzckXkd4FdNyLLNwz0K6wG1hDug6G3HxW4K4bmIETMQTXK74rD4Io0eTU6igxPnSeLgP-NkOnZz7rlCePm6aVMFVm2JCuPoi92rcR6OhEmdYqopiFIxHt4iwzOa-L1-YcLplRoLIdtjTyjUotxai-QH\" \u002F>\n    \u003Csource media=\"(prefers-color-scheme: light)\" srcset=\"https:\u002F\u002Fapi.star-history.com\u002Fchart?repos=mm7894215\u002FTokenTracker&type=date&legend=top-left&sealed_token=Xb4biZj6WI7GnAYqiQdvOITTTMcqLjMHZTNJ2UzckXkd4FdNyLLNwz0K6wG1hDug6G3HxW4K4bmIETMQTXK74rD4Io0eTU6igxPnSeLgP-NkOnZz7rlCePm6aVMFVm2JCuPoi92rcR6OhEmdYqopiFIxHt4iwzOa-L1-YcLplRoLIdtjTyjUotxai-QH\" \u002F>\n    \u003Cimg alt=\"Star History Chart\" src=\"https:\u002F\u002Fapi.star-history.com\u002Fchart?repos=mm7894215\u002FTokenTracker&type=date&legend=top-left&sealed_token=Xb4biZj6WI7GnAYqiQdvOITTTMcqLjMHZTNJ2UzckXkd4FdNyLLNwz0K6wG1hDug6G3HxW4K4bmIETMQTXK74rD4Io0eTU6igxPnSeLgP-NkOnZz7rlCePm6aVMFVm2JCuPoi92rcR6OhEmdYqopiFIxHt4iwzOa-L1-YcLplRoLIdtjTyjUotxai-QH\" \u002F>\n  \u003C\u002Fpicture>\n\u003C\u002Fa>\n\n---\n\n## 🤝 Contributing & Support\n\n- **Bugs \u002F feature requests**: [open an issue](https:\u002F\u002Fgithub.com\u002Fmm7894215\u002FTokenTracker\u002Fissues\u002Fnew)\n- **Security**: see [SECURITY.md](SECURITY.md) — please don't open public issues for security reports\n- **Pull requests**: see [CONTRIBUTING.md](CONTRIBUTING.md) for setup, tests, and how to add a new AI tool integration\n- **Questions \u002F showcase**: [GitHub Discussions](https:\u002F\u002Fgithub.com\u002Fmm7894215\u002FTokenTracker\u002Fdiscussions)\n\n## 🙏 Credits\n\nThe Clawd character design belongs to Anthropic. This is a community project with no official affiliation with Anthropic.\n\n## 🔗 Friendly Links\n\n- [LINUX DO](https:\u002F\u002Flinux.do) — a developer community we like\n\n## License\n\n[MIT](LICENSE)\n\n---\n\n\u003Cdiv align=\"center\">\n\n**Token Tracker** — Quantify your AI output.\n\n\u003Ca href=\"https:\u002F\u002Fwww.tokentracker.cc\">tokentracker.cc\u003C\u002Fa>  ·  \u003Ca href=\"https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Ftokentracker-cli\">npm\u003C\u002Fa>  ·  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fmm7894215\u002FTokenTracker\">GitHub\u003C\u002Fa>\n\n\u003C\u002Fdiv>\n","TokenTracker 是一款本地优先的 AI 编程 Token 使用量与成本追踪工具，专为开发者设计。它支持 27 款主流 AI 编程工具（如 GitHub Copilot、Cursor、Tabnine 等），通过本地解析日志实现零网络上传、不读取提示词；提供桌面宠物、4 款原生系统级小部件（含用量统计、热力图、模型排行、速率限制）、15 项成就系统，以及跨平台 CLI 和 macOS\u002FWindows 原生应用。适用于关注 AI 使用成本、需合规审计或偏好隐私保护的个人开发者及技术团队。",2,"2026-07-17 02:30:11","trending"]