6pofx/dsh-go 预览 preview

6pofx/dsh-go

Plugin插件 Native原生 ⭐ 2 MIT Usage & Cost用量与计费Data & Analysis数据与分析

OpenCode GO 套餐用量监控插件:账户三窗口额度 + DSH 按模型 Token/金额统计,为 DeepSeek Harness Web GUI 而生

Project Overview项目介绍

This is a native plugin built exclusively for the DeepSeek Harness (DSH) Web GUI, designed to track usage and spending for OpenCode GO subscriptions. It can be installed directly via the DSH CLI command dsh plugin --profile web add github:6pofx/dsh-go, which avoids common Windows cross-drive path issues that come with local directory linking. It automatically injects itself into the DSH profile via a bundled cordis patch and dsh bundle patch, so users do not need to manually edit any configuration files to enable the plugin after installation. It also supports offline installation via a tarball package for users who cannot access GitHub directly.

The plugin is targeted at developers who use DSH to connect to the OpenCode GO API service and hold an active paid OpenCode GO subscription. After installation, it adds a dedicated entry to the DSH settings sidebar and a small dynamic progress bar below the chat input box that only appears when you are chatting with an OpenCode GO model. Users can view detailed usage breakdowns, refresh usage data on demand with one click, check the official current pricing table, and see a 30-day trend of their estimated daily spending without ever leaving the DSH interface.

This plugin is released under the open-source MIT license, so it is free to use, modify, and distribute for both personal and commercial purposes. It automatically parses your existing OpenCode GO API key from the local auth.json file on your machine, so you do not need to manually enter or duplicate your credential to use the plugin. There are several important limitations to note: model-level usage only tracks requests made via your local DSH instance, all spending values are estimates based on official pricing, and the unofficial OpenCode usage API may change without warning.

这是一款专为 DeepSeek Harness (DSH) Web 界面开发的原生插件,核心功能是监控 OpenCode GO 套餐的用量消耗。它可以从 OpenCode 官方接口拉取账户级的 5 小时滚动、每周、每月三窗口额度,用环形图展示已用比例、剩余金额和重置倒计时,还会根据使用阈值自动变色提醒,同时聚合 DSH 本地会话日志,统计不同模型的 Token 消耗并估算消费金额。

该插件面向同时使用 DSH 和 OpenCode GO 订阅服务的开发者,安装完成后会自动在 DSH 设置侧边栏新增「OpenCode GO 用量」入口,还会在对话输入框下方添加随用随刷新的迷你进度条。用户可以随时查看额度剩余、按模型拆分的消耗数据,点击迷你条还能立即刷新用量,也可以直接在插件面板查看最新的官方价格表和近 30 天的每日消费趋势。

该插件采用 MIT 许可开源,完全免费使用,安装支持直接通过 DSH 插件命令从 GitHub 源拉取,也支持本地打包离线安装。它会自动解析用户本地的 OpenCode GO API 密钥,无需手动配置密钥信息。需要注意的是,按模型统计的用量仅覆盖本机 DSH 产生的请求,估算金额为参考值,不代表官方账单实际金额,且用量接口未公开,可能存在变动风险。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 2 stars - very few users, little community feedback星标只有 2,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add dsh-go-usage

把 6pofx/dsh-go 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-go

OpenCode GO 套餐用量监控插件 · 为 DeepSeek Harness Web GUI 而生

在 DSH 里一眼看清你的 OpenCode GO 套餐还剩多少:账户级三窗口额度(5 小时 / 每周 / 每月)环形图,加上从 DSH 会话日志聚合出的按模型 Token 消耗与估算金额,输入框下方还有一条随用随刷新的迷你指示。

license


✨ 功能一览

功能 说明
🍩 三窗口环形图 5 小时滚动($12)/ 每周($30)/ 每月($60):已用 %、剩余约 $、重置倒计时,阈值变色(≥80% 黄、≥90% 红)
📊 按模型用量 从 DSH 会话日志聚合 provider 为 opencode-go 的请求:每个模型的 Token 用量与估算金额;简洁 / 详细模式切换(详细拆分输入 / 输出 / 缓存命中,DeepSeek 分档模型的金额再拆高峰 / 闲时)
💲 价格表查看 页面内「查看价格表」按钮:展开当前生效的官方 GO 价格表(USD / 每 1M token,含高峰/闲时分档列),标注同步来源与时间
📈 每日趋势 近 30 天每日 GO 花费(估算)迷你趋势图
🪟 输入框迷你条 仅当对话模型来自 GO 时显示 5h / 周 / 月 百分比;悬浮查看三窗口详情;点击立即刷新
🎨 主题自适应 全部样式走 --dsw-alias-* 主题变量(带明暗兜底),阴影用 color-mix 取主题色;圆角通过通用元素探测(默认直角 + 多数决 + 挂载/增删重探)自动跟随直角 / 圆角主题
🔑 Key 自动解析 OPENCODE_GO_API_KEY 凭据 → auth.json(opencode-go → opencode),无需手动配置

入口:设置侧边栏 →「OpenCode GO 用量」 + 对话输入框下方迷你条。

📸 截图

设置页:三窗口环形图 + 按模型用量

设置页

详细模型用量查询

详细模型用量查询

悬浮详情面板

悬浮详情面板


🚀 安装

已发布到 npm,推荐直接安装(插件同时适配 DSH 新旧两个 rc 线,见下节「版本兼容」):

dsh plugin --profile web add dsh-go-usage

也可以走 git 源(dsh plugin 走 pnpm,git 源同样没有 Windows 跨盘符路径问题):

dsh plugin --profile web add github:6pofx/dsh-go

本地开发 / 离线安装(tarball 流程,Windows 上 link: 目录依赖有 pnpm 盘符 bug,勿用目录直连):

# 1. 打包(产物为 dsh-go-usage-<版本>.tgz,如 dsh-go-usage-0.1.20.tgz)
npm pack

# 2. 拷到 profile 目录
cp dsh-go-usage-*.tgz $DSH_HOME/profiles/web/

# 3. 首次安装需在 $DSH_HOME/profiles/web/package.json 的 dependencies 加入:
#    "dsh-go-usage": "file:dsh-go-usage-0.1.20.tgz"

# 4. 物化依赖 + 自动注册 bundle 层(reconcile)
dsh plugin --profile web install

# 5. 重启 dsh web

插件通过包内 cordis.patch.yml + dsh.bundle.patch 声明自动注入插件行,无需手改 profile 的 cordis.patch.yml 用户层。

更新

dsh plugin --profile web update dsh-go-usage   # npm 源
# 或 git 源:dsh plugin --profile web update dsh-go
# 或 tarball:npm pack && cp dsh-go-usage-*.tgz $DSH_HOME/profiles/web/ && dsh plugin --profile web install
# 重启 dsh web

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-skin-studio 下一个 Next dsh-plugin-portal →