tokenbbq

agent
Guvenlik Denetimi
Basarisiz
Health Uyari
  • License — License: MIT
  • Description — Repository has a description
  • Active repo — Last push 0 days ago
  • Low visibility — Only 8 GitHub stars
Code Basarisiz
  • fs module — File system access in package.json
  • execSync — Synchronous shell command execution in scripts/build-sidecar.mjs
  • exec() — Shell command execution in scripts/build-sidecar.mjs
  • process.env — Environment variable access in scripts/build-sidecar.mjs
  • network request — Outbound network request in src/dashboard.ts
Permissions Gecti
  • Permissions — No dangerous permissions requested

Bu listing icin henuz AI raporu yok.

SUMMARY

Visualize token usage and costs across all major AI coding tools

README.md

TokenBBQ

npm version
License: MIT

🌐 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\<name>. 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 TokenBBQ_<version>_x64-setup.exe (NSIS, recommended) or TokenBBQ_<version>_x64_en-US.msi
macOS (Apple Silicon, M1+) TokenBBQ_<version>_aarch64.dmg

The macOS build is unsigned, so on first launch Gatekeeper will refuse to open it — right-click the app → OpenOpen in the dialog to bypass once. Same story on Windows: SmartScreen will warn → More infoRun 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

  1. Scans your filesystem for known AI tool data directories
  2. Parses JSONL / JSON / SQLite files to extract token usage events
  3. Fetches current model pricing from LiteLLM (with offline fallback)
  4. Calculates costs and aggregates by day, month, source, and model
  5. 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:

ko-fi

License

MIT © offbyone1

Yorumlar (0)

Sonuc bulunamadi