DeepSHPlugins
dsh-usage-monitor 專案預覽
GITHUB / COMMUNITY PROJECT

dsh-usage-monitor

安全與運維TypeScriptMIT

DSH 用量監控:自動查詢已配置 API Key 的供應商餘額和時間視窗限制,支援輸入框餘量膠囊和自定義供應商。

3 Starslcthe 更新時間 2026-09-01
訪問 GitHub 倉庫
dsh-usage-monitor 專案預覽
dsh-usage-monitor 介面截圖dsh-usage-monitor 介面截圖dsh-usage-monitor 介面截圖dsh-usage-monitor 介面截圖

專案介紹

中文

DSH 用量監控:自動查詢已配置 API Key 的供應商餘額和時間視窗限制,支援輸入框餘量膠囊和自定義供應商。

English

DSH Usage Monitor: auto-query provider credit balances and time-window limits from configured API keys, with input capsule and custom provider support.

專案資訊與收錄訊號

快照 2026-09-11
作者 / 組織
lcthe
倉庫
lcthe/dsh-usage-monitor
GitHub Stars
3
Forks
0
開發語言
TypeScript
許可證
MIT
最近推送
2026-09-01
Manifest
資料中檢測到宣告

公開倉庫不自動等於可商用;許可證與當前相容性以原專案文件為準。Manifest 和資料評分不構成安裝安全認證。

資料評分

51/ 100
維護活躍
94
文件與實用資訊
50
生態關注度
17
安裝便捷訊號
80
專案宣告訊號
85

近 10 天仍在更新;關注度尚低(3)。

評分來自已有資料快照的五維模型,僅作瀏覽參考,不是實際使用評測或安全檢測結論。

安裝與使用

所有專案資料與許可均以對應 GitHub 倉庫為準。

dsh plugin --profile web add @lcthe/dsh-usage-monitor

複製命令不會自動執行。請先閱讀倉庫文件,確認環境要求與許可證。

專案截圖

倉庫 README

GitHub 原文

已儲存的倉庫文件快照;文件抓取時間未記錄,可能與上方目錄介紹處於不同版本。安裝前請核對當前倉庫說明。

儲存庫檔案保留原文,指令與授權文字不作自動改寫。

dsh-usage-monitor

DSH Usage Monitor — View API credit balance and usage status across all configured LLM providers.

English | 简体中文

🎯 Overview

A DSH plugin that adds a Usage page to the settings UI. It automatically reads your configured API keys from the DSH credential system and queries each provider's balance API, displaying the results in a clean card-based layout.

✨ Features

  • Auto-detect configured providers — reads API keys from DSH credentials, no manual input needed
  • Card-based UI — DSH unified card style, responsive grid layout
  • Multiple display modes — currency (¥/$), token count, time-window progress bars
  • Custom providers — add and remove display-only provider cards; Base URL is required and the console URL is optional
  • Built-in query overrides — edit query URL, method, authentication, and response field paths for third-party balance endpoints
  • Input capsule — balance in composer toolbar, refreshes on provider switch, message send, or click
  • Console links — one-click access to provider dashboards
  • Filtering — filter by All / Configured / Balance Supported
  • i18n — Chinese and English

Screenshots

1. Balance capsule in the composer

Balance capsule

2. Usage overview

Usage overview

3. Query configuration editor

Query configuration editor

4. Custom provider form

Custom provider form

📐 Requirements

Requires a DSH deployment with a browser client, including the Desktop or Web version with Web UI.

📦 Installation

pnpm add @lcthe/dsh-usage-monitor

Add the plugin to your cordis.yml at the same include level as other bundles:

- insert:
    - id: dsh-usage-monitor
      name: '@lcthe/dsh-usage-monitor'

Start the DSH Web client:

pnpm dsh web

After DSH starts, open Settings → Usage to view your provider balances.

🔑 Provider Support

已稳定测试: DeepSeek、OpenCode Go。其他供应商的余额查询接口未经完整测试,欢迎反馈。

余额查询支持

供应商余额接口计费模式显示方式控制台状态
DeepSeekGET /user/balance按量付费¥ 余额platform.deepseek.com✅ 已验证
OpenCode GoGET /v1/usage订阅制5h/周/月 进度条opencode.ai/workspace/go✅ 已验证
Moonshot AIGET /v1/users/me/balance按量付费¥ 余额platform.moonshot.cn⚠️ 未测试
Moonshot AI CNGET /v1/users/me/balance按量付费¥ 余额platform.moonshot.cn⚠️ 未测试
OpenRouterGET /api/v1/credits按量付费$ 余额openrouter.ai⚠️ 需 Management Key
Fireworks AIGET /v1/accounts/-/billingUsage后付费$ 已用费用fireworks.ai⚠️ 未测试
Z.AI(智谱)GET /user/rights按量付费token 余量open.bigmodel.cn⚠️ 未测试
Z.AI CNGET /user/rights按量付费token 余量open.bigmodel.cn⚠️ 未测试

不支持余额查询

以下供应商暂无公开的余额查询 API,显示控制台链接供手动查看:

供应商控制台
OpenAIchatgpt.com
Anthropicconsole.anthropic.com
Google Geminiaistudio.google.com
Groqconsole.groq.com
Mistralconsole.mistral.ai
xAIconsole.x.ai
Together AIapi.together.ai
Cerebrascloud.cerebras.ai
NVIDIAbuild.nvidia.com
Hugging Facehuggingface.co
Qwen(通义千问)dashscope.console.aliyun.com
Xiaomi(小米)platform.xiaomimimo.com
Kimi For Codingkimi.moonshot.cn
Ant Ling(蚂蚁灵)ant-ling.com
OpenCode Zenopencode.ai/workspace

Query overrides

Built-in provider cards can be edited from the Edit action. Overrides are stored globally by the DSH host in ~/.dsh/usage-monitor/config.json and do not contain API key values. The editor supports HTTPS query URLs, GET/POST, Bearer Token, X-API-Key, no authentication, and safe dot-separated response field paths. Localhost, private-network, loopback, and cloud metadata addresses are rejected.

Issues and PRs are welcome!

📄 License

MIT

使用前核對

安裝步驟、相容版本與授權範圍以原專案當前文件為準。Stars 和評分是快照中的導航訊號。

安裝與排錯 · 專案問題反饋

同類專案