Skip to content

Repository files navigation

Infinity Token Tracker

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.


🌟 Key Benefits

  • 🔒 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 optimize to detect token bloat, repetitive file loads, and find opportunities to reclaim your budget.

⚡ Quick Start

Run it instantly without installing anything:

npx @aruninf/infinity-token-tracker

This launches the interactive terminal dashboard (TUI). Arrow keys change the period, and q quits.


📦 Installation

To make the infinity command permanently available:

1. Via NPM (Recommended)

npm install -g @aruninf/infinity-token-tracker

(Requires Node.js 22.13+)

2. Via Homebrew (macOS)

brew tap aruninf/tap
brew install infinity-token-tracker

3. Run directly with other package runners

# Using Bun
bunx @aruninf/infinity-token-tracker

# Using PNPM
pnpm dlx @aruninf/infinity-token-tracker

🚀 Usage Guide

Infinity Token Tracker offers four surfaces to monitor your AI spend:

1. Interactive Terminal Dashboard (TUI)

Run the bare command to inspect spend per project, model, and tool dynamically in your terminal:

infinity

2. Web Dashboard

Launch a local server and open the browser dashboard at http://127.0.0.1:4747:

infinity web

3. CLI Overview

Print 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 tool

4. Smart Optimization & Audits

Scan 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 rules

🖥️ Desktop Application (macOS, Windows & Linux)

For a fully-featured desktop experience containing timeline charts, context growth graphs, tool cost breakdown charts, and real-time alert widgets:

1. Download Pre-compiled Installers

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
  • 🪟 Windows: Download the Windows installer (.exe) to install the application locally.
  • 🐧 Linux: Download the .deb (Debian/Ubuntu), .rpm (RedHat/Fedora), or standalone .AppImage package.

2. Building from Source (For Developers)

If you want to build and run the desktop application from the source code:

  1. Clone this repository:
    git clone https://github.com/aruninf/infinity-token-tracker.git
    cd infinity-token-tracker
  2. Install dependencies:
    cd app
    npm install
  3. Run or package the application:
    # Run the local development environment
    npm run dev
    
    # Package executable for your current OS
    npm run package

🛠️ Supported Tools & Providers

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...

🔒 Privacy First

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.

About

A real-time desktop application to monitor AI token usage, costs, and model activity with actionable insights and optimization recommendations.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages