Skip to main content

English  |  中文  |  日本語  |  한국어  |  Español  |  Português

Tokdash

Local token & cost dashboard for AI coding tools

OpenCode Codex Claude Code Gemini CLI Antigravity OpenClaw Kimi CLI MiMo Code Grok Build Pi omp Kilo Code Cline GitHub Copilot CLI Hermes DeepSeek Harness Reasonix ZCode WorkBuddy Qoder IDE Qoder CLI Zed Qwen Code Crush Muse Code Freebuff MiniMax Code Devin CLI

FastAPI Python License Website Live Demo CI PyPI

Try it without installing → tokdash.github.io/demo

Table of Contents

Quick start

pipx install tokdash
tokdash setup

That's it. tokdash setup detects the runtime, installs a managed one if needed, registers a local service, and prints the dashboard URL — http://127.0.0.1:55423. Full options, first-run notes, and updates live in Install & run; prefer to look around first? The live demo runs on the real UI.

One package, four views

One local package, one local data index — and four ways to read it. Every surface parses the same session logs on your own machine, so the browser dashboard, the terminal, the menu bar, and your agent's statusline always agree.

View What it is Reach for it when
WebUI The full dashboard: Overview, Sessions, Stats, Report, Quota, Servers You want the whole picture, charts, and drill-down
TUI tokdash tui — Overview, Report and Quota in the terminal You live in the terminal and want the numbers without a browser
Companion Native menu-bar (macOS) / notification-area (Windows) app You want today's spend and quota visible all day, dashboard closed
Statusline A live token/cost item inside your agent's statusline You want the cost ticker exactly where you type

WebUI

The dashboard is a single page served by the local FastAPI app: exact input / cache / output token breakdowns, per-tool and per-model tables, a contribution heatmap, a week/month/year Report, per-provider Quota windows with reset countdowns, and a Servers tab that combines and compares several machines. Click any screenshot to open the live demo.

Overview
Tokdash overview dashboard - click for live demo
Usage Report
Tokdash usage report - click for live demo
Quota tracking
Tokdash quota tracking - click for live demo
Multiple servers, one total
Tokdash Servers tab comparing machines - click for live demo

Light and dark follow your OS appearance. The app ships 17 style themes, light/dark modes, PWA install, and six UI languages (English / 中文 / 日本語 / 한국어 / Español / Português).

Terminal dashboard (TUI)

Prefer to stay in the terminal? tokdash tui opens the Overview, Report, and Quota tabs without a browser, reading the same local index (and the shared on-disk database when a tokdash serve is running beside it).

TUI — Overview
tokdash tui Overview tab
TUI — Quota
tokdash tui Quota tab
tokdash tui
Keyboard
Key Action
q Quit
r Refresh the current tab
1 / 2 / 3 Switch to Overview / Report / Quota
t w m y a Jump to a period directly (both period tabs; t/a are Overview-only)
p Next time window (forward-only cycle)
[ / ] Step one whole calendar period back / forward — never into the future
0 Back to today
u Poll quota (Quota tab only)
? Help overlay with all keys
One-shot report CLI

For a one-shot report you can pipe or script:

tokdash report --period week

The period is a flag, not a positional argument. Accepted values: today (the default), week, month, year, all, a number of days, or Nd/Nw/Nm/Ny shorthand; week, month and year are the same calendar-aligned windows the web Report tab shows. tokdash report also accepts --json, --pretty and --output <file>, following the same conventions as tokdash export.

Companion status bar app

An optional native menu-bar app for macOS and notification-area app for Windows: a compact, read-only view of the Tokdash service without the dashboard open.

Tokdash Companion Status Bar App on macOS Tokdash Companion Status Bar App on Windows
macOS menu bar Windows notification area

Windows — Microsoft Store (recommended, signed by Microsoft, requires Windows 11):

Get Tokdash Companion from the Microsoft Store

Direct download — the latest companion release: a universal DMG (arm64 + x86_64, macOS 14+) and a self-contained portable ZIP (x64, Windows 11; Windows on Arm via x64 emulation).

What it shows, and how setup works
  • Today's cost, tokens, messages, and month-to-date usage
  • Combined totals and server-grouped quota from multiple Tokdash endpoints
  • Codex, Claude, Kimi, MiniMax, Antigravity, Grok, and Z.ai quota windows
  • Relative reset times and optional low-quota notifications
  • System language detection plus English, Simplified Chinese, Japanese, Korean, Spanish, and Portuguese
  • No telemetry, credential discovery, port scanning, or direct log parsing

Setup: run Tokdash 1.5.2 or newer (Install & run), install the companion, and it connects to http://127.0.0.1:55423 by default — its settings let you add, test, name, or remove explicit endpoints, including private Tailscale Serve URLs. The companion only contacts the endpoints you configure; low-quota notifications and launch at login are opt-in.

Checksum, update, and removal instructions live in the companion release guide.

Statusline

The local API can power a statusline item in your coding agent showing live token/cost stats:

