DeepSeek Harness plugin

dsh-cost-tracker-lyfzhixi

DSH Web 每日 LLM 花费统计插件:按会话/模型/天记录与查看模型调用费用。Daily LLM cost tracking for DeepSeek Harness Web: per-session/model/day usage cost.

Jump to install

Source facts

Repository
lyfZhixing/dsh-cost-tracker
Latest update
Aug 17, 2026
Category
Memory
GitHub stars
3
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/lyfZhixing/dsh-cost-tracker
Plugin: dsh-cost-tracker-lyfzhixi
Author: lyfZhixing

Check the source files

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

File explorer4 files
README.en.mdSource · read only
README language

dsh-cost-tracker · LLM Cost Tracking Plugin

![npm version](https://www.npmjs.com/package/dsh-cost-tracker) ![npm downloads](https://www.npmjs.com/package/dsh-cost-tracker) ![License: MIT](LICENSE) ![GitHub](https://github.com/lyfZhixing/dsh-cost-tracker)

English | 中文

A DeepSeek Harness Web (dsh --profile web) plugin that records daily LLM call costs and lets you inspect them per session, per model, and per day.

![Entry points](docs/screenshot-entry.png)

Features

  • Automatically records usage for every model call: input (cache miss), cache hit, output, and reasoning tokens
  • Estimates cost from a configurable pricing table (¥ / 1M tokens) with an optional peak-hour multiplier (default: Beijing time 9–12 and 14–18, 2×)
  • Entry points:

- "¥ 花费统计" button at the sidebar footer (opens the dashboard) - "¥ 花费" button in the session header (shows that session's cost) - Per-session cost readout above the composer

  • Dashboard tabs: Overview (today / 7 days / total), By Model, By Session, Recent Calls, Pricing
  • Pricing can be edited in-app at any time; historical records are recalculated on save
  • Zero token consumption: it only reads the usage data already returned by the model API and does local arithmetic — it never calls a model itself

Install

Option 1: npm (recommended)

dsh plugin --profile web add dsh-cost-tracker

Then restart dsh web and refresh the page — the "¥ 花费统计" entry appears at the bottom of the sidebar.

> If you use the npmmirror registry in China, note that newly published packages take a few minutes to hours to sync. If install reports 404, point pnpm at the official registry temporarily: > dsh plugin --profile web add dsh-cost-tracker --registry=https://registry.npmjs.org/

Option 2: install from GitHub

dsh plugin --profile web add github:lyfZhixing/dsh-cost-tracker

(No build step — nothing extra to configure.)

Option 3: local directory (development / internal sharing)

dsh plugin --profile web add /path/to/dsh-cost-tracker

Uninstall

dsh plugin --profile web remove dsh-cost-tracker

Uninstalling removes only the plugin; your local data file ~/.dsh/cost-tracker.json is kept.

Usage

1. Use any session as usual — every model reply is recorded automatically 2. Click "¥ 花费统计" at the sidebar footer to open the dashboard: - Overview: today / last-7-days / total cost, a 30-day daily bar chart, top models and sessions - By Model: calls, tokens, cost, and share for each model - By Session: cost and last-call time for each session - Recent Calls: the latest 200 call details - Pricing: edit peak hours, the default price, and per-model prices; one click adds any unpriced model that appears in your records 3. Close the panel with the ✕ button, clicking the backdrop, pressing Esc, or toggling the sidebar button

Pricing

![Pricing settings](docs/screenshot-pricing.png)

  • Unit: ¥ / 1M tokens; inputMiss = uncached input price, inputHit = cache-hit input price, output = output price
  • Default prices (deepseek-v4-pro / deepseek-v4-flash) are estimates — adjust them in the Pricing tab to match your real billing
  • The peak-hour multiplier applies to both input and output; timezone offset defaults to +8 (Beijing time)

Data & Privacy

  • All data stays on your machine: ~/.dsh/cost-tracker.json (records, session titles, pricing table)
  • No API keys or credentials: the plugin only reads usage data included in model responses and never calls any model API itself
  • No network reporting; the page pulls stats from a local HTTP endpoint (/cost-tracker/data) every 4 seconds
  • Cost calculation consumes zero extra tokens

FAQ

Q: No records / shows 0 after install? A: The plugin only records calls made after it is installed; past calls cannot be recovered. Also check the Pricing tab — unpriced models are flagged and fall back to the default price.

Q: The numbers don't match my bill? A: Default prices are estimates. Edit them in the Pricing tab (unit: ¥ / 1M tokens) to match your actual billing.

Q: Will uninstalling lose my data? A: No. The data file ~/.dsh/cost-tracker.json is independent; reinstalling the plugin restores it automatically.

Q: Install fails with 404 on the npmmirror registry? A: The mirror lags on new packages. Install with --registry=https://registry.npmjs.org/ temporarily, or retry later.

Development

dsh-cost-tracker/
├── package.json        # dsh.bundle + dsh.client declarations
├── cordis.patch.yml    # plugin-row insert layer applied on install
└── lib/
    ├── index.js        # host half: usage recording, persistence, HTTP routes
    └── client.js       # browser half: UI (plain JS bundle, no build step)
  • lib/client.js is served live by the server (cache-control: no-cache) — edits take effect after a page refresh
  • lib/index.js is host-side code — changes require restarting dsh web
  • No TypeScript / no bundling / no external runtime dependencies; the client must be written in the window.__ModuleLoader__.load({ id, factory }) format
  • Source: github.com/lyfZhixing/dsh-cost-tracker

Changelog

  • v1.0.1 (2026-08-17): added English README (README.en.md) and UI screenshots; documentation polish.
  • v1.0.0 (2026-08-17): first public release. Automatically records usage per model call and estimates cost from a configurable pricing table; dashboard with Overview / By Model / By Session / Recent Calls / Pricing; peak-hour multiplier and custom pricing support.

License

MIT