AI News HubLIVE
In-site rewrite3 min read

TokenBBQ – track AI coding token usage across Claude, Codex, Gemini

TokenBBQ reads local usage data from Claude Code, Codex, Gemini, OpenCode, Amp, and Pi-Agent and displays it in a single dashboard. No install, no config, no API keys. Includes CLI and a desktop widget (Windows/macOS). All data stays on your machine.

SourceHacker News AIAuthor: TokenBBQ

Notifications You must be signed in to change notification settings

Fork 2

Star 8

BranchesTags

Open more actions menu

Folders and files

NameName

Last commit message

Last commit date

Latest commit

History

52 Commits

52 Commits

.github

.github

docs

docs

scripts

scripts

src

src

widget

widget

.gitignore

.gitignore

AUDIT.md

AUDIT.md

CHANGELOG.md

CHANGELOG.md

CODE_OF_CONDUCT.md

CODE_OF_CONDUCT.md

CONTRIBUTING.md

CONTRIBUTING.md

LICENSE

LICENSE

README.md

README.md

package-lock.json

package-lock.json

package.json

package.json

tsconfig.json

tsconfig.json

tsdown.config.ts

tsdown.config.ts

Repository files navigation

🌐 offbyone.cloud — Homepage

See what your AI coding tools actually cost you. TokenBBQ reads local usage data from Claude Code, Codex, Gemini, OpenCode, Amp, and Pi-Agent and shows it all in one dashboard.

Quick Start

npx tokenbbq@latest

No install, no config, no API keys. Opens a dashboard in your browser at localhost:3000.

Dashboard Features

Daily cost timeline — stacked bar chart by provider

Cost breakdown — donut chart showing spend per tool

Top models — ranked by total cost

Monthly trend — line chart of spending over time

Activity heatmap — GitHub-style, last 90 days

Detailed daily table — expandable rows with per-source and per-model breakdowns

Light / Dark mode — toggle with persistent preference

Time filter — 7 / 30 / 90 / 180 / 365 days or all time

Sortable columns — click any table header to sort

Live auto-refresh — dashboard updates every 5 seconds

Supported Tools

Tool Data Location Format

Claude Code ~/.claude/projects/**/*.jsonl JSONL

Codex ~/.codex/sessions/**/*.jsonl JSONL

Gemini ~/.gemini/tmp/**/chats/session-*.json JSON

OpenCode ~/.local/share/opencode/ JSON + SQLite

Amp ~/.local/share/amp/threads/**/*.json JSON

Pi-Agent ~/.pi/agent/sessions/**/*.jsonl JSONL

On Windows, ~ resolves to C:\Users\. Claude Code, Codex, and Gemini use the same paths cross-platform. OpenCode, Amp, and Pi-Agent default to Linux/macOS paths — set GEMINI_DIR, OPENCODE_DATA_DIR, AMP_DATA_DIR, or PI_AGENT_DIR environment variables to override.

CLI

npx tokenbbq # Dashboard in browser (default) npx tokenbbq daily # Daily table in terminal npx tokenbbq monthly # Monthly table in terminal npx tokenbbq summary # Compact summary npx tokenbbq scan # DashboardData JSON to stdout (headless one-shot) npx tokenbbq --json # JSON to stdout npx tokenbbq --port=8080 # Custom port npx tokenbbq --no-open # Don't auto-open browser npx tokenbbq --help # Show help

Desktop Widget (Windows + macOS)

An always-on-top pill that lives at the top of your screen and shows your claude.ai 5-hour and 7-day window utilisation alongside today's local AI tool token spend, with a one-click expand to a per-source breakdown and a "Open full dashboard" button that launches the same dashboard npx tokenbbq opens.

Download the latest release: github.com/offbyone1/tokenbbq/releases/latest

Platform File

Windows TokenBBQx64-setup.exe (NSIS, recommended) or TokenBBQx64_en-US.msi

macOS (Apple Silicon, M1+) TokenBBQ__aarch64.dmg

The macOS build is unsigned, so on first launch Gatekeeper will refuse to open it — right-click the app → Open → Open in the dialog to bypass once. Same story on Windows: SmartScreen will warn → More info → Run anyway.

The widget bundles the TokenBBQ CLI as a standalone binary, so end users don't need Node.js.

Building the widget locally

npm install npm install --prefix widget # one-time npm run widget:dev # hot-reloading dev build npm run widget:build # produces installers under widget/src-tauri/target/release/bundle/

widget:build requires Bun on PATH (used to compile the CLI to a standalone sidecar). widget:dev falls back to a Node-based sidecar if Bun is missing.

How It Works

Scans your filesystem for known AI tool data directories

Parses JSONL / JSON / SQLite files to extract token usage events

Fetches current model pricing from LiteLLM (with offline fallback)

Calculates costs and aggregates by day, month, source, and model

Serves an interactive dashboard on localhost

All data stays on your machine. The only network request is fetching model prices.

Credits

TokenBBQ builds on the data-loading patterns from ccusage by @ryoppippi. Thanks for the excellent groundwork on parsing Claude Code, Codex, OpenCode, Amp, and Pi-Agent usage data.

Contributing

See CONTRIBUTING.md for development setup and how to add support for new tools.

Support

Buy me a Token:

License

MIT © offbyone1

About

Visualize token usage and costs across all major AI coding tools

offbyone.cloud

Topics

cli

typescript

ai

dashboard

amp

opencode

developer-tools

codex

llm

token-usage

cost-tracking

claude-code

coding-agent

Resources

Readme

License

MIT license

Code of conduct

Code of conduct

Contributing

Contributing

Uh oh!

There was an error while loading. Please reload this page.

Activity

Stars

8 stars

Watchers

0 watching

Forks

2 forks

Report repository

Releases 13

v0.6.0

Latest

May 8, 2026

+ 12 releases

Packages 0

Uh oh!

There was an error while loading. Please reload this page.

Contributors

Uh oh!

There was an error while loading. Please reload this page.

Languages

TypeScript 77.4%

Rust 10.1%

CSS 8.0%

HTML 2.5%

JavaScript 2.0%