Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Emanuele-web04/synara/llms.txt

Use this file to discover all available pages before exploring further.

OpenCode is an open-source, terminal-native AI coding assistant that exposes a local HTTP server your editor or orchestration layer can talk to. Synara integrates with OpenCode through that server API — it can either launch the opencode binary on demand and manage its lifecycle automatically, or connect to an already-running remote OpenCode server you control.
OpenCode support in Synara is tracked under the opencode provider kind. Model slugs follow OpenCode’s <providerID>/<modelID> convention (e.g. openai/gpt-5). See Concepts: Providers for background on how providers work in Synara.

Prerequisites

You need one of the following before enabling this provider:
  • Local binary mode — the opencode CLI must be installed and available on your PATH, or you must supply a full path to the binary via binaryPath.
  • Remote server mode — a reachable OpenCode server URL and, if the server requires authentication, its password.

Configuration

Provider settings live in the providers.opencode block of your Synara settings.json. See Configuration: Settings for the full settings file reference.
enabled
boolean
default:"true"
Enables or disables the OpenCode provider. When false, Synara will not attempt to start or connect to OpenCode.
binaryPath
string
default:"opencode"
Path to the opencode executable. Accepts a bare binary name (resolved from PATH) or an absolute/relative path. Only used in local binary mode.
serverUrl
string
default:""
URL of a remote OpenCode server (e.g. http://192.168.1.50:4000). When set, Synara skips launching a local process and connects directly to this server. Leave empty to use local binary mode.
serverPassword
string
default:""
Password for HTTP Basic authentication against the remote server. Only used when serverUrl is set. Leave empty if the server does not require authentication.
experimentalWebSockets
boolean
default:"false"
Enables the experimental WebSocket transport when starting a local OpenCode server process. Has no effect in remote server mode. This feature is not yet stable — enable it only for testing.
customModels
string[]
Additional model slugs to surface in the model picker alongside the built-in list. Each entry must follow OpenCode’s <providerID>/<modelID> format (e.g. "anthropic/claude-opus-4-6").

Built-in models

Synara ships with the following OpenCode model slug pre-configured:
SlugName
openai/gpt-5OpenAI GPT-5
Additional models available through your OpenCode providers can be added via customModels.

Local binary vs remote server

Synara picks the mode based on whether serverUrl is populated. Local binary mode (default): Synara spawns an opencode serve process in the background on an available port, waits up to 20 seconds for it to report a listening URL, and tears it down when no active sessions need it. The server is pooled across concurrent threads so only one process runs per unique binary path.
The local server idles for 5 minutes after all sessions close before Synara shuts it down. Starting a new thread reconnects to the warm server immediately, avoiding a cold-start delay.
Remote server mode: When serverUrl is non-empty, Synara skips process management entirely and connects directly to the URL you provide. Use this when you run OpenCode on a separate machine, inside a container, or via a shared team server.
Synara forwards your serverPassword as an HTTP Basic credential. Use HTTPS for the serverUrl in production environments so the credential is not transmitted in plain text.

Example settings.json

The following snippets show both modes. You only need one block in your actual configuration file.
{
  "providers": {
    "opencode": {
      "enabled": true,
      "binaryPath": "/usr/local/bin/opencode",
      "customModels": ["anthropic/claude-opus-4-6"]
    }
  }
}

Build docs developers (and LLMs) love