Sev7een/ds-api-usage
ds-api-usage adds a DeepSeek/API usage dashboard to DeepSeek Harness: it tracks API usage and cost across models and sources and presents it in a settings page loaded by the web shell. The plugin aggregates usage data from the harness and exposes a snapshot over the HTTP route /ds-api-usage/snapshot (static bundle form) or through the sandbox-private host.call channel (dynamic dev form), giving you a per-request cost and usage view inside DSH.
Install
dsh plugin --profile web add github:Sev7een/ds-api-usageGitHub source install per README (npm package dsh-plugin-ds-api-usage not yet published as of 2026-08-24 — the README says 'once published to npm'): dsh plugin --profile web add github:Sev7een/ds-api-usage. dsh plugin forwards to pnpm in the profile directory and reconciles the package into the profile's bundle list (dsh.profile.bundles); the package's cordis.patch.yml (declared via dsh.bundle.patch) inserts the plugin row into the host composition, and the dsh.client declaration makes the web shell load client/bundle.js as the settings page.
Compatibility
DeepSeek Harness web profile (bundle via dsh.bundle.patch + dsh.client). Static bundle form: the client talks to the host over the HTTP route /ds-api-usage/snapshot. Dynamic form (dev/session-scoped): a dynamic Cordis plugin created per session with cordis_define/cordis_run; the code.host body is src/index.js minus the module.exports wrapper and the code.client body is client/index.js minus the wrapper — the dynamic form uses the sandbox-private harness.handle/host.call channel. Keep both in sync when changing the protocol.
Details
- Repo: Sev7een/ds-api-usage
- Category: Other
- Stars: 6
- Version: GitHub source install github:Sev7een/ds-api-usage (npm dsh-plugin-ds-api-usage not yet published)
- Last push: 2026-08-16
- First seen: 2026-08-13
Recent updates
The current English README documents: installation (GitHub source now, npm 'once published'), the bundle mechanism (dsh.bundle.patch + dsh.client + /ds-api-usage/snapshot), the dynamic Cordis plugin form for dev/session-scoped use, and the two protocol forms that must be kept in sync.
FAQ
- Is the npm package available?
- Not yet as of 2026-08-24 — the README documents the GitHub source install (dsh plugin --profile web add github:Sev7een/ds-api-usage) and notes the npm form (dsh-plugin-ds-api-usage) as 'once published'.
- How does the settings page load?
- The dsh.client declaration makes the web shell load client/bundle.js as the settings page; the static bundle form talks to the host over the HTTP route /ds-api-usage/snapshot.
- What does the dynamic form do?
- The original is a dynamic Cordis plugin created per session with cordis_define/cordis_run, using the sandbox-private harness.handle/host.call channel — useful for dev or session-scoped usage.
Alternatives
940842546/dsh-usage-billing · Max-Samson/dsh-usage-chart · Ychris12138/dsh-usage-stats