Skip to content

OpenCode

Prerequisites

  1. Node.js 18+
  2. OpenCode – install and authenticate per the OpenCode docs

Install & Run

bash
# Install daemon
npm install -g @cmdctrl/opencode

# Register
cmdctrl-opencode register -s https://api.cmd-ctrl.ai

# Start
cmdctrl-opencode start

How It Works

The daemon starts opencode serve as a background process and communicates with it over a local HTTP API. Each task creates a new OpenCode session; replies continue the same session.

Troubleshooting

"opencode not found" – Ensure opencode is in your PATH: which opencode

"Failed to start opencode" – Try running opencode serve manually to check for errors.

Session not appearing – The daemon scopes sessions to its working directory. Start the daemon from your project root.