Token Meter:本地优先的开源编码智能体 token 用量追踪工具
Token Meter
开源工具 Token Meter 可追踪 Claude、Codex、Cursor、OpenCode、Kiro、Pi 等编码智能体的 token 用量、预估成本、上下文与执行情况,数据全部留在本地。它通过 git clone 安装,需 Python 3.8+,仪表盘在 127.0.0.1 提供服务,只读本地 trace 与数据库,不上传任何分析或遥测数据。
Local-first / Open source
Optimise your coding agents.
Track token usage, estimated cost, context, and execution across every run.
ClaudeCodexCursorOpenCodeKiroPi
START / 01 Install locally
$
git clone https://github.com/splunk/token-meter.git
./token-meter/scripts/installRequires Python 3.8+ · Xcode Command Line Tools · curl
Then open http://127.0.0.1:8722
No administrator access required.
01 / Product signal
Every run leaves a signal.
Read the cost. See the work.
Live runs and historical patterns stay connected to the evidence behind them. Costs and selected token values can be estimates; coverage stays visible.
This is the companion rebuilt for the web—not a screenshot. The native hierarchy stays intact while the presentation responds to the page.
02 / Signal ledger
What becomes visible.
Not another score. A legible record for deciding when to continue, intervene, or investigate.
01
Live runs
Cost, context pressure, token shape, timing, and execution in one current-session view.
COST / CONTEXT / TIME
02
History
Compare sessions, runtimes, projects, and calendar days without flattening missing evidence into zero.
RUN / DAY / PROJECT
03
Models
Inspect output per covered dollar, reasoning ratio, and context load with coverage beside the result.
OUTPUT / COVERED $
04
Execution
Understand tool calls, failures, repeats, and skill evidence without publishing the work itself.
TOOLS / REPEATS / SKILLS
03 / Efficiency field
Efficiency, with the evidence beside it.
Compare four signals across covered, comparable work. Token Meter keeps the limits attached, so a missing value never becomes a score.
How Token Meter reads efficiency
EF / 01
Output / covered $
Reported output tokens per covered dollar. Higher across comparable work means more response output for the covered spend.
HigherComparable work
EF / 02
Reasoning ratio
Reported reasoning tokens as a share of output. Lower or stable is usually better for comparable work; difficult work may need more.
ContextDifficulty matters
EF / 03
Context load
Processed input tokens per output token. Lower means less context carried into each response.
LowerUsually better
EF / 04
Cache hit ratio
Cache-read tokens as a share of cache-covered input. Higher means more context is served from the prompt cache.
HigherUsually better
01No universal score
Read movement over time, not a single grade.
02Coverage remains visible
Unavailable evidence stays unavailable.
03Local estimates
Costs and selected token values can be estimates.
Open source from
Signals, not verdicts.
04 / Local boundary
The evidence stays where the work happened.
Token Meter reads supported local stores and serves the dashboard on 127.0.0.1. It is not a hosted analytics service.
01Read-only inputs
Supported local traces and databases are read, never rewritten.
02Bounded output
No prompt or response content appears in the dashboard, native companion, or bounded MCP projections.
03No hosted plane
No API keys for trace analysis. No Token Meter analytics or telemetry leaves your machine.
05 / Start measuring
Your agents are already producing the evidence.
Make it useful. Keep it local.
来源:Hacker News · splunk.github.io