首页
学习
活动
专区
圈层
工具
发布
社区首页 >专栏 >tokscale 跟踪多个 AI 编码代理间的使用情况和成本

tokscale 跟踪多个 AI 编码代理间的使用情况和成本

原创
作者头像
保持热爱奔赴山海
发布2026-03-22 09:16:31
发布2026-03-22 09:16:31
130
举报
文章被收录于专栏:其它其它

一个高性能的 CLI 工具和可视化仪表盘,用于跟踪多个 AI 编码代理间的令牌使用情况和成本。

https://github.com/junhoyeo/tokscale

Tokscale 可以读取本机上各种LLM的数据文件,帮助你您监控和分析来自以下领域的token消费

安装方法

代码语言:txt
复制
# Run directly with npx
npx tokscale@latest

# Or use bunx
bunx tokscale@latest

# Light mode (table rendering only)
npx tokscale@latest --light

基本使用方法

代码语言:txt
复制
# 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

按平台筛选

代码语言:txt
复制
# 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

日期过滤

代码语言:txt
复制
# 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 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 按平台筛选
  • 日期过滤
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档