A DeepSeek Harness (dsh web) plugin that attributes token usage to the relay site per request, with per-project grouping, balances, subscription quotas, analytics, cost estimation and CSV/JSON export — zero config, no credentials.
DSH integration
Compatible
Author-claimed
Safety audit
Unaudited
Last verified
2026-08-24
License
MIT
01What can it help you accomplish?
Attribute DeepSeek Harness token usage to the relay site that actually served each request, with per-project grouping and cost estimation
A web-panel "usage ledger": relay-site attribution, per-project usage, balances, subscription quotas, usage analytics and CSV/JSON export
DeepSeek Harness (dsh web) users who run traffic through relay sites (New API / Sub2API / official DeepSeek) and need to account for token spend
02How to install into DeepSeek Harness
Prerequisites
- DeepSeek Harness `web` profile — `@deepseek-ai/dsh >= 0.1.0-rc.6`
- A relay site whose `baseURL` is already configured in the host's provider config (the plugin discovers it, no credentials needed)
Installation steps
- 01
Run `dsh plugin --profile web add "github:zh667/TokenLedger"`
$ dsh plugin --profile web add "github:zh667/TokenLedger"
- 02
Restart the running `dsh web` and hard-refresh the browser; a "usage ledger" entry appears at the bottom of the sidebar
$ dsh web
- 03
To pin a version use the full 40-character commit SHA, e.g. `github:zh667/TokenLedger#<sha>`
- 04
Upgrade with `dsh plugin --profile web update dsh-tokenledger`; remove with `dsh plugin --profile web remove dsh-tokenledger`
$ dsh plugin --profile web update dsh-tokenledger
Verify the integration
Not specified by the author
Rollback
- dsh plugin --profile web remove dsh-tokenledger
03DSH integration and capability boundaries
Installs into the DeepSeek Harness web profile via the dsh plugin CLI; registers a "usage ledger" entry in the sidebar. Requires `@deepseek-ai/dsh >= 0.1.0-rc.6`.
Relay-site attribution
host provider config (baseURL per provider)→usage grouped by normalized relay origin; multiple keys to one site collapse to one row, named by domain
Per-project attribution
session launch directory→usage grouped by the directory a session started in (workspace title if registered, else directory name; nested sessions included)
Zero-config discovery
host provider configuration→relay sites read from the host config; only `baseURL` is read, credentials are never touched
Balances
one ordinary API key per account (DeepSeek official / New API / Sub2API)→balances shown; unlimited keys report "used" rather than a fake balance
Subscription quota
relay accounts sold as plans rather than balances→5-hour / weekly / monthly rolling quotas each with their own progress bar and reset time
Usage analytics
recorded usage→today / this-month / cumulative windows, drill-down by site and model, cache hit rate, one-year activity heatmap
Cost estimation
effective-date-segmented rate table, tiered pricing, peak/off-peak→estimated cost; unpriced models show a dash instead of 0
Export & diagnostics
recorded usage→CSV / JSON export, index health, rows that could not be attributed listed separately
Read-only loopback
loopback GET requests→two endpoints accept loopback GET only, guarded on peer socket address; never reads prompts, tool args or response bodies
exposes two loopback-only GET endpoints
04Who is it for? When not to use it?
Good for
- DeepSeek Harness (dsh web) users who run traffic through relay sites (New API / Sub2API / official DeepSeek) and need to account for token spend
Not for
- To pin a version you MUST use the full 40-character commit SHA. The package manager matches ref against `git ls-remote`; short SHAs match nothing and fail with `Could not resolve`.
05Compatibility, maintenance and safety notes
- The plugin never sends API keys or raw upstream responses to the browser, and never reads prompts, tool args or response content.
- To pin a version you MUST use the full 40-character commit SHA. The package manager matches ref against `git ls-remote`; short SHAs match nothing and fail with `Could not resolve`.
- Requires the DeepSeek Harness web profile (`@deepseek-ai/dsh >= 0.1.0-rc.6`). The panel shows in `dsh web` only.
MIT · active (latest release v0.1.0, 2026-08-15)
06Frequently asked questions
Do I need to enter my API keys into TokenLedger?
No. The plugin reads only the `baseURL` from your host's provider config to discover relay sites; it never touches the credentials next to them, nor sends API keys or raw upstream responses to the browser.
How do I pin a specific version when installing?
Use the full 40-character commit SHA in the spec, e.g. `github:zh667/TokenLedger#<sha>`. Short SHAs are not in the reference list that the package manager checks against `git ls-remote`, so they fail with `Could not resolve`.
Which relay sites are supported for balances and quotas?
DeepSeek official, New API and Sub2API — one ordinary API key per account. Unlimited-quota keys report "used" rather than a fabricated balance; subscription plans show rolling 5-hour / weekly / monthly quota bars.
What does TokenLedger never read or send?
Its two endpoints accept loopback GET only and are guarded on the peer socket address. It never reads prompts, tool arguments or response content, and never sends API keys or upstream raw responses to the browser.
How do I upgrade or remove the plugin?
Run `dsh plugin --profile web update dsh-tokenledger` to upgrade and `dsh plugin --profile web remove dsh-tokenledger` to remove. Re-adding the same spec re-resolves the latest `main`.
07Related DSH workflows
dsh-better-sidebar
by omdsh-dev
Full sidebar workbench with file rendering and editing, terminal, Git, and subagents; third-party plugins can register new tabs.
dsh-tui
by ccch1mneyyy
Claude Code 风格全屏终端 TUI:像素鲸鱼顶栏、双流光大字、实时工作状态行、思考流式展开、双击 Esc 时间回溯、上下文进度条 + TPS 仪表;接入 Agent preset(standard/code/minimal/cordis)、Skills、MCP、Goals、Todos、子代理,/ 命令注册表与随附技能(audit/bug/review/practice/pr_comments/release-notes/vuln-check);纯插件挂载零核心改动。
dsh-tianshu-tui
by huiliyi37
DeepSeek Harness 交互式终端 UI 插件:会话工作区、图片端到端(剪贴板/视觉桥)、slash 下拉、审批卡片、推理可视化,纯展示层
dsh-damage-pulse
by wssfk12138
Game-style token-usage / balance damage-pulse visualization for DeepSeek/DSH.
08Data and sources
需要 DeepSeek Harness `web` profile(`@deepseek-ai/dsh >= 0.1.0-rc.6`)。
dsh plugin --profile web add "github:zh667/TokenLedger"
This page is generated from the project’s public documentation, repository metadata and a structured parse of DSH Plugins; last verified on 2026-08-24. Found an error? Submit a correction.
Best DeepSeek Harness Plugins
Twelve plugins worth installing first — picked from the whole catalog, across every category.
