dsh-key-usage: A Usage and Balance Panel in the DeepSeek Harness Sidebar

xyl886/dsh-key-usage

Models & ReasoningVerified
Listed on 2026-10-13
Page last updated 2026-10-14

Adds a Usage panel to the DeepSeek Harness sidebar, showing per-channel tokens, cost, balance and quota plus a yearly heatmap and project/session usage, all local and read-only.

dsh-key-usage is a DSH plugin that adds a usage view to DeepSeek Harness, placing a Usage entry in the left navigation that opens a full-page panel. It aggregates local ledgers and host session events to answer questions like how many tokens were spent, what they cost, and how much balance remains, drilling down by channel, project, and session. Apart from balance and quota queries that reach provider APIs, all data stays local and read-only, with no credential files touched, no disk writes, and no host configuration changes, maintained by xyl886 under the MIT license.

How to Install

install
dsh plugin --profile web add github:xyl886/dsh-key-usage
Category
Models & Reasoning
Platform
DSH Plugin
Author
xyl886
Distribution
Plugin

dsh-key-usage Key Features

Sidebar usage overview panelPer-channel tokens and costYearly activity heatmapProject and session usage statsLive balance and quota lookup
Listed on dsh-plugin.org

dsh-key-usage Repo Summary

What Does It Do?

dsh-key-usage is a DSH plugin for DeepSeek Harness that adds a "Usage" entry to the sidebar and turns local ledgers and host session events into a full usage dashboard. It solves the problem of not knowing how many tokens you have spent, what they cost, or how much balance remains, letting you inspect usage by channel, project, and session directly inside the harness. Maintained by xyl886 under the MIT license and written in TypeScript, it is read-only and local-first, with only balance and quota queries reaching provider APIs.

Core Features

  • Overview panel: lists each channel key with today's and last-30-day usage plus 30-day cost, alongside a yearly activity heatmap whose tooltips break down the day's models.
  • Usage details: switch between today, week, month, total, and custom ranges, with call-count, token, and cost cards, channel share bars, and day-by-day (hourly for a single day) stacked charts that expand down to models.
  • Project and session views: aggregates calls, tokens, share, cost, and last activity by working directory, and lists time, duration, tokens, hit rate, and cost per session, all searchable, filterable, and sortable.
  • Balance and quota: queries each channel's official balance and subscription window in real time, falling back to a local snapshot with the source clearly labeled when a query fails.
  • Privacy and safety: never reads credential files, writes no files, changes no host configuration, and exposes only read-only GET endpoints restricted to loopback requests.

How to Use This Plugin?

Once enabled in DSH, a "Usage" item appears in the left navigation; opening it shows the full-page panel with the overview key list and yearly heatmap by default. In the usage details tab, pick a range with the range switcher (today, week, month, total, or custom) and filter by channel to inspect the stacked charts and daily breakdown; the project and session tabs aggregate by working directory and by session, both searchable and sortable. The balance and quota tab is the only path that goes online: the server queries provider APIs, caches results for 60 seconds, and re-queries when you press refresh, labeling the reason whenever it falls back to a local snapshot. Client changes take effect on page refresh, while server-side plugin code loads at host startup, so exit and reopen the app after installing.

How to Troubleshoot This Plugin?

When a balance or quota card shows that it is displaying a local snapshot, the live query did not succeed, usually because that channel's API key cannot be resolved by the host credentials service or is missing from the process environment; restore the credential as described in the official docs and retry. If project, session, or hourly data reports as unavailable, the host session persistence service is typically missing or failed to read, and the remaining pages keep working, so no further action is needed.

This page is an independent rewrite of the plugin's official README — for authoritative documentation and the latest changes, refer to the source: xyl886/dsh-key-usage. The plugin is third-party code that runs on your machine once installed; inclusion does not imply endorsement — please review the source before installing.

Install, update, and uninstall this plugin in the Plugin Market of DeepSeek Harness's DSH Plugin Hub

DSH Plugin FAQ