# AI use cases for DSH Usage (Aisland-SJL/dsh-usage)

Repo: [Aisland-SJL/dsh-usage](https://github.com/Aisland-SJL/dsh-usage) | Use cases: 4 | Page: https://dedupedai.com/use-cases/aisland-sjl-dsh-usage/

dsh-usage is a JavaScript plugin for DeepSeek Harness that adds a persistent balance and token-usage dock, a detail panel, an activity heatmap, and a DSH versus Claude Code usage comparison.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Watch DeepSeek balance and daily tokens in the Harness dock: https://dedupedai.com/use-cases/aisland-sjl-dsh-usage/monitor-deepseek-balance-in-dsh-dock/
- See how tokens split between DSH and Claude Code: https://dedupedai.com/use-cases/aisland-sjl-dsh-usage/compare-dsh-and-claude-code-token-share/
- Track balances for OpenRouter, Z.ai, and Kimi together: https://dedupedai.com/use-cases/aisland-sjl-dsh-usage/track-multi-provider-balances/
- Run the offline test suite before editing the plugin: https://dedupedai.com/use-cases/aisland-sjl-dsh-usage/run-offline-tests-before-changing-plugin/

## How to watch DeepSeek balance and daily tokens in the Harness dock with DSH Usage

Repo: [Aisland-SJL/dsh-usage](https://github.com/Aisland-SJL/dsh-usage) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Install the plugin so balance, today's tokens, and cache hit stay visible while you work in dsh web.

**Who it is for:** A developer who runs DeepSeek Harness Web GUI daily and wants to see remaining credit and token burn without leaving the app.

**The problem:** Checking the DeepSeek balance and token usage means opening a separate dashboard, so spend can go unnoticed during long sessions.

**The outcome:** A pinned dock shows the balance, today and month token totals, and cache hit rate inside the Harness Web GUI, refreshing in the background every 5 minutes.

### Steps

1. Add your DeepSeek key in Harness credentials as DEEPSEEK_API_KEY, since the default credential ref for DeepSeek is that name.
2. Run `dsh plugin --profile web add "github:Aisland-SJL/dsh-usage"` to install the plugin into the Web profile.
3. Fully restart the web server with `dsh web`, then hard-refresh the browser.
4. Open the gear in the dock to choose which widgets to pin, collapse, or hide.
5. Click the refresh control in the dock to re-query the balance right away.

### Prompt to paste into your agent

```text
In the repo Aisland-SJL/dsh-usage, follow the install steps for the web profile and confirm the dock shows a DeepSeek balance value after a hard refresh of <dsh web URL>. Report the balance shown and whether the status is a number or a not-configured message.
```

### Caveat

The README says the plugin targets DeepSeek Harness 0.2.0-rc.2 and that a full 0.1.x-host regression has not been performed, so older hosts may not work.

Risk, credentials: The DeepSeek API key must be stored in Harness credentials, and you should never paste it into shared logs, screenshots, or agent prompts.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/aisland-sjl-dsh-usage/monitor-deepseek-balance-in-dsh-dock/

## How to see how tokens split between DSH and Claude Code with DSH Usage

Repo: [Aisland-SJL/dsh-usage](https://github.com/Aisland-SJL/dsh-usage) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Use the channel share widget to compare DSH and Claude Code token use from local logs.

**Who it is for:** A developer who uses both DeepSeek Harness and Claude Code and wants to know where their token budget actually goes.

**The problem:** Token use is spread across two tools, so there is no single view of which channel is doing most of the work.

**The outcome:** A channel share bar shows the ratio of DSH to Claude Code usage, built from aggregated numbers in ~/.claude/projects without sending message text anywhere.

### Steps

1. Install the plugin into the Web profile with `dsh plugin --profile web add "github:Aisland-SJL/dsh-usage"`.
2. Fully restart `dsh web` and hard-refresh the browser so the aggregation starts.
3. Open the detail panel and read the Channel share widget for the DSH versus Claude Code ratio.
4. Open the Usage log widget to drill into per-day and per-model detail for each period.
5. If the totals look wrong, check the coverage status in the usage response, since partial or unavailable coverage is labeled in the UI. (inferred, check the README)

### Prompt to paste into your agent

```text
In the repo Aisland-SJL/dsh-usage, open the Channel share widget in the dsh web panel at <dsh web URL> and report the DSH and Claude Code shares. Verify that the coverage state is shown as complete, partial, or unavailable before you trust the ratio.
```

### Caveat

Claude Code totals depend on the logs under ~/.claude/projects, and the README says unsupported historical formats are not repaired, so some sessions may be skipped.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/aisland-sjl-dsh-usage/compare-dsh-and-claude-code-token-share/

## How to track balances for OpenRouter, Z.ai, and Kimi together with DSH Usage

Repo: [Aisland-SJL/dsh-usage](https://github.com/Aisland-SJL/dsh-usage) | Difficulty: Advanced | Time: 45 minutes | Basis: From the README

Configure extra provider keys so the panel shows balances across several AI providers.

**Who it is for:** A person who pays for more than one model provider and wants all remaining credit in one place.

**The problem:** Each provider has its own billing page, so remaining balance is easy to forget until a request fails.

**The outcome:** The Balance widget shows each configured provider's balance, and unsupported providers show an explicit no-public-balance state.

### Steps

1. Add OPENROUTER_MANAGEMENT_KEY (a Management Key, not an inference key) and ZAI_API_KEY to Harness credentials.
2. Confirm Moonshot / Kimi profiles under llm-pi-ai exist, since they are discovered automatically and reuse their apiKeyEnv.
3. Install with `dsh plugin --profile web add "github:Aisland-SJL/dsh-usage"` and restart `dsh web`.
4. Use the provider picker in the Balance widget to switch between providers.
5. Press refresh to force an upstream query for the selected provider.

### Prompt to paste into your agent

```text
In the repo Aisland-SJL/dsh-usage, list the providers from the providers endpoint on <dsh web URL> and report each balance status. Verify that any provider without a key is reported as not configured rather than showing a guessed value.
```

### Caveat

The README says real account queries are separate acceptance work and that offline tests do not establish acceptance for every account.

Risk, credentials: Several provider keys are involved, and the OpenRouter key must be a Management Key, so check each key's scope before storing it in Harness.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/aisland-sjl-dsh-usage/track-multi-provider-balances/

## How to run the offline test suite before editing the plugin with DSH Usage

Repo: [Aisland-SJL/dsh-usage](https://github.com/Aisland-SJL/dsh-usage) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Install dependencies and run the checks and 112 offline tests on a development copy.

**Who it is for:** A contributor or agent that plans to change the DSH Usage code and needs a safe baseline first.

**The problem:** Changes to balance schemes, token folding, or the server boundary can break silently without a baseline test run.

**The outcome:** All syntax checks and offline tests pass on a clean checkout, giving a known starting point before edits.

### Steps

1. Clone the repository with `git clone https://github.com/Aisland-SJL/dsh-usage.git` and change into the folder. (inferred, check the README)
2. Run `npm install` to add react, react-dom, and jsdom for offline tests only.
3. Run `npm run check` to run syntax checks for every module and script.
4. Run `npm test` to run the 112 offline tests.
5. Run `npm run test:package` to check the runtime dependency and client inject contract.

### Prompt to paste into your agent

```text
In the repo Aisland-SJL/dsh-usage, run npm install, npm run check, and npm test, then report the pass count out of 112. Verify that no test touched the real ~/.dsh directory, as the README says the tests redirect DSH_HOME to a temp dir.
```

### Caveat

The README says the tests are offline and do not establish acceptance for every account, historical session, or Desktop feature.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/aisland-sjl-dsh-usage/run-offline-tests-before-changing-plugin/