Tokdash statusline integration example

Ready-made templates (bash and PowerShell), install/config, and the endpoint reference live in docs/guides/statusline/.

Install & run

Platform support

  • Linux (including WSL2): supported
  • macOS: supported
  • Windows (native): experimental

Prerequisites: Python 3.10+ and one or more supported clients.

Install

Recommended isolated install:

pipx install tokdash

If you do not use pipx:

python3 -m pip install --user tokdash

First run

Run the onboarding wizard:

tokdash setup

The wizard configures a reversible user-level background service when the platform supports one, then prints the dashboard URL (default: http://127.0.0.1:55423). If no supported service manager is available, it records setup state and prints foreground run guidance. It uses localhost-first defaults, does not require sudo for the local service, and keeps your usage history unless you later uninstall with --purge.

For a non-interactive setup from an agent, script, or bundle, run tokdash setup --auto --json; to preview what setup would change, tokdash setup --dry-run. To expose the dashboard explicitly on all network interfaces with writes disabled, run tokdash setup --bind 0.0.0.0; review the remote-access guide first.

Then check the install:

tokdash doctor

doctor checks the runtime, background service, configured port, data paths, and update-check status. Use tokdash doctor --json for automation.

Update or remove

tokdash update       # upgrade the managed runtime and restart the service when possible
tokdash uninstall    # reverse exactly what setup created; keeps usage history by default

update only drives install methods Tokdash can safely manage. If your runtime was installed by a package manager Tokdash does not own, it prints the exact manual guidance instead of mutating that environment.

Existing installs: migration from before v1.0

If you installed Tokdash before the onboarding flow, upgrade first:

pipx upgrade tokdash
# or: python3 -m pip install --user -U tokdash

Then run tokdash doctor and tokdash setup when you want Tokdash to manage the background service. If you already have a hand-written systemd or launchd service, setup does not silently replace it: it refuses unmarked tokdash.service / plist files by default. Keep managing that service yourself, remove it before setup, or run tokdash setup --force after checking tokdash setup --dry-run. --force also handles pre-1.0 services that already occupy port 55423 but do not expose the new /health fingerprint: it rewrites and restarts the existing tokdash.service. Use tokdash setup --no-service to skip service creation.

If your current setup uses a conda/system/user-pip interpreter and you want tokdash update to manage future upgrades, migrate the service to Tokdash's setup-owned venv:

# Upgrade the tokdash command you are about to run, for example:
python3 -m pip install --user -U tokdash
# or, for a conda base install:
conda run -n base python -m pip install -U tokdash
tokdash setup --runtime venv --force
tokdash doctor

This keeps your usage history under ~/.tokdash, rewrites the user service to run ~/.tokdash/runtime/python-venv/bin/python -m tokdash, and lets future tokdash update upgrade that managed venv and restart the service. If you installed with pipx, you can instead keep the pipx runtime and upgrade with tokdash update or pipx upgrade tokdash.

Foreground fallback

If you only want a one-off foreground process:

tokdash serve

Open http://127.0.0.1:55423. Use tokdash serve --port <port> if the default port is busy. By default tokdash serve opens the dashboard in your browser once on startup; pass --no-open to disable it. A bare tokdash with no command just prints the command help and exits — it no longer starts tokdash serve behind your back.

For full onboarding details — runtime choices, WSL/systemd behavior, macOS launchd, Tailscale, bundling, update checks, and safe uninstall semantics — see docs/guides/ONBOARDING.md. For remote access through Tailscale Serve, SSH forwarding, or an explicit network bind, see docs/guides/REMOTE_ACCESS.md.

Features

  • Exact token counts: Input/Output/Cache token breakdowns
  • Session explorer: per-session drill-down
  • Contribution calendar: 2D heatmap + 3D isometric view with Tokens/Cost/Messages metrics
  • Report tab: a week / month / year-to-date report of your own agent activity, with a shareable card for each tier of detail. Every export writes a light and a dark PNG
  • Quota tab: subscription window bars with reset countdowns for nine providers. Codex windows work out of the box from local logs; most other sources need opt-in live polling
  • Terminal dashboard [new]: tokdash tui — Overview, Report and Quota in the terminal, no browser required
  • Companion status bar app: spend and subscription quota from the macOS menu bar or Windows notification area — on the Microsoft Store for Windows
  • Statusline integration: a live token-usage indicator inside Claude Code's statusline (or any agent that can hit a local HTTP endpoint)
  • Multi-server views: add WSL, macOS, and other Tokdash servers in Settings; combine usage across any selection while keeping quota grouped by machine. See remote access.
  • Themes and app polish: 17 style themes, light/dark mode, PWA install support, UI in six languages

Supported clients

Tokdash reads the local session logs of 27 supported agents — the pill row above names them; the full matrix (usage & cost / Session Explorer coverage, per-client data paths, overrides, and source-specific accounting notes) is in Supported clients.

Quota tracking (optional)

The Quota tab shows subscription utilization windows and reset countdowns for nine providers. Codex's 5-hour/weekly windows work out of the box from local logs (treat them as an estimate); accurate Codex consumption and every other provider — Claude Code, Antigravity, MiniMax, Kimi Code, Grok, Z.ai, OpenCode Go, Command Code — come from opt-in live polling: Tokdash calls each provider's own quota endpoint with the sign-in your CLI already has. Off by default, per-provider consent, results kept in the local database.

The consent commands, master switch, poll cadence, and per-provider credential notes are in docs/reference/QUOTA.md.

Cost Accuracy Note

Token counts depend on what each client logs locally. Costs are computed from the bundled pricing database (src/tokdash/pricing_db.json) by default, or from your saved dashboard pricing override at <data_dir>/pricing_db.json when present. Either way they may lag real provider pricing — use as an estimate and verify against your billing source if it matters.

History retention

Tokdash reads each client's local session logs; the local SQLite index cannot recover logs deleted before they were indexed. Only two supported clients delete old sessions by default, and both are a one-line fix:

  • Claude Code: add { "cleanupPeriodDays": 3650 } to ~/.claude/settings.json (and any alternate CLAUDE_CONFIG_DIR).
  • Gemini CLI: set { "general": { "sessionRetention": { "enabled": false } } } in ~/.gemini/settings.json (workspace settings override user settings).

Every other supported client keeps history indefinitely by default. For the full per-client survey, fix details, and what the local SQLite index does and does not preserve, see docs/reference/HISTORY_RETENTION.md.

Roadmap

See docs/development/ROADMAP.md.

Contributing / security

  • Contributing guide: docs/CONTRIBUTING.md
  • Security policy: docs/SECURITY.md

Documentation

Full documentation lives in docs/ (start at the index), grouped into:

  • guides/ — task-oriented setup: onboarding, remote access, statusline, background service.
  • reference/ — lookup material: API reference, configuration, quota internals, supported clients, history retention.
  • development/ — changelog, releasing, roadmap, and public technical-notes/.

License

MIT License - see LICENSE.

Metadata

Release files for tokdash 2.6.18

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tokdash 2.6.18
File Size Uploaded
tokdash-2.6.18.tar.gz 2.8 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for tokdash 2.6.18
File Interpreter ABI Platform
tokdash-2.6.18-py3-none-any.whl Python 3 none any Details

Total release size: 4.7 MB

Release files / tokdash-2.6.18.tar.gz

Download URL tokdash-2.6.18.tar.gz
Size 2.8 MB
Tags Source
SHA-256 checksum
How to use checksums
80a76e7a90058cb5768aa1d99aec587133fe6a833af610ccd398f56cfb0aa263
BLAKE2b-256 checksum
How to use checksums
9e8eb7dc9dcbc4ca6529e097800c64155179f0cc990cad84c82f259b39556910
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.

Transparency log

Release files / tokdash-2.6.18-py3-none-any.whl

Download URL tokdash-2.6.18-py3-none-any.whl
Size 1.9 MB
Tags Python 3
SHA-256 checksum
How to use checksums
3a711fbc62ee7a5eb1f8a9d5aa0b291b6f6fa5381c16570d3d193aae8e3f91c2
BLAKE2b-256 checksum
How to use checksums
b4e4bae7d73d0da7274360948e911201978de11d65cf5a589617923503f8e661
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

2.6.18 This release

2 release files

2.6.17

2 release files

2.6.16

2 release files

2.6.15

2 release files

2.6.14

2 release files

2.6.13

2 release files

2.6.9

2 release files

2.6.8

2 release files

2.6.7

2 release files

2.6.6

2 release files

2.6.5

2 release files

2.6.4

2 release files

2.6.3

2 release files

2.6.2

2 release files

2.6.1

2 release files

2.6.0

2 release files

2.5.7

2 release files

2.5.6

2 release files

2.5.5

2 release files

2.5.4

2 release files

2.5.3

2 release files

2.5.2

2 release files

2.5.1

2 release files

2.5.0

2 release files

2.4.3

2 release files

2.4.2

2 release files

2.4.1

2 release files

2.4.0

2 release files

2.3.1

2 release files

2.3.0

2 release files

2.2.0

2 release files

2.1.0

2 release files

2.0.0

2 release files

1.9.0

2 release files

1.8.1

2 release files

1.8.0

2 release files

1.7.0

2 release files

1.6.4

2 release files

1.6.3

2 release files

1.6.2

2 release files

1.6.1

2 release files

1.6.0

2 release files

1.5.9

2 release files

1.5.8

2 release files

1.5.7

2 release files

1.5.6

2 release files

1.5.5

2 release files

1.5.4

2 release files

1.5.3

2 release files

1.5.2

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.5

2 release files

1.4.4

2 release files

1.4.3

2 release files

1.4.2

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.5

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.7

2 release files

0.5.6

2 release files

0.5.5

2 release files

0.5.4

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

0.0.13

2 release files

0.0.12

2 release files

0.0.11

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page