DeepSeek Harness plugin

dsh-usage-cost-linnanxi

Token usage & cost monitor for DeepSeek Harness: aggregate usage across all sessions, per-model cost (USD/CNY), time-window filtering, auto-refresh, embedded settings panel

Jump to install

Source facts

Repository
lin-nanxing/dsh-usage-cost
Latest update
Aug 15, 2026
Category
Development & Runtime
GitHub stars
0
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/lin-nanxing/dsh-usage-cost
Plugin: dsh-usage-cost-linnanxi
Author: lin-nanxing

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer8 files
README.mdSource · read only
README language

dsh-usage-cost

English · 中文 · 日本語 · Русский · Español · Français

Token usage & cost monitor for DeepSeek Harness. Aggregates token usage across all session logs, computes per-model cost (USD / approx. RMB), and renders a native panel inside Settings — no URL hunting needed.

![Usage & Cost panel (English)](assets/screenshots/panel-en.png)

Features

  • Cross-session aggregation — scans every session log via ctx.sessionPersistence, tallies per-model input (cache-miss / cache-hit), output, reasoning tokens and call counts.
  • Cost calculation — official DeepSeek pricing page (with built-in fallback table) × usage → cost; live USD→CNY exchange rate.
  • Editable prices — per-model price overrides right in the panel (persisted via settings); every row has save/delete icon buttons.
  • Time windows — all / last 24h / today / last 7d / last 30d.
  • Auto-refresh — selectable interval: off / 1m / 5m / 30m / 1h / 12h (background silent refresh, never blocks).
  • Hit-rate color grading — <60% red · 60–80% yellow · ≥80% green.
  • Localized — the panel follows DSH's own UI language (Chinese / English), no separate switch.
  • Instant reopen — data cached at module level, reopening Settings shows content immediately.

Install

# from npm
dsh plugin --profile web add dsh-usage-cost

# or directly from this repository
dsh plugin --profile web add github:lin-nanxing/dsh-usage-cost

# or local (pnpm required, no dsh CLI needed)
bash scripts/install.sh

Restart dsh web, then open Settings → 用量与费用 in the UI. A standalone page also stays available at http://127.0.0.1:<port>/usage-cost.

Metrics

Six summary cards on top of the panel:

CardMeaning
Total (USD)Billed cost of all calls in USD
Total (≈CNY)USD × live exchange rate
Total tokensInput + cache-hit + cache-miss + output + reasoning
Sessions / CallsSessions with usage / total call count
Avg token priceTotal cost (CNY) ÷ total tokens per 1M (¥/M)
Reasoning shareReasoning ÷ (output + reasoning), share of thinking

Billing formula: miss = input-miss + cache-write; hit = cache-read; out = output + reasoning; cost = miss×miss-price + hit×hit-price + out×out-price.

License

MIT