Token Usage Dashboard 是 AI Skill Hub 本期精选AI工具之一。综合评分 7.5 分,整体质量较高。我们推荐使用将其纳入你的 AI 工具库,帮助提升工作效率。
Token Usage Dashboard是一款开源AI工具,提供了美观的可视化和分析功能,适用于LLM API的成本跟踪和监控。
Token Usage Dashboard 是一款基于 HTML 开发的开源工具,专注于 installable、analytics、cost-tracking 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
Token Usage Dashboard是一款开源AI工具,提供了美观的可视化和分析功能,适用于LLM API的成本跟踪和监控。
Token Usage Dashboard 是一款基于 HTML 开发的开源工具,专注于 installable、analytics、cost-tracking 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
# 克隆仓库 git clone https://github.com/JingbiaoMei/Tokdash cd Tokdash # 查看安装说明 cat README.md # 按 README 完成环境依赖安装后即可使用
# 查看帮助 tokdash --help # 基本运行 tokdash [options] <input> # 详细使用说明请查阅文档 # https://github.com/JingbiaoMei/Tokdash
# tokdash 配置说明 # 查看配置选项 tokdash --config-example > config.yml # 常见配置项 # output_dir: ./output # log_level: info # workers: 4 # 环境变量(覆盖配置文件) export TOKDASH_CONFIG="/path/to/config.yml"
<p align="center"> <a href="README.md">English</a> | <a href="README_CN.md">中文</a> </p>
<p align="center"> <a href="https://tokdash.github.io/"><img src="https://raw.githubusercontent.com/JingbiaoMei/tokdash/main/docs/assets/tokdash_logo_full.png" alt="Tokdash" width="420" /></a> </p>
<p align="center"> <b>Local token & cost dashboard for AI coding tools</b> </p>
<p align="center"> <a href="https://opencode.ai/" title="OpenCode"><img src="https://raw.githubusercontent.com/JingbiaoMei/Tokdash/main/docs/assets/agents/pills/opencode.png" alt="OpenCode" height="34"></a> <a href="https://openai.com/codex/" title="Codex"><img src="https://raw.githubusercontent.com/JingbiaoMei/Tokdash/main/docs/assets/agents/pills/codex.png" alt="Codex" height="34"></a> <a href="https://www.claude.com/product/claude-code" title="Claude Code"><img src="https://raw.githubusercontent.com/JingbiaoMei/Tokdash/main/docs/assets/agents/pills/claude.png" alt="Claude Code" height="34"></a> <a href="https://github.com/google-gemini/gemini-cli" title="Gemini CLI"><img src="https://raw.githubusercontent.com/JingbiaoMei/Tokdash/main/docs/assets/agents/pills/gemini.png" alt="Gemini CLI" height="34"></a> <a href="https://openclaw.ai/" title="OpenClaw"><img src="https://raw.githubusercontent.com/JingbiaoMei/Tokdash/main/docs/assets/agents/pills/openclaw.png" alt="OpenClaw" height="34"></a> <a href="https://github.com/MoonshotAI/kimi-cli" title="Kimi CLI"><img src="https://raw.githubusercontent.com/JingbiaoMei/Tokdash/main/docs/assets/agents/pills/kimi.png" alt="Kimi CLI" height="34"></a> <a href="https://pi.dev/" title="Pi"><img src="https://raw.githubusercontent.com/JingbiaoMei/Tokdash/main/docs/assets/agents/pills/pi.png" alt="Pi" height="34"></a> <a href="https://github.com/features/copilot" title="GitHub Copilot CLI"><img src="https://raw.githubusercontent.com/JingbiaoMei/Tokdash/main/docs/assets/agents/pills/copilot.png" alt="GitHub Copilot CLI" height="34"></a> <a href="https://hermes-agent.nousresearch.com/" title="Hermes"><img src="https://raw.githubusercontent.com/JingbiaoMei/Tokdash/main/docs/assets/agents/pills/hermes.png" alt="Hermes" height="34"></a> </p>
<p align="center"> <img src="https://img.shields.io/badge/FastAPI-009688?style=flat&logo=fastapi&logoColor=white" alt="FastAPI" /> <img src="https://img.shields.io/badge/Python-3.10+-3776AB?style=flat&logo=python&logoColor=white" alt="Python" /> <img src="https://img.shields.io/badge/License-MIT-green?style=flat" alt="License" /> <a href="https://tokdash.github.io/"><img src="https://img.shields.io/badge/Website-tokdash.github.io-1E40AF?style=flat&logo=githubpages&logoColor=white" alt="Website" /></a> <a href="https://tokdash.github.io/demo/"><img src="https://img.shields.io/badge/Live%20Demo-tokdash.github.io%2Fdemo-F59E0B?style=flat&logo=githubpages&logoColor=white" alt="Live Demo" /></a> </p>
<p align="center"> <b>Try it without installing → <a href="https://tokdash.github.io/demo/">tokdash.github.io/demo</a></b> </p>
<p align="center"> <a href="https://tokdash.github.io/demo/"> <img src="https://raw.githubusercontent.com/JingbiaoMei/Tokdash/main/docs/assets/demo.png" alt="Tokdash dashboard — click for live demo" width="900" /> </a> </p> <p align="center"> <a href="https://tokdash.github.io/demo/"> <img src="https://raw.githubusercontent.com/JingbiaoMei/Tokdash/main/docs/assets/demo-stats.png" alt="Tokdash stats & heatmap — click for live demo" width="900" /> </a> </p>
pip install tokdash
tokdash serve
Open: http://localhost:55423
A static demo of the current dashboard is hosted at tokdash.github.io/demo — no install required. (The project home page is tokdash.github.io.)
The demo runs the unmodified Tokdash frontend against an in-browser shim that returns deterministic, fully synthetic data. You can:
Source for the demo lives at tokdash/tokdash.github.io. Nothing is uploaded; nothing is read from your machine.
python3 main.py
./tokdash serve ```
Open: http://localhost:55423
If port conflicts: - python3 main.py --port <port> - ./tokdash serve --port <port>
If you want to access Tokdash from another device (recommended): - Tailscale Serve (private to your tailnet): tailscale serve 55423 - SSH port-forward: ssh -L 55423:127.0.0.1:55423 <user>@<host>
Binding to 0.0.0.0 is possible, but not recommended: it listens on all interfaces and can expose the dashboard beyond your LAN (VPN/Wi-Fi/etc.). Only do this if you understand the risk and have firewall/auth in place.
Tokdash is localhost-only by default.
TOKDASH_HOST (default: 127.0.0.1)TOKDASH_PORT (default: 55423)TOKDASH_CACHE_TTL (default: 120 seconds)TOKDASH_ALLOW_ORIGINS (comma-separated, default: empty)TOKDASH_ALLOW_ORIGIN_REGEX (default allows only localhost/127.0.0.1)Example (remote access via Tailscale Serve; recommended):
tokdash serve --bind 127.0.0.1 --port 55423
tailscale serve --bg 55423
By default tokdash serve opens the dashboard in your browser once on startup. Pass --no-open to disable this (it is also skipped automatically in headless/SSH environments and in the background service templates).
curl 'http://127.0.0.1:55423/api/usage?period=today'
View logs if needed:bash journalctl --user -u tokdash -f ```
Tokdash is a local HTTP server. Common endpoints:
GET /api/usage?period=today|week|month|NGET /api/usage?date_from=YYYY-MM-DD&date_to=YYYY-MM-DDGET /api/tools?period=... (coding tools only)GET /api/openclaw?period=... (OpenClaw only)GET /api/sessions?tool=codex|claude|opencode&period=...GET /api/stats (contribution calendar & statistics)Example:
curl 'http://127.0.0.1:55423/api/usage?period=today'
Full API reference: docs/API.md — schema, parameters, and response shapes for every endpoint.
pip install --upgrade tokdash
The local API can power a statusline item in your coding agent (Claude Code, etc.) showing live token/cost stats. Hand your agent this prompt:
"I would like to add a statusline item from the tokdash endpoint's API; it should show the total tokens used today."
Point it at docs/API.md for endpoint details and let it wire the rest.
<p align="center"> <img src="https://raw.githubusercontent.com/JingbiaoMei/Tokdash/main/docs/assets/demo-statusline.png" alt="Tokdash statusline integration example" width="900" /> </p>
Tokdash 是一个专为 AI 编程工具设计的本地 Token 与成本监控仪表盘。它能够帮助开发者实时追踪在使用 AI 辅助编程时的 Token 消耗情况及产生的费用,让 AI 使用成本变得透明、可控。
Tokdash 提供精确的 Token 统计功能,支持对 Input、Output 及 Cache Token 进行细粒度拆解。其特色功能包括:支持将实时 Token 使用指标集成到 Claude Code 等 Agent 的 Statusline 中;内置 Flatpickr 日期选择器,支持自定义日期范围查询;并提供直观的 Contribution calendar 视图,方便开发者回顾历史消耗。
运行 Tokdash 需要确保系统中已安装 Python 3.10 或更高版本。此外,您需要安装一个或多个受支持的客户端(Supported Clients)以确保数据能够正常采集。
您可以通过 pip 快速安装并启动服务。执行命令 `pip install tokdash tokdash serve` 后,即可通过浏览器访问 `http://localhost:55423`。安装完成后,服务将作为本地 HTTP 服务运行。
您可以直接通过 `python3 main.py` 运行程序,或者使用 CLI 封装命令 `./tokdash serve` 来启动服务器。如果遇到端口冲突,可以通过 `--port <port>` 参数指定其他端口。若需在其他设备上访问,推荐使用 Tailscale Serve 或 SSH port-forward 进行安全转发。
出于安全考虑,Tokdash 默认仅监听 localhost。您可以通过环境变量进行配置,例如 `TOKDASH_HOST`、`TOKDASH_PORT` 以及 `TOKDASH_CACHE_TTL`(缓存生存时间)。此外,您还可以通过 `TOKDASH_ALLOW_ORIGINS` 配置跨域访问权限,以适配不同的网络访问场景。
Tokdash 提供本地 HTTP API 接口,支持通过 GET 请求获取特定时间段(如 today, week, month)的使用量数据。开发者可以根据日期范围查询详细统计,并针对不同的工具(如 codex, claude, opencode)或 OpenClaw 进行数据过滤。您可以使用 curl 命令测试 API 是否响应正常。
您可以随时通过 `pip install --upgrade tokdash` 来升级软件包。对于高级用户,可以通过集成 Tokdash 的本地 API 到 Claude Code 等编程 Agent 的 Statusline 中,实现实时 Token 与成本统计的自动化展示。
Token Usage Dashboard是一款开源AI工具,提供了美观的可视化和分析功能,适用于LLM API的成本跟踪和监控。虽然该工具的功能有限,但它仍然是一个值得关注的项目。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
经综合评估,Token Usage Dashboard 在AI工具赛道中表现稳健,质量良好。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。
| 原始名称 | Tokdash |
| 原始描述 | 开源AI工具:📊 Token Usage Dashboard — Beautiful visualization and analytics for LLM API con。⭐15 · HTML |
| Topics | installableanalyticscost-trackingdashboard |
| GitHub | https://github.com/JingbiaoMei/Tokdash |
| License | MIT |
| 语言 | HTML |
收录时间:2026-06-01 · 更新时间:2026-06-01 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。