Tokonto — Data skill for Claude Code
本地 AI 用量账本:只读会话文件或数据库,汇总 token 用量并按模型、日期和时段估算费用.
How to install Tokonto
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open CaiJingLong/tokonto and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Tokonto does
本地 AI 用量账本:只读会话文件或数据库,汇总 token 用量并按模型、日期和时段估算费用。支持仪表盘、CLI 与脚本插件。Local AI usage ledger: read-only session files and databases, token analytics, time-aware cost estimates, dashboard, CLI and script providers.
Alternatives in Data
- Claude Code Usage Monitor — by Maciek-roboblog - A real-time terminal-based tool for monitoring Claude Code token usage 7k ★
- Token Dashboard — See where Claude Code is burning tokens - turn raw JSONL transcripts into local cost analytics, hotspot views 669 ★
- Query Token Info — Search tokens and fetch metadata, real-time market data, and K-Line candlestick charts by keyword or contract 483 ★
README
Tokonto
**简体中文** | [English](README.en.md)
本地运行、AI 优先的 token 用量与计费仪表盘。以只读方式读取各 AI 应用保存在本机的会话文件或数据库,汇总 token 用量,并按模型、日期和时段规则估算费用。支持用任意语言编写 Provider 脚本扩展来源。
项目截图
以下截图使用演示数据与示例路径,展示中文界面;用量和价格仅用于演示。
**用量概览**:查看 token 用量、费用趋势、缓存命中率,以及不同来源和模型的占比。

查看数据来源与计费规则截图**数据来源**:集中管理内置工具和脚本 Provider,查看同步状态。

**计费规则**:管理模型价格,配置日期、时段和缓存费率,并查看内置预设。

名字的由来
**Tokonto** 的命名灵感来自 **Token** 与德语 **Konto**(账户)的组合:取 Token 的 `Tok`,接上 Konto 的 `onto`,组成 Tokonto。它表达的是一本属于你的 **AI 用量账本**:把不同应用的 token 消耗汇集起来,按模型、日期和时段算清费用,让每一笔估算都能追溯。
项目名写作 **Tokonto**,包名与命令名使用小写 **`tokonto`**。
从 npm 安装
需要先安装 **Bun ≥ 1.3.14**([安装 Bun](https://bun.sh/docs/installation)),并将 Bun 加入 PATH。推荐:
bun install --global tokonto
tokonto --version
tokonto server --open
也可以使用 `npm install --global tokonto` 安装,运行时仍需要 Bun;仅有 Node.js 无法运行本工具。npm 包已包含编译后的 CLI、Dashboard 和 Skill,安装时不编译、不下载额外运行时。升级使用 `bun install --global tokonto@latest` 或 `npm install --global tokonto@latest`。
维护者配置自动发布请参考 [npm CI 指南](docs/npm-ci.md)。
从 GitHub Release 安装
需要 **Bun ≥ 1.3.14**([安装 Bun](https://bun.sh/docs/installation))。从仓库 Releases 下载 `tokonto-0.3.0.tar.gz` 和 `SHA256SUMS`,放在同一目录:
shasum -a 256 -c SHA256SUMS # Linux 可用 sha256sum -c SHA256SUMS
tar -xzf tokonto-0.3.0.tar.gz
cd tokonto-0.3.0
bun cli.js --version
bun cli.js server --open
无需安装项目依赖。发行包包含 CLI、Dashboard、Skill 和使用文档,运行仍需 Bun。使用 `bun link` 后可调用 `tokonto`;未链接时用 `bun /安装目录/cli.js` 代替本文中的命令。Bun 的 bin 目录需在 PATH 中。
从源码启动
需要 **Bun ≥ 1.3.14**。在项目目录运行:
bun install --frozen-lockfile
bun run cli -- init
bun run cli -- server --open
默认打开 **http://127.0.0.1:4318**,启动后自动采集,每 60 秒再次同步。使用 `--interval 0` 禁用自动采集,`--port 4320` 更换端口。`Ctrl+C` 停止。
本机 Bun 不在 PATH 时:
Related Skills
AIUsageMonitor
Read-only CLI/WPF analytics for Claude Code's local usage data — usage reports, model breakdowns, and cost est
Claudoscope
29 Native macOS menu bar app for Claude Code session analytics. Token/cost tracking, full-text search, real-ti
WhereMyTokens
new Windows system tray app for monitoring Claude Code token usage in real time. Per-session token counts, cos
Ccstats
Fast CLI for Claude Code and OpenAI Codex token/cost usage analytics
VibeCodingTracker
Track AI coding costs in real-time — a lightweight Rust CLI/TUI for Claude Code, Codex, Copilot & Gemini usage
Drachometer
A Claude Code hook that logs every turn and tool call to a local SQLite database, with a browser dashboard for
Related Agents
API Cost Scanner
Scans codebase for AI/API cost optimization opportunities including model usage, token estimates, caching stra
Financial Controller
Financial Controller for agent teams. Audits token usage, run duration, tool calls and efficiency across all d
Usage Scout
Read-only scout for session, token, and cost code in this FastAPI tracker. Use when the user asks where usage