heimoshuiyu

Local dashboard for tracking OpenCode token usage — Rust + React

10
1
100% credibility
Found Jun 01, 2026 at 10 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
TypeScript
AI Summary

OpenCode Token Dashboard is a local web application that reads usage data from your OpenCode installation (stored in a local SQLite database on your computer) and displays interactive charts showing your AI token consumption over time. It shows trends, breakdowns by model and provider, cache hit rates, and runs entirely on your machine without sending any data to external servers. The dashboard supports both Chinese and English, offers light and dark themes, and helps you visualize patterns in your AI usage.

How It Works

1
💬 You hear about OpenCode

A friend tells you about OpenCode, an AI coding assistant that lives on your computer. You start using it daily.

2
📊 Curiosity strikes

After a few weeks, you wonder how much you're actually spending on AI tokens. You find this dashboard project that reads your local data.

3
🛠️ You set up the dashboard

You clone the project, install dependencies with one command, and launch it. Your browser opens automatically to the local dashboard.

4
You explore your usage
📈
You spot a trend

You notice your usage spikes on certain days. The charts reveal patterns you never saw before.

🥧
You check what models you use most

A colorful chart shows you which AI models consume most of your tokens, helping you make better choices.

5
🌓 You personalize your view

You switch between light and dark mode to suit your preference, and toggle between Chinese and English with a single click.

You understand your spending

The dashboard reveals your token usage patterns, helping you become more mindful about how you use AI assistants.

Sign up to see the full architecture

4 more

Sign Up Free

Star Growth

See how this repo grew from 10 to 10 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is opencode-token-dashboard?

A local web dashboard that reads OpenCode's SQLite database and visualizes your AI token consumption over time. The Rust backend serves a React frontend, and the final build is a single binary with the UI bundled inside — no Node runtime needed in production. It displays trend charts, token composition breakdowns, model rankings, provider distribution, and cache hit rates across configurable time windows from 7 days to all-time.

Why is it gaining traction?

Most token tracking tools are cloud services with pricing tiers or third-party integrations. This project keeps everything local — your data never leaves your machine, and the single binary deployment means zero infrastructure overhead. The feature set is comprehensive for its niche: hourly granularity on recent data, deduped runtime tracking (merging overlapping sessions), and support for all major token types including reasoning and cache read/write. The i18n support (Chinese/English) makes it accessible beyond English-only tooling.

Who should use this?

Developers using OpenCode who want visibility into their spending patterns without exposing data to external services. Teams optimizing prompt engineering and model selection benefit most from the model breakdown and provider distribution views. Individual devs who prefer local-first tooling over SaaS dashboards will appreciate the zero-dependency deployment model.

Verdict

For OpenCode users seeking a self-hosted token dashboard, this is a polished, well-architected solution. The credibility score of 1.0% and 10 stars reflect a new, niche project — the implementation quality (Rust backend, comprehensive test suite, clean React structure) suggests long-term viability, but early adopters should expect rapid API changes. Worth installing if you want granular usage insights without cloud dependencies.

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.