OpenCode Go Usage Export

OpenCode Go usage dashboard & export — in-page stats panel (totals, cost, Go quota 5h/7d/30d, breakdowns by model / API key / plan), network-layer capture, 30-day detail + permanent aggregates in IndexedDB, incremental sync, CSV + Excel export. ⚠ Install only from the official GitHub repository (github.com/Shirolin/opencode-go-usage-export); modified copies from unknown sources may steal your API keys.

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

作者
Shirolin
日安装量
0
总安装量
2
评分
0 0 0
版本
1.0.4
创建于
2026-08-12
更新于
2026-08-12
大小
107.1 KB
许可证
GPL-3.0-or-later
适用于

OpenCode Go 用量仪表盘与导出OpenCode 控制台 页面内统计面板 + CSV/Excel 导出)。

页面内统计面板(无需下载):

  • 总量、近 30 天成本、Go 限额对比(5h/$12 · 7d/$30 · 30d/$60)
  • 按模型 / API key / plan 的条形图分解
  • 大窗口模式,便于浏览统计

数据管线

  • 网络层抓取原始服务端 JSON(精确时间戳、keyID、plan),比 DOM 抓取快数十倍
  • IndexedDB 分层存储:30 天明细 + 按 日期 × 模型 × plan × key 永久聚合
  • 全量 / 增量同步(时间戳早停)、断点续传、可中断抓取、自动同步

导出:CSV / Excel,支持日期区间筛选。

GPL-3.0 开源 —— 请仅从官方仓库安装:

  • 官方仓库:https://github.com/Shirolin/opencode-go-usage-export
  • 直接安装:https://raw.githubusercontent.com/Shirolin/opencode-go-usage-export/main/opencode-go-usage-export.user.js
  • 支持 / 问题反馈:https://github.com/Shirolin/opencode-go-usage-export/issues