Sign inSign up

mo2g/token-insight

By mo2g

Updated 5 months ago

Local-first multi-source token usage dashboard for Cursor, Claude, Gemini, Codex, and more.

Image
Developer tools
Monitoring & observability
Web analytics
0

1.5K

mo2g/token-insight repository overview

Token Insight

Docker Hub GitHub Repo

Token Insight is a local-first token usage analytics stack for AI coding tools.

It scans local artifacts, normalizes usage events, stores them in SQLite, and serves a polished dashboard with deep filtering, trend analysis, source breakdowns, and social share cards.

Token Insight preview

Why use Token Insight

  • Local-first by default, with no mandatory cloud upload
  • Multi-source ingestion across AI coding tools
  • Clean dashboard for trends, model usage, sources, projects, and cost estimates
  • SQLite-backed storage for easy inspection and portability
  • Docker-friendly deployment for quick local setup

Supported sources

Token Insight can aggregate usage artifacts from tools such as:

  • Codex
  • Claude
  • Gemini
  • Cursor
  • LiteLLM

More adapters can be added over time.

Quick start

Run the container:

docker run --rm -p 8787:8787 \
  -v $HOME:/host-home:ro \
  -e TOKEN_INSIGHT_HOME=/host-home \
  -e TOKEN_INSIGHT_SOURCE_ROOT_LITELLM=/host-home/.litellm \
  mo2g/token-insight:latest

Then open:

http://localhost:8787

Docker Compose

docker compose up --build

Default port:

8787

Important paths and environment variables

The container mounts your home directory as read-only at:

/host-home

Common environment variables:

  • TOKEN_INSIGHT_HOME=/host-home
  • TOKEN_INSIGHT_SOURCE_ROOT_LITELLM=/host-home/.litellm
  • TOKEN_INSIGHT_DATA_DIR=/var/lib/token-insight/data
  • TOKEN_INSIGHT_CACHE_DIR=/var/lib/token-insight/cache

Override source roots if your local artifacts live elsewhere.

What you get

  • Usage trends over time
  • Model and provider breakdowns
  • Source health and ingestion status
  • Project-level analysis
  • Exportable normalized datasets
  • Shareable social images

Image tags

Recommended tags:

  • latest
  • versioned tags such as 0.1.0

For production-style usage, prefer a versioned tag.

Notes

  • The app runs locally by default
  • Missing source paths are skipped automatically
  • Cost estimation uses built-in pricing data and can refresh remote pricing when network is available

Tag summary

Content type

Image

Digest

sha256:fc5402309

Size

7 MB

Last updated

5 months ago

docker pull mo2g/token-insight