Skip to content

OK-wx/dsh-ocgo-lite

30Last commit Aug 15, 2026

dsh-ocgo-lite DSH plugin

This plugin adds a persistent bar under the composer dock that shows OpenCode Go plan balance, token consumption, and spending. It reads session log files in real-time and supports multi-session configuration memory, auto-refresh every 30 seconds, and dynamic pricing updates.

How to install the dsh-ocgo-lite DSH plugin

dsh plugin --profile web add github:OK-wx/dsh-ocgo-lite

Copying does not run this command. Review the repository and version before installing the dsh-ocgo-lite DSH plugin.

dsh-ocgo-lite DSH plugin data source

dsh-ocgo-lite DSH plugin snapshot date: Aug 16, 2026

discovered

What the dsh-ocgo-lite DSH plugin can do

  • Shows quota ring indicators (rolling/week/month) with color-coded health (blue/yellow/red) and clickable detail popups.
  • Displays token count with breakdown by model, including input/output/reasoning/cache read/write.
  • Shows cost breakdown by model with pricing tier bars and official rates.
  • Supports toggle between 'all' (all DSH sessions) and 'current session' scope, with model selection cascading.
  • Remembers scope and model selection per session independently.
  • Auto-refreshes every 30 seconds without visible loading, and reads session logs incrementally for real-time updates.

Where the dsh-ocgo-lite DSH plugin fits

  • Monitor OpenCode Go quota consumption while coding in DSH to avoid hitting limits.
  • Track token usage and cost across multiple DSH sessions to optimize spending.
  • Quickly copy API key or view account details without leaving the chat interface.
  • Compare token usage between different models in the current session.

Who the dsh-ocgo-lite DSH plugin is for

  • Developers using DeepSeek Harness who also use OpenCode Go for AI code generation.
  • Users who need to keep an eye on their OpenCode Go plan balance and usage in real-time.

dsh-ocgo-lite DSH plugin limitations

  • Only works with DeepSeek Harness web profile and requires Node.js ≥ 22.5.
  • Requires local login to OpenCode Go (auth.json with opencode-go key) on the same machine.
  • Pricing update may fail silently; fallback to built-in table if fetch fails.
  • Memory protection limits scanning to the 8 most recent sessions and files ≤8MB compressed.

dsh-ocgo-lite DSH plugin: from the repository README

Quoted from the OK-wx/dsh-ocgo-lite README, the upstream source of the dsh-ocgo-lite DSH plugin. Copyright remains with the original authors.

**OpenCode Go 用量常驻条** — DeepSeek Harness 插件。 聊天输入框下方(composer dock)**常驻展开**显示 OpenCode Go 套餐余量、token 消耗与花费,零外部依赖。 ``` [GO:] 滚动:◯5% 周:◯7% 月:◯3% 范围:本次会话 模型:deepseek-v4-flash token:58,234 花费:$0.04 ``` ## ✨ 功能 | 区块 | 交互 | |---|---| | **GO:** | 点击弹出账户卡片(登录状态、套餐、配额概览、API Key 掩码 + 一键复制) | | **滚动 / 周 / 月(圆环)** | 官方配额百分比圆环(健康色:蓝/黄/红),点击弹出三窗口进度条 + 重置倒计时 | | **范围:** | 点击切换统计范围——**全部**(所有 DSH 会话合计)/ **本次会话**(仅当前聊天);切到本次会话时若只有 1 个模型自动选中该模型 | | **模型:** | 点击弹出模型选择器——范围=本次会话时只列出本次会话用过的模型;选中后状态条 token/花费联动(范围+模型双层联动) | | **token** | 完整数字 + 详情卡片(输入/输出/推理/缓存读/写 + 按模型分组明细,标题随范围显示「总消耗 token / 本次会话总消耗」) | | **花费** | 详情卡片:累计金额 + 按模型花费排行(占比条 + 各模型官方定价,随范围联动) | - 点击页面空白处关闭详情卡片 - 30 秒自动刷新(无感,不闪 loading) - **实时更新**:直读会话日志文件(多帧 zstd 解压 + JSONL 行解析,秒级) - **会话配置记忆**:每个会话独立记住自己的「范围 + 模型」选择——切到其他会话再切回来,配置原样恢复,互不影响 - 切换会话立即显示(前端共享缓存) - 复制成功有 toast 弹窗提示 ## 🗄️ 数据来源与口径 | 数据 | 来源 | 口径 | |---|---|---| | **配额余量** | 官方 `https://opencode.ai/zen/go/v1/usage`(Bearer auth.json key) | **账户级**(含其他设备/软件),不受范围切换影响 | | **token / 花费** | DSH 会话事件(`assistant/message` 的 usage,过滤 opencode-go provider) | **仅 DSH 会话**(不含 opencode CLI 等),范围=全部/本次会话 | | **金额** | 按官方定价表估算(per 1M tokens) | 输入 $0.14 / 输出 $0.28 / 缓存读 $0.0028(de

Read the full READMEThe repository declares no license. Check with the authors before using it.

dsh-ocgo-lite DSH plugin questions

How do I install dsh-ocgo-lite?

Run `dsh plugin --profile web add github:OK-wx/dsh-ocgo-lite` in your terminal. This will download and activate the plugin. Alternatively, you can link the source directory manually. After installation, restart DSH with `dsh --profile web` to load the plugin.

Does this plugin work with DSH terminal or only web?

The plugin is designed for the DSH web profile only. It uses the composer dock and Portal rendering, which are only available in the web interface. It will not work in terminal mode.

What data does the plugin show?

It shows your OpenCode Go plan quota (rolling, weekly, monthly percentages), token consumption (total, broken down by model), and estimated cost. It also provides account details like login status, plan overview, and masked API key with one-click copy.

How often does the data refresh?

The plugin refreshes every 30 seconds automatically. It reads session log files incrementally, so only active sessions are re-scanned. The refresh is seamless without any loading indicator.

Can I see usage from all DSH sessions or just the current one?

Yes, you can toggle between 'All' (aggregate of all DSH sessions) and 'Current session' (only the active chat). When set to 'Current session', the model selector shows only models used in that session. The selection is remembered per session.