OpenCode
Type
Topic
Status
Published
Created
Jun 17, 2026
Updated
Jun 17, 2026

OpenCode#

OpenCode is an open source, terminal-first AI coding agent available in Bluefin as part of the Bluespeed AI tooling suite. It ships two distinct packages: a CLI (opencode) for headless/TUI use and a desktop client (opencode-desktop-linux) for a GUI-wrapped experience. It is distinct from Goose (Bluefin's primary AI agent), RamaLama (local LLM backend), and the broader AI Integration layer.

Installation#

Both packages are bundled in the ai-tools.Brewfile and installed via:

ujust bbrew # select the "ai" bundle
PackageTypeTapNotes
anomalyco/tap/opencodebrew (CLI/TUI)anomalyco/tapStable
ublue-os/experimental-tap/opencode-desktop-linuxcask (desktop app)ublue-os/experimental-tapExperimental

The desktop cask (opencode-desktop-linux) was introduced at v1.1.15 and lives in the experimental tap. The CLI is available on Homebrew formulae directly.

Note: autoupdate in OpenCode's own config only works when installed outside of a package manager — when installed via Homebrew, updates come through brew upgrade.

Configuration#

OpenCode uses JSON or JSONC (JSON with Comments) files validated against the schema at opencode.ai/config.json.

Config file locations (in precedence order)#

PriorityLocationPurpose
1 (lowest)Remote .well-known/opencodeOrg-wide defaults
2~/.config/opencode/opencode.jsonGlobal user config
3OPENCODE_CONFIG env varCustom path override
4opencode.json in project rootPer-project settings
5.opencode/ directoriesAgents, commands, plugins
6OPENCODE_CONFIG_CONTENT env varInline runtime override
7/etc/opencode/opencode.json (Linux)Admin-enforced, non-overridable

Configs are merged, not replaced — non-conflicting keys from all sources are preserved.

Key config options#

KeyPurposeExample value
modelPrimary model"anthropic/claude-sonnet-4-5"
small_modelLightweight tasks (title gen, etc.)"anthropic/claude-haiku-4-5"
permissionTool approval gates{"bash": "ask", "edit": "ask"}
mcpMCP server connectionssee MCP section below
autoupdateSelf-update on launchfalse (when using Homebrew)
shareConversation sharing"manual" / "auto" / "disabled"
lspLSP server integrationtrue
snapshotUndo/revert trackingtrue (default)
default_agentDefault built-in agent"build" / "plan"
disabled_providersBlock specific providers["openai"]

See the full config reference for all options.

Permissions#

By default, OpenCode allows all operations without prompting. Gate specific tools with "ask" or "deny":

// ~/.config/opencode/opencode.json
{
  "$schema": "https://opencode.ai/config.json",
  "permission": {
    "bash": "ask",
    "edit": "ask"
  }
}

MCP Integration#

OpenCode supports Model Context Protocol servers natively via the mcp key. To connect the linux-mcp-server (also available in the ai-tools bundle at line 16 of the Brewfile ):

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "linux-tools": {
      "type": "local",
      "command": ["linux-mcp-server"],
      "enabled": true
    }
  }
}

Remote MCP servers (with OAuth) are also supported via "type": "remote" and a URL.

TUI-specific config#

TUI settings (themes, keybinds, scroll, notifications) live in a separate tui.json file alongside opencode.json, validated against opencode.ai/tui.json. Legacy theme/keybinds/tui keys in opencode.json are deprecated.