A Hermes provider bridge for using Hermes Agent with a Command Code Go subscription.
Command Code Go subscriptions can authenticate the Command Code CLI, but they do not include direct access to the Command Code provider API. This plugin works around that limitation for personal Hermes usage by running a local OpenAI-compatible bridge backed by your existing Command Code subscription login.
Chinese explanation: 为什么 Go 订阅可以这样使用.
This project provides:
- a Hermes
model-providerplugin namedcommandcode - a local OpenAI-compatible bridge at
http://127.0.0.1:8788/v1 - model metadata with
context_lengthso Hermes context usage displays correctly - streaming
usagechunks so Hermes updates token/session statistics - tool-call translation between OpenAI Chat Completions and Command Code events
- reasoning event translation so thinking-only turns can continue correctly
- macOS or Linux
- Hermes Agent v0.14.0 or newer
curl- Python 3
- a Command Code login or API key
Authenticate with Command Code first:
cmd loginOr export an API key:
export COMMANDCODE_API_KEY="..."The bridge also reads ~/.commandcode/auth.json and ~/.pi/agent/auth.json.
git clone https://github.com/MitoroMisaka/hermes-commandcode-provider.git
cd hermes-commandcode-provider
./install.sh --configureinstall.sh copies the provider plugin, bridge, and helper command into your
Hermes home. With --configure, it also updates ~/.hermes/config.yaml and
backs it up first. It also applies small Hermes compatibility patches for
Command Code:
- the model picker counts model-provider plugin fallback models correctly
hermes doctoraccepts Command Code slash-form model ids
Start Hermes normally after configuration:
hermesOr run a one-shot test:
hermes -z 'Reply with exactly OK.'You can also use the helper, which starts the local bridge before running Hermes:
hermes-commandcode -z 'Reply with exactly OK.'Switch models explicitly:
hermes --provider commandcode -m moonshotai/Kimi-K2.5 -z 'Reply with exactly OK.'
hermes --provider commandcode -m deepseek/deepseek-v4-flash -z 'Reply with exactly OK.'The bridge exposes the live Command Code /provider/v1/models catalog when
available, and falls back to a bundled catalog. Known context windows include:
| Model | Context |
|---|---|
moonshotai/Kimi-K2.6 |
256000 |
moonshotai/Kimi-K2.5 |
256000 |
deepseek/deepseek-v4-flash |
1000000 |
deepseek/deepseek-v4-pro |
1000000 |
claude-sonnet-4-6 |
1000000 |
claude-opus-4-7 |
1000000 |
gpt-5.4 |
400000 |
xiaomi/mimo-v2.5-pro |
1000000 |
xiaomi/mimo-v2.5 |
1000000 |
./scripts/smoke_test.shThe smoke test checks:
/v1/modelsreturns model metadata and context lengths- non-streaming chat works
- streaming chat returns a final
usagechunk - tool calls are translated correctly
- reasoning deltas are preserved as
reasoning_content
Some Hermes versions warn that slash-form model ids such as
moonshotai/Kimi-K2.5 are "vendor-prefixed" and should belong to aggregators.
Command Code legitimately uses these ids.
If your Hermes version shows that warning, either ignore it or run:
./scripts/patch_doctor.pyThe patch only adds commandcode to the doctor allowlist for slash-form model ids.
Some Hermes versions auto-discover user-installed model-provider plugins but do
not count their fallback_models on the first provider picker screen. In that
case, Command Code can show as 0 models even though opening it displays the
models and switching works.
Run this compatibility patch if needed:
./scripts/patch_model_picker.pyThe patch only teaches the provider overview to count fallback models declared by installed model-provider plugins.
~/.hermes/commandcode_proxy.py
~/.hermes/plugins/model-providers/commandcode/__init__.py
~/.hermes/plugins/model-providers/commandcode/plugin.yaml
~/.local/bin/hermes-commandcode
No token is written into this repository. The bridge reads your existing Command Code auth at runtime.