经 AI Skill Hub 精选评估,Token用量追踪器 获评「强烈推荐」。这款Agent工作流在功能完整性、社区活跃度和易用性方面表现出色,AI 评分 8.2 分,适合有一定技术背景的用户使用。
Token用量追踪器 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
Token用量追踪器 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
# 方式一:npm 全局安装 npm install -g tokentracker # 方式二:npx 直接运行(无需安装) npx tokentracker --help # 方式三:项目依赖安装 npm install tokentracker # 方式四:从源码运行 git clone https://github.com/mm7894215/TokenTracker cd TokenTracker npm install npm start
# 命令行使用
tokentracker --help
# 基本用法
tokentracker [options] <input>
# Node.js 代码中使用
const tokentracker = require('tokentracker');
const result = await tokentracker.run(options);
console.log(result);
# tokentracker 配置说明 # 查看配置选项 tokentracker --config-example > config.yml # 常见配置项 # output_dir: ./output # log_level: info # workers: 4 # 环境变量(覆盖配置文件) export TOKENTRACKER_CONFIG="/path/to/config.yml"
anthropics/skills, ComposioHQ/awesome-claude-skills, skills.sh and any GitHub repo you add; sync them across Claude / Codex / Grok / Antigravity / Gemini / OpenCode / Hermes with named targets and one-click Undo---
cd dashboard && npm install && npm run build && cd .. node bin/tracker.js
cd TokenTrackerBar
npm run dashboard:build # Build the dashboard bundle
./scripts/bundle-node.sh # Bundle Node.js + tokentracker source
xcodegen generate # Generate the Xcode project
ruby scripts/patch-pbxproj-icon.rb # Patch in the Icon Composer asset
xcodebuild -scheme TokenTrackerBar -configuration Release clean build
./scripts/create-dmg.sh # Package the .app into a DMG
Requires Xcode 16+ and XcodeGen.
---
An accurate, local-first token usage and cost dashboard for 46 AI coding tools — plus a desktop pet, 4 native widgets, and 15 achievement tracks. No cloud account, no API keys, no setup.
<br/>
<strong>📊 See the token dashboard in action</strong>
<br/><br/>
<video src="https://github.com/user-attachments/assets/3275979d-bbed-4639-83e2-8b7d83bed6af" controls muted playsinline poster="https://raw.githubusercontent.com/xiufengsun/tokentracker/main/docs/screenshots/dashboard-light.png" width="820"></video>
<br/><br/>
![]() |
![]() |
| 🐾 A living desktop companion Codes, celebrates streaks, follows your cursor, and rests when you do. |
🧩 Four native widgets Usage, activity heatmap, top models, and rate limits at a glance. |
<p> <img src="dashboard/public/achievements/token-titan.png" alt="Token Titan achievement" width="64" /> <img src="dashboard/public/achievements/streak.png" alt="Streak achievement" width="64" /> <img src="dashboard/public/achievements/multitool.png" alt="Multitool achievement" width="64" /> <img src="dashboard/public/achievements/night-owl.png" alt="Night Owl achievement" width="64" /> <img src="dashboard/public/achievements/project-devotion.png" alt="Project Devotion achievement" width="64" /> </p>
<strong>🏆 Unlock achievements from the way you actually code.</strong>
<br/><br/>
<strong>🎬 Meet TokenTracker</strong>
<br/><br/>
<video src="https://github.com/user-attachments/assets/efb89086-b7d7-4cb6-ae3c-3a6cb50188d2" controls muted playsinline poster="https://raw.githubusercontent.com/xiufengsun/tokentracker/main/docs/screenshots/intro-film-poster.png" width="820"> <img src="https://raw.githubusercontent.com/xiufengsun/tokentracker/main/docs/screenshots/intro-film-poster.png" alt="TokenTracker intro film" width="820" /> </video>
<br/><br/>
⭐ If TokenTracker saves you time, please star it on GitHub — it helps other developers find it.
<br/>
</div>
---
This project is tested with BrowserStack.
---
Requirements: Node.js 20+ (CLI runs on macOS / Linux / Windows; native desktop app ships for macOS (menu bar), Windows (system tray) and Linux (AppImage, tray). Cursor token reading uses the systemsqlite3CLI when available and falls back tonode:sqliteon supported Node releases).
npx tokentracker-cli
That's it. First run installs hooks, syncs your data, and opens the dashboard at http://localhost:7680.
What you get in 30 seconds: - 📊 A local dashboard at localhost:7680 with usage trends, model breakdown, cost analysis - 🔌 Auto-detected hooks for every supported AI tool you have installed - 🏠 Local-first — parses logs on your machine; no account or API keys required - 🧩 Optional: a Skills tab that browses 250+ public skills and syncs them across Claude · Codex · Grok · Antigravity · Gemini · OpenCode · Hermes
Want a native desktop app? - macOS — DownloadTokenTrackerBar.dmg→ drag to Applications. Menu bar status icon, desktop widgets, and the dashboard in a WKWebView. - Windows — DownloadTokenTracker-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. - Linux — DownloadTokenTracker-linux-x86_64.AppImage→chmod +xand run. Tray app with the dashboard in a WebKitGTK window. It carries its own GTK/WebKit, so it needs nothing from your distro beyond a current glibc; on GNOME the tray icon still needs the AppIndicator extension..deband.rpmpackages are also on the releases page — those link the distro'swebkit2gtk-4.1,gtk3and appindicator instead, so the.debwill not install on Debian 12 (use the AppImage there).
Install globally for shorter commands:
npm i -g tokentracker-cli
tokentracker # Open the dashboard
tokentracker sync # Manual sync
tokentracker status # Check hook status
tokentracker status --json # Machine-readable summary (pipe to jq, ingest from AI agents)
tokentracker status --light # Plain ASCII table (CI / SSH, no spinner)
tokentracker doctor # Health check
In the local dashboard, open Settings → App → Local data. Export usage on one computer, then select that JSON file on another computer, review the preview and confirm the merge. Imported computers appear in the dashboard's existing device selector and device distribution card. You can remove an imported source from the same settings page.
Preview totals and device contributions follow the dashboard's current display metric; the original counters remain in the snapshot. Context breakdown is available with this device selected. Project, session and outcome analyses remain local to this computer, with a scope notice when offline sources are present.
A newer complete snapshot replaces that computer's previous snapshot; importing the same file again does not add usage. Exports contain only this computer's retained device-level history, including token counts, tools, models, time buckets and its device label. They exclude imported sources, credentials, prompts, project/session data, and account-level Cursor/TRAE CN usage. Imported snapshots stay local and never enter the cloud upload queue. Transfer files only between computers with independent histories: copied sessions cannot be deduplicated from aggregated usage. Legacy tokentracker-sync synthetic queues require separate migration. Files are limited to 5 MiB, with up to 32 imported computers.
|
Dashboard — usage trends, model breakdown, cost analysis <img src="https://raw.githubusercontent.com/xiufengsun/tokentracker/main/docs/screenshots/dashboard-light.png" alt="Dashboard" /> </td> <td width="50%"> Desktop Widgets — pin usage to your desktop <img src="https://raw.githubusercontent.com/xiufengsun/tokentracker/main/docs/screenshots/widgets-overview.png" alt="Desktop Widgets" /> </td> </tr> <tr> <td width="50%"> Menu Bar App — animated Clawd companion + native panels <img src="https://raw.githubusercontent.com/xiufengsun/tokentracker/main/docs/screenshots/menubar.gif" alt="Menu Bar App" /> </td> <td width="50%"> Global Leaderboard — compare with developers worldwide <img src="https://raw.githubusercontent.com/xiufengsun/tokentracker/main/docs/screenshots/leaderboard.png" alt="Leaderboard" /> </td> </tr> <tr> <td colspan="2"> Skills Manager — browse 250+ public skills from GitHub & <img src="https://raw.githubusercontent.com/xiufengsun/tokentracker/main/docs/screenshots/skills.png" alt="Skills Manager" /> </td> </tr> <tr> <td colspan="2"> 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 with a link or a <img src="https://raw.githubusercontent.com/xiufengsun/tokentracker/main/docs/screenshots/pet.png" alt="Desktop Pet" /> </td> </tr> <tr> <td colspan="2"> Achievements — 15 tracks turn usage milestones, streaks, tools, and models into collectible badges — with progress visible before each unlock. <img src="https://raw.githubusercontent.com/xiufengsun/tokentracker/main/docs/screenshots/achievements.png" alt="TokenTracker Achievements" /> </td> </tr> </table> --- 📦 ConfigurationMost users never need this — defaults are sensible. For advanced setups:
CLI onlybrew install xiufengsun/tokentracker/tokentracker ``` Upgrade with 🆚 Why TokenTracker? <a id="ccusage-alternative"></a>Looking for a desktop app with widgets and a visual dashboard? TokenTracker pairs local log parsing across AI coding tools with native desktop apps, desktop widgets, provider quota tracking, and optional cloud sync.
--- 🔧 TroubleshootingZCode totals decreased after v0.96.0? This release corrects historical cache/reasoning double counting, including previously uploaded months. See the ZCode history correction for the accounting change and local backup details.
🇨🇳 中文文档镜像
AI 翻译
2026-05-30
英文原文章节由系统翻译为中文摘要,便于快速理解。完整原文见上方 "📑 README 深度解析"。
📌 简介
TokenTracker 是一款专为开发者设计的 AI Token 使用量监控工具。它能够实时追踪各类 AI 编程工具的 Token 消耗情况,帮助你直观掌握 AI 辅助编程的成本与使用频率,实现对 AI 资源的高效管理。 ⚡ 功能介绍
TokenTracker 开箱即用,内置支持 Claude Code、Cursor、GitHub Copilot、Gemini CLI、Roo Code 等 22 款主流 AI 工具。项目坚持 100% 本地化运行,所有 Token 数据均存储在你的本地机器中,无需注册账号或配置 API Key,确保隐私安全。此外,它采用 Zero config 设计,Hooks 会自动安装,实现零配置快速上手。 🛠 安装步骤(Docker/pip/源码)
你可以通过源码构建 Dashboard 并运行 CLI。首先进入 dashboard 目录执行 npm install 并完成 build,随后回到根目录运行 node bin/tracker.js。若需构建 macOS 桌面应用,需按照特定脚本流程进行 xcodegen 生成、Xcode 项目构建及 DMG 打包。请确保系统环境已准备好相应的构建工具。 🚀 使用教程
快速上手非常简单:确保你的 Node.js 版本在 20+ 以上,在终端直接运行 `npx tokentracker-cli` 即可。首次运行时,程序会自动安装必要的 Hooks 并同步数据,随后会自动在浏览器中打开 Dashboard 界面(http://localhost:7680)。只需 30 秒,你就能开始监控 AI 工具的使用情况。 ⚙️ 配置说明(含 MCP / env)
对于大多数用户,TokenTracker 的默认配置已足够好用。如果你需要进行高级自定义,可以通过环境变量进行配置。例如,使用 `TOKENTRACKER_DEBUG` 开启调试模式,或通过 `TOKENTRACKER_HTTP_TIMEOUT_MS` 调整 HTTP 超时时间。部分特定工具如 Codex CLI 的路径也可以通过 `CODEX_HOME` 进行覆盖。 🔌 API 说明
目前 TokenTracker 主要以 CLI 形式提供服务。你可以通过 Homebrew 进行便捷安装:`brew install mm7894215/tokentracker/tokentracker`。后续可以通过 `brew upgrade` 命令进行版本更新,该 Tap 仓库会在新版本发布后一小时内自动同步更新。 ❓ FAQ 摘要
本章节包含针对 TokenTracker 使用过程中可能遇到的常见问题及故障排除指南,帮助开发者快速解决环境配置或数据同步过程中的异常情况。
🎯 aiskill88 AI 点评
A 级
2026-05-20
专业的多AI平台成本管理工具,解决开发者关键痛点。JavaScript实现易于扩展,社区活跃度良好,实用价值高。 📚 实用指南(长尾问题)
适合谁
最佳实践
常见错误
部署方案
⚡ 核心功能
👥 适合谁
⭐ 最佳实践
⚠️ 常见错误
👥 适合人群🎯 使用场景
⚖️ 优点与不足✅ 优点
⚠️ 不足
⚠️ 使用须知
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。 建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。 📄 License 说明
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。 🔗 相关工具推荐📰 相关 AI 新闻
🍿 AI 圈相关吃瓜
🧩 你可能还需要
基于当前 Skill 的能力图谱,自动补全的工具组合
❓ 常见问题 FAQTokenTracker 是一款JavaScript开发的AI辅助工具。开源AI工作流:Track token usage across 16 AI agent CLIs — Claude Code, Codex, Cursor, Gemini, 。⭐500 · JavaScript 主要应用场景包括:AI代理成本管理、开发工作流优化、Token使用量统计。
💡 AI Skill Hub 点评
AI Skill Hub 点评:Token用量追踪器 的核心功能完整,质量优秀。对于自动化工程师和运维人员来说,这是一个值得纳入个人工具库的选择。建议先在非生产环境试用,再逐步推广。 🌐 原始信息
🔗 原始来源
🐙 GitHub 仓库 https://github.com/mm7894215/TokenTracker
🌐 官方网站 https://www.tokentracker.cc
收录时间:2026-05-20 · 更新时间:2026-05-30 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。 🤖 交给 Agent 安装 · Token用量追踪器选择 Agent 类型,复制安装指令后粘贴到对应客户端 claude skill install https://github.com/mm7894215/TokenTracker
|