Xenia0922/dsh-opencode-go-usage 预览 preview

Xenia0922/dsh-opencode-go-usage

DeepSeek Harness 插件:OpenCode Go 用量与花费悬浮仪表盘(配额、逐请求成本、模型/来源分布)

Project Overview项目介绍

This is a native plugin built exclusively for DeepSeek Harness (DSH). It adds a draggable, resizable floating panel to the bottom-right corner of your screen when running DSH, to track OpenCode Go usage, quota, and spending. The plugin supports official account-level usage stats, DSH session analysis, quota forecasting, and multi-key management, and can export usage data as CSV. All core data processing happens on your local machine, and the plugin only sends network requests to opencode.ai for usage data and to GitHub for version checks. No API keys, auth cookies, or usage data are ever shared with third parties.

This plugin is designed for developers who use DSH with OpenCode Go as their coding agent. It helps users keep track of their spending and quota usage in one place, so they can avoid unexpected overage charges. To install for long-term use, you can clone the repository and add it to your DSH profile via the DSH plugin CLI command. For temporary testing, you can dynamically load the plugin into a running DSH process, though the plugin will not persist after DSH restarts. After installation, you just need to manually copy your auth cookie and workspace ID from opencode.ai to complete first-time setup.

This plugin is released under the permissive MIT open source license. It has been unmaintained since September 1, 2026, so no new features, bug fixes, or issue responses will be provided. To run the plugin, you need Node.js, a DSH/Cordis runtime environment, and Python 3. It depends on an internal opencode.ai API, so if the upstream API changes its format, the plugin will stop working and no fixes will be provided.

这是一款专为 DeepSeek Harness (DSH) 开发的原生插件,它会在桌面右下角提供一个可拖动、可缩放的悬浮面板,用于展示 OpenCode Go 的用量统计与花费详情。核心功能包括查看官方账户级用量、DSH 会话用量分析、配额监控、多 API key 管理、数据趋势分析等,支持导出 CSV 数据。所有数据都在本地处理,仅向 opencode.ai 和 GitHub 发送必要请求,不会泄露凭据。

这款插件面向同时使用 DSH 和 OpenCode Go 的开发者,帮助他们统一监控用量和花费,避免提前超出配额产生额外费用。推荐通过 DSH 的 Bundle 插件模式安装,也支持动态加载供临时体验。安装完成后,用户只需要手动从 opencode.ai 复制授权 Cookie 和工作区 ID,填入面板即可完成首次配置。

本项目采用 MIT 许可证开源,自 2026 年 9 月 1 日起已无限期停止维护,不再接收功能更新、问题修复和 issue 反馈。运行需要 Node.js、DSH/Cordis 运行环境和 Python 3,依赖 opencode.ai 内部接口格式,若上游接口变更插件会失效,且不会得到修复。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 note1 项提示
  • 11 stars - an early-stage project星标 11,属于早期项目
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 github:Xenia0922/dsh-opencode-go-usage

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

READMEREADME

dsh-opencode-go-usage — OpenCode Go 用量与花费面板

license: MIT 最新版本 平台:Windows、macOS、Linux 运行时:DSH 插件 测试:27 通过 维护状态:无限期停更

[!WARNING]

🛑 项目无限期停更 (Unmaintained)

本项目自 2026-09-01 起无限期停止维护,不再接收新功能、修复或 issue 反馈。 仓库将保持公开、代码与历史提交原样保留,任何人可自由 fork 或继续使用(MIT 许可)。

请勿提交 issue 或 PR —— 它们不会被处理。

如果 DeepSeek Harness / OpenCode 上游 API 发生变化导致插件失效,本仓库不会跟进修复。

OpenCode Go 用量面板

一个用于 DeepSeek Harness 的 DSH 插件。它在桌面右下角提供可拖动、可缩放的悬浮面板,用于查看 OpenCode Go 的账户级用量、配额和 DSH 会话分析。

数据在本机处理。网络请求只发往 opencode.ai,以及用于版本检查的 GitHub 公共 package.json;不会把 API key、Cookie 或用量数据发送给第三方。

界面预览

功能

  • 官方账户级用量:读取官网 usage.list,使用官方逐请求费用,支持跨设备数据。凭据通过本地配置提供。
  • DSH 会话分析:按 DSH 会话、模型和日期统计 OpenCode Go 用量。
  • 配额监控:显示滚动 5 小时、周、月配额、重置时间和消耗速度预测。
  • 多 key 配额池:自动发现 .credentials.yaml 中的 OPENCODE_GO_KEY_*,支持切换和限流状态提示。
  • 交互面板:FAB 拖动、标题栏拖动、边缘缩放、最大化、位置和大小持久化。
  • 数据分析:按模型排行、费用分项、7/14/30 天趋势、最近会话和 CSV 导出。
  • 中英文界面:可手动切换,也可以跟随 DSH 全局语言。
  • 跨平台启动:支持 Windows、macOS、Linux 上的 Chromium 系浏览器调试端口。

快速安装

推荐:Bundle 插件

在插件仓库的父目录执行:

git clone https://github.com/Xenia0922/dsh-opencode-go-usage.git
dsh plugin --profile my-profile add ./dsh-opencode-go-usage
dsh --profile my-profile

Bundle 模式会随 DSH profile 启动,并通过本地 webServer 注册以下路由:

  • /ocgo-usage/fetch:读取面板数据
  • /ocgo-usage/config:保存官方凭据
  • /ocgo-usage/retry:绕过缓存重新抓取

如果插件目录路径包含空格,而 dsh plugin add 无法正确解析,请把仓库移动到无空格路径,或使用 junction/link 指向无空格目录。

快速体验:动态加载

动态加载不需要构建,但只在当前 DSH 进程有效:

  1. 在 DSH 会话中让 Agent 执行 cordis_define,kind: new,idPrefix: zenus。
  2. 将 src/host.js 内容填入 code.host。
  3. 将 src/client.js 内容填入 code.client。
  4. 执行 cordis_run 并授权。

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-auto-approval-llm 下一个 Next dsh-harvest →