Back to browse
GitHub Repository

Ultra-fast token & cost tracker for LLM Token Usage (e.g. Claude Code)

159 starsRust

Track your Codex CLI(5.3) token spending (also Claude Code and Gemini)

by mag123c·Feb 23, 2026·1 point·0 comments

AI Analysis

●●SolidSolve My ProblemSlickShip It

Fast cost tracker for Claude Code, but the market is crowded and niche.

Strengths
  • SIMD-JSON + parallel processing delivers 1000x speedup on large datasets (3.5GB scanned in 40ms).
  • Persistent cache survives Claude Code's 30-day session deletion, preserving cost history.
  • Unified dashboard across three AI CLIs reduces friction for multi-tool users.
Weaknesses
  • Solves a pain point for a narrow subset of users actively tracking multiple AI CLI costs.
  • No evidence of demand; existing tools (Anthropic dashboards, manual tracking) already handle this.
Target Audience

AI CLI users (Claude Code, Codex CLI, Gemini CLI) who want cost tracking and history preservation.

Similar To

Anthropic's built-in cost tracking in Claude Code · Manual cost tracking via API usage dashboards

Post Description

I've been tracking my AI CLI spending across Claude Code, Codex CLI, and Gemini CLI. Existing tools either don't support Codex at all or break on newer models like gpt-5.3-codex.

So I built toktrack. One command

npx toktrack

What you get: - Per-model cost breakdown (gpt-5.3-codex, Opus, Sonnet, Gemini, etc.) - Daily/weekly/monthly trends - 52-week heatmap - Works across all three major AI CLIs

Built in Rust with simd-json. Scans 3500+, 4GB+ session files in ~40ms.

It also caches independently, so even after Claude Code deletes sessions (default 30 days), your cost history is preserved.

GitHub: https://github.com/mag123c/toktrack

MIT licensed.

Similar Projects

Developer Tools●●Solid

Ledger – Claude Code Token Spend Analyzer

Local SQLite ledger captures runaway Claude Code sessions before the bill shocks you.

Solve My ProblemCozy
tsv650
301mo ago