dsh-cost-meter README

项目的 README,来自 github.com/Han-1413141/dsh-cost-meter。合并为一个 markdown 文件:README.md。

dsh-cost-meter

Cost tracking and subscription quotas for DeepSeek Harness

version npm monthly downloads GitHub stars MIT license

English | 简体中文

Install · Features · Screenshots · Docs · Community

Track costs and tokens by conversation, model and call. View account balances, subscription quotas and budgets together, with separate API charges and Plan equivalents, multi-provider pricing, peak/off-peak alerts, and configurable sidebar and composer displays.

Whale-themed project illustration
Project illustration

Full conversation view with costs, subscription quotas and account balance

Full conversation view in light or dark mode to match your theme. Screenshots use example data.

Installation

Requires Node.js ≥ 20, DSH 0.2.0 or later, and pnpm available to DSH. See host compatibility.

dsh plugin --profile web add dsh-cost-meter

Restart dsh web after installation or updates. Desktop uses its bundled CLI and the desktop profile; follow the Desktop guide.

Windows installer / pinned version

The PowerShell installer checks pnpm and Git and uses the web profile by default:

irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.9.97/install.ps1 | iex

Install a pinned Git tag:

dsh plugin --profile web add github:Han-1413141/dsh-cost-meter#v1.9.97

See installation and updates for uninstalling or installing without Git.

Current release v1.9.97: release notes · troubleshooting

OpenCode Go setup · CommandCode provider and accounts

Add and enable a Magpie gateway under Settings → Cost → Quotas to view quota windows and balances by provider and account.

Feature overview

See features and screenshots for entry points and model and plan support for providers and credentials.

Screenshots & walkthrough

Main views

Cost trends and model ranking Conversation cost distribution
Cost trends Conversation treemap
Subscription quotas and balances Display settings and interactive preview
Quotas and balances Display settings

Select an image for full resolution. More views: call details, prices, history, dark themes and mobile.

Sidebar layouts

Switch layouts under Settings → Cost → Display → Sidebar → Sidebar layout. Each screenshot uses the same example balance, quota and usage.

Standard Compact
Standard sidebar with stacked quota rows Compact sidebar with two-column quota rows
Simple Combined card
Simple sidebar with shorter rows Combined sidebar card with usage, balance and pricing period

Icons layout

The DeepSeek icon shows the balance and the current pricing period. Select it to open the details.

Off-peak Peak Open during peak
DeepSeek icon with a blue ring during off-peak hours DeepSeek icon with an orange ring during peak hours DeepSeek icon open, showing the balance and the next pricing change

Thanks to @chanyuenpang for proposing and implementing the Icons sidebar layout.

Documentation

Topic Guides
Setup and use Install, update and uninstall · Troubleshooting · Display settings
Statistics and billing Billing rules · Statistics and details · Models and plans · Peak schedules
Balances and quotas Credentials · Custom balances · Gateway quotas · Plan estimates
History and storage Retention and cleanup · Repricing · External usage · Ledger recovery
Development Architecture and development · Contributing · Host compatibility
Releases Update history · CHANGELOG

Community

Open an issue with plugin and host versions, reproduction steps and relevant logs. The WeChat group is available for usage questions and feature discussions.

WeChat community QR code

Contributors

Thanks to everyone who contributes reports, ideas, documentation and code.

Contributors

Star History

Star History Chart

License

MIT © 2026 dsh-cost-meter contributors

dsh-cost-meter (Han-1413141/dsh-cost-meter)

正在搜索数据库…

这是什么?这是一个 DeepSeek Harness(DSH)插件,用于跟踪会话和每日成本、token 用量、预算、提供商账户余额以及 coding-plan 订阅额度,界面为中英双语。
它是独立应用,还是运行在 DeepSeek Harness 里?它是一个运行在 DeepSeek Harness 内部的插件,在 Harness 的侧边栏、会话标题栏和设置页面里添加成本面板,而不是一个单独的应用。
装好之后怎么配置提供商余额和预算跟踪?进入 Settings → Cost(quota 标签页)→ “Custom Provider Balance”,把它指向任意 HTTP 余额接口,或者直接编辑 storages/cost-meter/ledger.json 里的配置。
coding-plan 提供商需要 API 密钥吗?需要——每个 coding-plan 提供商(Anthropic、Z.ai、MiniMax、Kimi、OpenRouter、SiliconFlow、CommandCode、SCNet、Volcano Ark)都要通过 DSH 的凭据存储录入自己的凭据;Volcano Ark 还额外要求具有特定 IAM 读取权限的 AK/SK。
准确性上有什么已知的注意事项吗?查询额度无限的提供商令牌会失败,因为没有 “remaining” 值可供提取;coding-plan 用量只按等效成本估算来跟踪,而不是实际的计费金额。
我的提供商 API 密钥是怎么存储的?密钥通过只写字段录入,直接存放在 DSH 的凭据存储中——绝不写入磁盘、绝不回显、绝不保存进 ledger.json;对外请求还被限制在 allowed-hosts 白名单内,以防密钥外泄。
高峰/低谷定价功能是什么?它展示 DeepSeek 按 UTC 计的高峰计费时段(01:00–04:00 和 06:00–10:00)与低谷费率的对比,规则是自 2026-08-23 起周末全天为低谷时段,还可以选择在切换前弹出提醒和系统通知。
它能显示哪些 coding-plan 订阅的额度?九家提供商:Anthropic Claude Pro/Max、Z.ai GLM、MiniMax Token Plan、Kimi Code、OpenRouter、SiliconFlow、CommandCode、SCNet 和 Volcano Ark,每一家都可以单独开关,并用各自的凭据和刷新间隔。
它能找回安装之前的成本历史吗?可以,首次启动时它会自动重放宿主的完整会话日志,按每次调用当时的历史价格补齐账本中缺失的天数。
CLIProxyAPI 集成增加了什么?它能以只读方式连接本地/局域网的 CLIProxyAPI 网关,显示多个提供商账户(Antigravity、Claude、Codex、Kimi、xAI)的额度以及 WorkBuddy 插件积分,并严格保证其任何调用都不会消耗计费额度。
大小
29.4 MB
星标
718
时长
3个月
提交 · 90 天