Skip to content

Repository files navigation

dsh-commandcode-provider

English | 简体中文

Awesome GitHub Repo stars DeepSeek Harness PRs Welcome CI License: MIT npm

Unofficial DeepSeek Harness LLM provider plugin for Command Code, ported from pi-commandcode-provider (MIT).

This is a community integration. You need your own Command Code account and API key or subscription, and Command Code's terms apply. This project is not affiliated with Command Code, Inc.

What you get

  • Plugin bundle — install into any dsh profile with dsh plugin add; registers a commandcode provider route with a live model catalog.
  • Dedicated settings page — API key, connection options, a live account-usage card, and a "Hide out-of-plan models" toggle.
  • Multi-account rotation — when one account hits its usage limit, requests switch to the next account automatically. See Account rotation.
  • Flexible API key setup — via the settings page, an environment variable, or the official CLI login file.
  • Model-picker annotations — minimum plan, active deal or FREE badge, peak/off-peak state, image support, and context window; free models listed first.
  • Plan-aware picker — models above your subscription tier are hidden by default (toggleable).
  • Reasoning-effort support — models with selectable reasoning effort levels expose them in the picker.
  • Image input — Vision-capable models accept images.

See Screenshots below for what the UI looks like.

Install

dsh plugin --profile web add @mars-sea/dsh-commandcode-provider@latest

Updating

dsh plugin --profile web add @mars-sea/dsh-commandcode-provider@latest

Then restart the web app.

Getting an API key

The easiest path is the official CLI (Node.js 22+):

npm i -g command-code@latest
cmd login        # macOS/Linux; native Windows: cmdc login

Alternatively, create a key on the Keys settings page and paste it into Settings → Command Code, or export COMMANDCODE_API_KEY="user_...".

Verify it works

After restart, enter your API key in Settings → Command Code and save; Settings → Models shows a Command Code card, and the model picker lists the live catalog under commandcode. Send a message with a model your plan includes.

Usage dashboard

The plugin registers a /commandcode slash command showing per-account usage:

/commandcode        (or /commandcode status)

Account rotation

With several Command Code subscriptions, the plugin switches to the next account automatically when one hits its usage limit:

  • Setup — use the Account rotation card at Settings → Command Code to add accounts with a label and API key; the top-level key always serves first as the default account.
  • Manual switching — the Active account dropdown pins a preferred account; if it is exhausted, requests fall back to other accounts and return once its window resets.
  • Status — the Account usage card and /commandcode report per-account state.

The equivalent YAML ($DSH_HOME/settings.yaml or composition config):

llm-commandcode:
  apiKeyEnv: COMMANDCODE_API_KEY        # first (default) account
  activeAccount: COMMANDCODE_API_KEY_2   # optional: pin the active account (`default` or an account's credential ref)
  accounts:                              # rotation order after it
    - label: Go #2
      apiKeyEnv: COMMANDCODE_API_KEY_2
    - label: Go #3
      apiKeyEnv: COMMANDCODE_API_KEY_3

Configure

Settings → Command Code covers the API key, API base URL, working directory, and request/stream timeouts; once a key is saved, a live Account usage card appears at the top of the page.

The same options live in $DSH_HOME/settings.yaml (changes apply immediately, no restart):

llm-commandcode:
  apiKeyEnv: COMMANDCODE_API_KEY   # credential reference
  apiBase: https://api.commandcode.ai
  workingDir: /path/to/project     # optional
  modelsCachePath: ~/.commandcode/models-cache.json
  requestTimeoutMs: 60000          # default 60s
  streamIdleTimeoutMs: 300000      # default 300s

Notes & limitations

  • Image input is model-gated — only Vision models accept images; text-only models refuse them.
  • Switching to a text-only model in an image-bearing session is rejected by dsh — pick a model marked Image or remove the images first.
  • No stop sequences — requests carrying one fail.
  • Reasoning blocks are not replayed into later turns; only tool calls with a paired tool result are replayed.
  • The model catalog is browsable without a key; chat requests need one.

Permissions & privacy

The plugin only communicates between your local dsh profile and your Command Code account: locally it touches only the credential store and the models cache (plus ~/.commandcode/auth.json as a last-resort fallback); on the network it calls only the Command Code API. No telemetry.

Disabling / uninstalling

  • Disable without removing: edit your profile's cordis.patch.yml and comment out (or remove) the llm-commandcode row, or set disabled: true, then restart.

  • Uninstall completely:

    dsh plugin --profile web remove @mars-sea/dsh-commandcode-provider

    Your API key in the dsh credential store and ~/.commandcode/auth.json are left untouched.

Development

npm install
npm run typecheck   # tsc --noEmit
npm run build       # tsdown -> lib/

To try a local build in a profile:

dsh plugin --profile web add /path/to/dsh-commandcode-provider

After changing src/, re-run npm run build and restart the app.

Community & feedback

License

MIT — see LICENSE. Portions ported from pi-commandcode-provider (MIT).

Screenshots

Model picker — plan tier, deal/FREE, peak/off-peak, Image and context annotations:

Model picker with plan, deal, image and context annotations

Usage dashboard/commandcode per-account report:

Usage dashboard

Settings page — API key, connection knobs, account rotation and the live account-usage card:

Command Code settings page with the account usage card

About

Unofficial DeepSeek Harness LLM provider plugin for Command Code: live model catalog, reasoning-effort support, Models-page card. Ported from pi-commandcode-provider (MIT).

Topics

Resources

Stars

87 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages