crwdla/tokentab
A CLI that reads Claude Code, Codex, and Gemini CLI session logs and works out how much they cost, by model, project, and day.
What it solves
Tokentab provides a way to track and analyze token usage and costs across different AI coding tools. It solves the problem of fragmented logging, where tools like Claude Code, Codex, and Gemini CLI leave session logs on disk but don't provide a unified, easy-to-read summary of how much money is being spent on different models and projects.
How it works
The tool reads local session logs from the file system (e.g., ~/.claude/projects/ or ~/.gemini/tmp/) and aggregates the token counts recorded by those tools. It uses a local, hand-kept pricing table to calculate costs in dollars per million tokens, using fuzzy matching to identify models. It does not require an API key or account, and all processing happens entirely locally on the machine.
Who it’s for
Developers who use multiple AI coding assistants and want a unified, local-first approach to monitoring their token spend and usage patterns across projects and days.
Highlights
- Local-first privacy: No data leaves the machine, no API keys required, and the web dashboard doesn't even use external CDNs.
- Multi-tool support: Out-of-the-box support for Claude Code, Codex, and Gemini CLI, with a modular provider system for adding new tools.
- Unified Dashboard: Offers both a CLI and a web-based dashboard (built on Python's standard library) for visualizing costs and usage.
- Detailed Breakdown: Breaks down usage by model, project, day, and estimated activity type (e.g., coding, debugging, refactoring).
- Zero-dependency server: The web dashboard uses Python's standard-library HTTP server, requiring only
richas a third-party dependency for the CLI.
Related
- Project
- Project
- Project
- Project