Token Usage
Description
Local LLM token usage analytics for Claude, Codex, OpenCode, ZCode, WorkBuddy, and Zhipu-AutoClaw — build your own multi-dimensional reports without SQL; CLI and daemon for macOS and Windows. — 本地 LLM token 用量分析工具,支持 Claude、Codex、OpenCode、ZCode、WorkBuddy、Zhipu-AutoClaw——无需 SQL 打造自定义多维报表;提供 CLI 与守护进程,支持 macOS 与 Windows。
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
README
token-usage
[简体中文](README.zh-CN.md) | English
A local LLM usage analytics tool for collecting, analyzing, and querying token usage across AI clients — and for turning that data into your own multi-dimensional usage reports, no SQL required.
Features
- Message/API-request-level accounting: each actual model invocation is stored independently instead of aggregating tokens by session.
- Accurate attribution across dates and models: messages that span dates, sessions that use multiple models, and forks/branches are neither missed nor double-counted.
- Preserves actual rewind consumption: completed calls before a rewind and new calls after it are kept separately rather than deduplicated.
- Codex rollout replay deduplication: replayed complete token snapshots caused by rate-limit bucket changes are not counted twice, while legitimate resets and multi-turn calls are retained.
- Multiple data sources: Claude Code/Desktop, OpenCode, Codex, WorkBuddy, ZCode, and Zhipu-AutoClaw.
- CC Switch router attribution: backfills the actual provider/model from CC-Switch proxy logs (currently effective only for the Claude family).
- Build your own usage reports — no SQL required: combine
client,model,provider, andprojectinto named multi-dimensional views; compose built-in and custom views into reusable, ordered report groups; set a personal default and run it by name. The guided configuration TUI andquery listmake those views discoverable and easy to maintain. - Two run modes: one-off CLI commands and a real-time monitoring daemon with nginx-style background startup.
- Autostart: macOS launchd and the Windows Registry, configurable through the config TUI or
config set. - Opt-in configuration: every client is disabled by default; enable only the ones you use, while data-source paths fall back to ready-to-use defaults.
- Single-binary distribution: built with Go and pure-Go SQLite (no CGO), with macOS and Windows supp
Related Skills
mcp-server-postgres
Read-only PostgreSQL database access.
Data mcp-server-sqlite
SQLite database interaction and querying.
Data mcp-server-google-maps
Google Maps integration for location data.
Data Bitbucket Data Center
---
Data Private Gpt
Complete API layer for private AI applications on local models: RAG, skills, tools, MCP, text-to-sql, and more
Data Csv Data Summarizer
Automatically analyze CSV files and generate comprehensive insights with visualizations
Data