Skip to content

About

One-command setup helper for connecting CommandCode Bridge to Hermes Agent

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CommandCode → Hermes Setup

One-command setup for connecting CommandCode to Hermes Agent through the local OpenAI-compatible commandcode-bridge.

Use only with an account and access that you are authorized to use. This project installs a local adapter; it does not provide CommandCode access, bypass billing, or include upstream credentials.

What it installs

Hermes Agent → http://127.0.0.1:9992/v1 → commandcode-bridge → CommandCode

The setup script:

  • checks Linux, Node.js 20+, npm, Hermes, and Git;
  • clones the upstream bridge into a temporary directory and runs its official installer;
  • keeps the bridge localhost-only by default;
  • generates a bridge client key through the upstream installer;
  • registers custom:commandcode in Hermes using hermes config set;
  • verifies bridge health, authenticated model discovery, and a Hermes request;
  • leaves your existing Hermes default model unchanged unless --use is supplied.

Secrets are never committed or printed by this repository.

Quick start

git clone https://github.com/mrayhanfadil/commandcode-hermes-setup.git
cd commandcode-hermes-setup
./setup.sh

The setup uses an existing ~/.commandcode/auth.json when available. If you use an explicit upstream key, pass it through a protected mechanism such as an environment-expanded command or edit the upstream installer flow locally; avoid putting secrets directly into shell history or process arguments.

For a non-interactive local install:

./setup.sh --yes

Use the provider as an explicit Hermes provider:

hermes chat --provider custom:commandcode -m gpt-5.6-luna -q 'Reply exactly COMMANDCODE_HERMES_OK'

Or make it the Hermes default during setup:

./setup.sh --yes --use --model gpt-5.6-luna

Requirements

  • Linux with user systemd (systemctl --user)
  • Node.js 20 or newer
  • npm and Git
  • Hermes Agent installed and available as hermes
  • A CommandCode CLI/account setup, or an authorized CommandCode upstream API key
  • Credits/access for the model you select

The upstream installer may ask to install the official command-code npm package and may require cmd login first.

Options

--yes                  Accept safe defaults; use existing ~/.commandcode/auth.json when available
--host HOST            Bridge bind host; default 127.0.0.1
--port PORT            Bridge port; default 9992
--model MODEL          Hermes provider default model; default gpt-5.6-luna
--models CSV           Allowed upstream models; default deepseek/deepseek-v4-pro,deepseek/deepseek-v4-flash,gpt-5.6-luna
--use                  Set Hermes model.default/provider after verification
--no-start             Install bridge files but do not start its systemd service
--bridge-ref REF       Upstream bridge git ref; default main
--skip-smoke           Skip the live Hermes completion smoke test
--help                Show help

For a LAN or tailnet deployment, explicitly opt in:

./setup.sh --host 0.0.0.0 --port 9992

Do this only behind a trusted private network and with a strong bridge API key. The default 127.0.0.1 binding is safer.

Verify later

systemctl --user status commandcode-bridge --no-pager
curl -fsS http://127.0.0.1:9992/health
hermes chat -Q --provider custom:commandcode -m gpt-5.6-luna \
  -q 'Reply exactly COMMANDCODE_HERMES_OK'

If the model returns an upstream balance, access, or plan error, the installation can still be healthy. Check the service log:

journalctl --user -u commandcode-bridge -n 80 --no-pager

Uninstall

Stop and remove the bridge using the upstream uninstaller while preserving credentials by default:

cd ~/.local/share/commandcode-bridge
./uninstall.sh

To remove the private bridge environment too:

./uninstall.sh --purge-config

The setup repository does not delete Hermes provider configuration automatically, because doing so could remove a user's unrelated configuration. Remove or edit providers.commandcode with the official Hermes config interface if desired.

Security notes

  • Do not paste COMMANDCODE_API_KEY or BRIDGE_API_KEY into GitHub issues, README files, or chat.
  • Keep the bridge on 127.0.0.1 unless remote access is genuinely required.
  • The bridge client key is stored in Hermes' private .env; the upstream key is stored in the bridge's private env/auth file.
  • This repository is a setup helper, not an official CommandCode product. The upstream bridge's alpha/internal route may change.
  • Review the upstream bridge source and license before installing it in a production environment.

License

MIT. See LICENSE.

The upstream commandcode-bridge remains a separate project under its own license and repository.

Decision log

  • Wrapper instead of a fork: keeps the setup repository small and lets friends receive upstream bridge fixes.
  • Localhost by default: avoids accidentally exposing an authenticated model endpoint on a LAN.
  • Explicit provider by default: setup should not silently replace an existing Hermes model.
  • Live verification: a healthy process alone is not enough; the script checks bridge discovery and Hermes integration.
  • No secrets in repo: credentials stay in mode-600 local env files managed by the upstream installer and Hermes.

Disclaimer

CommandCode and Hermes Agent are third-party projects. This repository is an unofficial integration helper. Users are responsible for complying with the terms, access rules, and applicable policies of every service they use.

About

One-command setup helper for connecting CommandCode Bridge to Hermes Agent

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages