Claude Code usage
Toktrack
Ultra-fast token & cost tracker for LLM Token Usage (e.g. Claude Code)
Install
npx toktrackFound in the project README. Check it for setup steps after installing.
git clone https://github.com/mag123c/toktrack.gitFrom the README
English | 한국어 ⚠️ Did you know? Claude Code deletes your session data after 30 days by default. Once deleted, your token usage and cost history are gone forever — unless you preserve them. The token & cost tracker that never loses your history. Most tools re-read your CLI's session files on every run — so when Claude Code deletes them after 30 days, your cost history goes with them. toktrack keeps a persistent cache, so your history survives. Track usage across all your AI coding CLIs — Claude Code, GitHub Copilot CLI, Codex CLI, Gemini CLI, Qwen Code, OpenCode, PI Agent, Antigravity, and Grok CLI — in one dashboard. Built in Rust, so it stays fast even on huge histories (simd-json + rayon). Why toktrack? Features - Data Preservation — Persistent cache keeps your cost history even after a CLI deletes its own session files - Multi-CLI Support — Claude Code, GitHub Copilot CLI, Codex CLI, Gemini CLI, Qwen Code, OpenCode, PI Agent, Antigravity, Grok CLI in one place - TUI Dashboard — 5 tabs (Overview, Stats, Models, Projects, Audit) with daily/weekly/monthly views - Per-Project Breakdown — the Projects tab shows token & cost usage per project (the session working directory), for CLIs that record one. Drill into any project for its day-by-day, per-model breakdown. Usage from CLIs that don't record a project is grouped under (no project). Press * on a project to star it as a root folder: every project under it folds into its row (saved to ~/.toktrack/config.toml as project_roots). Sessions in a git worktree fold into the root of their main repository, even after the worktree is deleted (links are kept in ~/.toktrack/cache/worktree_links.json). Worktrees are matched through their .git link, so this works for any tool. The one tool-specific exception: a T3 Code worktree…
Details
- Repository
- mag123c/toktrack
- Website
- www.npmjs.com/package/toktrack
- Language
- Rust
- License
- MIT
- Last updated
- 3 November 2026
- Topics
- ai-billingai-codingai-costai-toolsanthropicclaude-codeclicodex-clicost-monitorcost-trackingdeveloper-toolsgemini-cli
- Listed in
- awesome-claude-code
FAQ
What is Toktrack?
Ultra-fast token & cost tracker for LLM Token Usage (e.g. Claude Code) It is a usage for Claude Code, from mag123c/toktrack on GitHub.
How do I install Toktrack?
Run npx toktrack, then follow the setup in the README.
Is Toktrack popular?
mag123c/toktrack has 197 GitHub stars and 22 forks, and is included in 1 curated Claude Code list. It was last updated on 3 November 2026.
More usage & cost trackers
Claude Esp
157phiat/claude-esp
Stream Claude Code's hidden output (thinking, tool calls, subagents) to a separate terminal in real-time
Claude Code Leaderboard
189grp06/claude-code-leaderboard
(189 ⭐ This CLI automatically monitors your token usage and posts your stats to the leaderboard after each Claude Code session.
claudetop
212liorwn/claudetop
htop for Claude Code sessions showing real-time cost, cache efficiency and alerts.
Claude Codex Usage Dashboard
173frankchiu-dev/claude-codex-usage-dashboard
A local Windows dashboard for Claude Code and Codex usage limits.
Viberank
121sculptdotfun/viberank
Public leaderboard of AI coding usage built from ccusage data.
Loongsuite Pilot
237alibaba/loongsuite-pilot
Local-first telemetry collector for AI coding agents — unified OpenTelemetry events for Claude Code, Codex, Cursor and more. Token usage, cost, traces and security audit, exported anywhere.
Browse the most popular Claude Code mods, all usage & cost trackers, or the skills and MCP server directories.