一个高性能的 CLI 工具和可视化仪表盘,用于跟踪多个 AI 编码代理间的令牌使用情况和成本。
https://github.com/junhoyeo/tokscale
Tokscale 可以读取本机上各种LLM的数据文件,帮助你您监控和分析来自以下领域的token消费
安装方法
# Run directly with npx
npx tokscale@latest
# Or use bunx
bunx tokscale@latest
# Light mode (table rendering only)
npx tokscale@latest --light基本使用方法
# Launch interactive TUI (default)
tokscale
# Launch TUI with specific tab
tokscale models # Models tab
tokscale monthly # Daily view (shows daily breakdown)
# Use legacy CLI table output
tokscale --light
tokscale models --light
# Launch TUI explicitly
tokscale tui
# Export contribution graph data as JSON
tokscale graph --output data.json
# Output data as JSON (for scripting/automation)
tokscale --json # Default models view as JSON
tokscale models --json # Models breakdown as JSON
tokscale monthly --json # Monthly breakdown as JSON
tokscale models --json > report.json # Save to file# Show only OpenCode usage
tokscale --opencode
# Show only Claude Code usage
tokscale --claude
# Show only Codex CLI usage
tokscale --codex
# Show only Gemini CLI usage
tokscale --gemini
# Show only Cursor IDE usage (requires `tokscale cursor login` first)
tokscale --cursor
# Show only Amp usage
tokscale --amp
# Show only Droid usage
tokscale --droid
# Show only OpenClaw usage
tokscale --openclaw
# Show only Pi usage
tokscale --pi
# Show only Kimi CLI usage
tokscale --kimi
# Show only Qwen CLI usage
tokscale --qwen
# Show only Roo Code usage
tokscale --roocode
# Show only Kilo usage
tokscale --kilocode
# Show only Mux usage
tokscale --mux
# Show only Synthetic (synthetic.new) usage
tokscale --synthetic
# Combine filters
tokscale --opencode --claude# Quick date shortcuts
tokscale --today # Today only
tokscale --week # Last 7 days
tokscale --month # Current calendar month
# Custom date range (inclusive, local timezone)
tokscale --since 2024-01-01 --until 2024-12-31
# Filter by year
tokscale --year 2024
# Combine with other options
tokscale models --week --claude --json
tokscale monthly --month --benchmark贴两张我本机的结果展示
week的统计

总的统计

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。