返回插件市场

dsh-commandcode-provider

模型与数据

Mars-Sea/dsh-commandcode-provider

非官方的 DeepSeek Harness LLM 提供商插件,用于 Command Code,支持实时模型目录与推理强度。

  • deepseek-harness
  • dsh
  • dsh-plugin
  • llm
  • llm-provider
  • npm
  • plugin
  • provider
  • typescript
GitHub Stars
87GitHub
浏览量
0DSH Plugin Hub
Forks
6GitHub
开放问题
0GitHub Issues
Manifest 版本
0.6.2@mars-sea/dsh-commandcode-provider
最近推送
2026年8月21日GitHub
许可证
MITTypeScript
插件类型
Host + Client同时运行于 Host 与 Web Client

README

查看源文件

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.
  • In-browser sign-in for keys — start the official authorization flow (the same one cmd login runs) from the settings page; the approved key lands in the local credential service automatically. Manual paste remains the fallback.
  • 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 update @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

Or skip the CLI: click Sign in to Command Code under Settings → Command Code — your browser opens the commandcode.ai authorization page (the same flow cmd login uses) and the key is stored in the local credential service when you approve. You can still create a key on the Keys settings page and paste it into Settings → Command Code, or export COMMANDCODE_API_KEY="user_...".

The sign-in flow needs the Host and your browser on the same machine (loopback callback). With a remote Host, paste the key manually; a literal composition-level apiKey, if set, still takes precedence over a signed-in credential.

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:

Usage dashboard/commandcode per-account report:

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

评论

0
最新优先