See where your AI spend goes — locally, instantly.
Infinity Token Tracker is a free, open-source, local-first analytics tool that tracks token usage and costs from AI coding environments (Claude Code, Cursor, GitHub Copilot, Gemini, Grok, and more). It reads log files locally on your disk, meaning no credentials or API keys ever leave your machine.
- 🔒 100% Private & Local-First: No proxies, wrappers, or external API keys required. Your source code, prompts, and credentials never leave your machine.
- 🔌 Auto-detects 36+ Integrations: Seamlessly parses logs from Claude Code, Cursor, GitHub Copilot, Cline/Roo-Code, Devin, Zed, and more.
- 💰 Accurate Cost Calculations: Factors in input, output, and context cache read/write rates (such as prompt caching) using up-to-date pricing snap-updates from LiteLLM.
- ⚡ Fast & Lightweight: Uses incremental caching and file modification tracking so it only reads new or updated logs, delivering instant page loads.
- 📈 Multiple Interfaces: Choose between a Terminal TUI, Web Dashboard, macOS Menubar App, or a feature-rich Desktop Application.
- 🔍 Smart Cost Audits: Scan your history with
infinity optimizeto detect token bloat, repetitive file loads, and find opportunities to reclaim your budget.
Run it instantly without installing anything:
npx @aruninf/infinity-token-trackerThis launches the interactive terminal dashboard (TUI). Arrow keys change the period, and q quits.
To make the infinity command permanently available:
npm install -g @aruninf/infinity-token-tracker(Requires Node.js 22.13+)
brew tap aruninf/tap
brew install infinity-token-tracker# Using Bun
bunx @aruninf/infinity-token-tracker
# Using PNPM
pnpm dlx @aruninf/infinity-token-trackerInfinity Token Tracker offers four surfaces to monitor your AI spend:
Run the bare command to inspect spend per project, model, and tool dynamically in your terminal:
infinityLaunch a local server and open the browser dashboard at http://127.0.0.1:4747:
infinity webPrint a clean, copy-pasteable text summary of your spend:
infinity overview # This month
infinity overview --from 2026-06-01 --to 2026-06-15 # Specific range
infinity overview --provider claude # Filter to one toolScan your log traces for token bloat, repetitive file loads, and find where you can reclaim budget:
infinity optimize # Check last 30 days for waste patterns
infinity optimize --apply # Apply automated context optimization rulesFor a fully-featured desktop experience containing timeline charts, context growth graphs, tool cost breakdown charts, and real-time alert widgets:
Go to the GitHub Releases page to download the installer for your platform:
- 🍎 macOS: Download the Apple Silicon (
-arm64.dmg) or Intel (.dmg) disk image. Mount and drag it to your Applications folder.- You can also run the menu bar app using:
infinity menubar
- You can also run the menu bar app using:
- 🪟 Windows: Download the Windows installer (
.exe) to install the application locally. - 🐧 Linux: Download the
.deb(Debian/Ubuntu),.rpm(RedHat/Fedora), or standalone.AppImagepackage.
If you want to build and run the desktop application from the source code:
- Clone this repository:
git clone https://github.com/aruninf/infinity-token-tracker.git cd infinity-token-tracker - Install dependencies:
cd app npm install - Run or package the application:
# Run the local development environment npm run dev # Package executable for your current OS npm run package
Infinity Token Tracker automatically auto-detects and extracts usage from 36+ integrations, including:
- Claude CLI (Claude Code)
- Cursor (state.vscdb Global DB)
- GitHub Copilot
- Cline / Roo-Code
- Devin
- Zed
- and many more...
Everything runs on your computer. It reads local trace directories and session logs (e.g. ~/.claude/sessions/ or Cursor databases) and uses pricing data cached locally. Your code, prompts, and tokens never touch third-party servers.