Skip to content

Han-1413141/dsh-cost-meter

353Last commit Aug 16, 2026

dsh-cost-meter DSH plugin

dsh-cost-meter is a bilingual (Chinese/English) plugin for DeepSeek Harness that displays session costs, daily expenses, OpenCode Go subscription quota, budget usage, official account balance, and historical records. It supports peak/off-peak pricing, official price sync, and a Codex-like token usage heatmap. The plugin integrates into the sidebar, settings page, and session dock of the DSH web interface.

How to install the dsh-cost-meter DSH plugin

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

Copying does not run this command. Review the repository and version before installing the dsh-cost-meter DSH plugin.

dsh-cost-meter DSH plugin data source

dsh-cost-meter DSH plugin snapshot date: Aug 16, 2026

discovered

What the dsh-cost-meter DSH plugin can do

  • Real-time session cost display with input/cache/output token counts, configurable in two positions (below input area or session title bar).
  • Official account balance display (total/grant/recharge) in sidebar and settings, with auto-refresh and manual refresh.
  • OpenCode Go quota display (rolling 5h/week/month) with percentage, reset time, and budget percentage; key auto-discovery from DSH credentials, environment variables, or opencode login state.
  • Daily cost badge with hover details (call count and token breakdown).
  • Budget box with progress bar, warning at ≥80%, overrun at ≥100%; combined card when both quota and budget are enabled.
  • Token usage statistics with a 26-week daily usage heatmap (similar to Codex), showing cumulative totals and per-day details on hover.
  • Historical records aggregated by day, configurable retention (default 180 days).
  • Peak/off-peak pricing with time-based gates, real-time status display, and one-click sync from official DeepSeek pricing page.

Where the dsh-cost-meter DSH plugin fits

  • Monitor real-time cost of a single conversation to avoid unexpected charges.
  • Track daily, monthly, and cumulative spending across all sessions.
  • Visualize token usage patterns over the past 26 weeks with a heatmap.
  • Set a budget for a custom period and receive visual warnings when approaching limits.
  • Sync the latest official pricing model prices with peak/off-peak rates automatically.
  • View OpenCode Go subscription quota usage and remaining budget in one place.

Who the dsh-cost-meter DSH plugin is for

  • DeepSeek Harness users who need to manage API costs and budgets.
  • Developers using OpenCode Go subscription who want to track quota usage.
  • Users who prefer a bilingual interface (Chinese and English) for cost monitoring.

dsh-cost-meter DSH plugin limitations

  • Official page parsing depends on current structure; if the page changes, the price sync feature may fail and require manual price editing.
  • Session badge cost is estimated based on current price tier; exact cost is based on the ledger.
  • Balance query requires network access to api.deepseek.com and a valid API Key; the API Key is only sent to the official domain.
  • OpenCode Go quota interface is an opencode.ai official endpoint (community documentation); if the interface structure changes, the settings page may show an error.
  • Installation/update requires restarting dsh web to take effect.

dsh-cost-meter DSH plugin: from the repository README

Quoted from the Han-1413141/dsh-cost-meter README, the upstream source of the dsh-cost-meter DSH plugin. Copyright remains with the original authors.

**DeepSeek Harness 会话费用统计插件(界面中英双语)** 本会话费用 · 当日费用 · OpenCode Go 订阅额度显示 · 预算与已用百分比 · 官方账户余额 · 历史记录 · 峰谷计价 · 官方价格一键同步 · 类 Codex Token 用量热图 [![version](https://img.shields.io/badge/version-1.3.1-4176E6)](https://github.com/Han-1413141/dsh-cost-meter) [![license](https://img.shields.io/badge/license-MIT-green)](LICENSE) [![dsh](https://img.shields.io/badge/DeepSeek%20Harness-dsh--plugin-4176E6)](https://github.com/deepseek-ai/deepseek-harness) [![awesome · DSH plugin](https://awesome-dsh-plugin.com/badge.svg)](https://awesome-dsh-plugin.com) [![WhaleHarness audit](https://whaleharness.com/badge/Han-1413141/dsh-cost-meter/badge.svg)](https://whaleharness.com/audit-report.md) [English](README.en.md) | **中文** </div> --- ![宣传图](docs/promo.png) ## 功能总览 | 功能 | 位置 | 说明 | |---|---|---| | 本会话费用 | 输入区下方 / 会话标题栏 | 实时累计费用 + 输入/缓存/输出 token,位置可配 | | 官方余额 | 侧边栏顶部 / 设置页(可配) | 总余额 / 赠送 / 充值,自动刷新 + 手动刷新 | | OpenCode Go 额度 | 侧边栏 / 设置页 / 右下角(dock,可配) | 滚动 5 小时 / 本周 / 本月用量百分比与重置时间,三档可分别开关,可同时显示预算已用%;Key 自动发现(DSH 凭据库 OPENCODE_GO_API_KEY / 环境变量 / opencode 登录态)或手动填写 | | 当日费用 | 侧边栏底部(设置按钮上方) | 「今日 ¥x」,悬停见调用次数与 token 明细 | | 预算图框 | 侧边栏底部(余额行与设置按钮之间) | 圆角方形图框:预算、已用%、进度条、今日费用与占预算%、已用/额度,≥80% 预警、≥100% 超支 |

Read the full READMERepository license: MIT

dsh-cost-meter DSH plugin questions

How do I install dsh-cost-meter?

You can install using the one-liner PowerShell script: `irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.3.1/install.ps1 | iex`. Alternatively, if you have pnpm and git, run `dsh plugin --profile web add github:Han-1413141/dsh-cost-meter#v1.3.1`. After installation, restart `dsh web` to apply the plugin.

How do I update the plugin to the latest version?

To update, first remove the old version using `dsh plugin --profile web remove dsh-cost-meter`, then reinstall the new version using the same installation command. Note that the install script is pinned to a specific tag; you can change the tag in the URL to the latest version.

Why does the session cost badge show a different amount than the ledger?

The session badge estimates the cost using the current price tier, while the ledger records exact costs based on actual usage at the time of each API call. For precise accounting, refer to the ledger in the settings page.

Can I use this plugin without an OpenCode Go subscription?

Yes, the plugin works without an OpenCode Go subscription. You can still use all other features like session cost, daily cost, budget, balance, and historical records. The OpenCode Go quota panel will display a neutral message if not subscribed, and you can disable it in the display settings.

How do I sync the official DeepSeek pricing?

Go to Settings → Cost → Data & Sync, and click the 'Sync Official Prices' button. The plugin will fetch and parse the official pricing page. If the page structure changes, the sync may fail; you can manually edit the prices in the price table as a fallback.