mouseteamlucky/dsh-opencode-go-usage0

@mouseteamlucky/dsh-opencode-go-usage

DSH (DeepSeek Harness) web plugin — floating widget showing real-time OpenCode Go subscription usage (rolling / weekly / monthly) for every API key. 悬浮实时展示 opencode-go 各 key 用量。Maintained fork of @xiaweiliang060035/dsh-opencode-go-usage.

AI 分析

核心用途是以悬浮窗形式直观展示 OpenCode Go 多个 API Key 的额度消耗进度与重置倒计时。适合拥有多个订阅 Key 并需要合理分配用量的用户。

パッケージ
@mouseteamlucky/dsh-opencode-go-usage
バージョン
1.0.0
ライセンス
MIT
最終更新
2026/09/05

インストール

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:mouseteamlucky/dsh-opencode-go-usage

ドキュメント

README 全文を読む ↗

dsh-opencode-go-usage

A DeepSeek Harness web plugin: a floating widget pinned to the right edge of the page that shows real-time OpenCode Go subscription usage — rolling / weekly / monthly windows (percent used, progress bar, and reset countdown) for every API key in the pool.

This repository is a maintained, account-scoped release of @xiaweiliang060035/dsh-opencode-go-usage (MIT). Install command and branding are updated for @mouseteamlucky/*.

Features

  • Floating widget: compact button pinned to the right edge; the badge shows the worst-window percentage across all keys (green / orange / red breathing pulse by urgency).
  • Expanded panel: one card per key (active key marked ★) with rolling / weekly / monthly usage bars, percentages, reset countdowns; rate-limited windows flagged ⚠; per-key errors shown inline.
  • Live refresh: the Host polls the official usage endpoint; the panel auto-refreshes and offers a manual refresh.
  • Key pool auto-discovery: reads $DSH_HOME/.credentials.yaml entries (OPENCODE_GO_KEY_); falls back to the active key (OPENCODE_GO_API_KEY) when no pool exists.
  • Bilingual UI & DSH theme tokens (light/dark).

Install

dsh plugin --profile web add github:mouseteamlucky/dsh-opencode-go-usage

Then restart the DSH web app (the launcher/restart-guarded path) and refresh the browser page.

How it works

  • Host (Node ESM): discovers the key pool (config → .credentials.yaml → env layers), resolves each key through the credentials service, and calls the official endpoint:

    GET https://opencode.ai/zen/go/v1/usage
    Authorization: Bearer 
    

    Keys never leave the host — the browser only receives an aggregated snapshot.

  • Client (browser bundle): registers on the public shell.overlay slot and polls the Host route /plugins/dsh-opencode-go-usage/snapshot.

License

MIT. See LICENSE. Upstream fork attribution: xiaweiliang060035/dsh-opencode-go-usage.