Skip to content

Configuration

martian7777 edited this page Jul 19, 2026 · 1 revision

Configuration

All settings, commands, modes, and keyboard shortcuts.


Extension Settings

opencode.serverUrl

  • Type: string · Default: "" (empty — auto-spawn)

Connect to an already-running opencode server. Leave empty to auto-spawn.

{ "opencode.serverUrl": "http://localhost:4096" }

opencode.binaryPath

  • Type: string · Default: "opencode"

Path to the opencode executable. Only used when auto-spawning.

{ "opencode.binaryPath": "/usr/local/bin/opencode" }

Commands

Command Description
opencode: Open in Editor Tab Open the GUI as a full editor tab
opencode: New Session Start a fresh conversation
opencode: Restart Server Restart the managed server (resets crash counter)

Execution Modes

Mode Icon Behavior
Manual Approve every tool action before it runs
Auto Auto-approve safe actions, prompt on risky ones
Bypass Approve everything automatically
Plan Read-only — forces the plan agent, no edits

Risky Action Patterns (Auto mode)

These patterns trigger a confirmation even in Auto mode:

bash, shell, exec, external, webfetch, fetch, network, doom, delete, rm, install, sudo


Keyboard Shortcuts

Key Context Action
Enter Input (no suggestions) Send message
Shift+Enter Input Insert newline
/ Suggestions visible Navigate suggestions
Enter / Tab Suggestions visible Accept suggestion
Escape Suggestions visible Dismiss suggestions

Environment Variables

Variable Purpose
PATH Locates the opencode binary
OPENAI_API_KEY OpenAI provider auth
ANTHROPIC_API_KEY Anthropic provider auth
GOOGLE_API_KEY Google provider auth

Recommended Setups

Minimal — no config needed, just install opencode and the extension.

Team server:

{ "opencode.serverUrl": "http://team-server:4096" }

Custom binary:

{ "opencode.binaryPath": "C:\\tools\\opencode.exe" }

Clone this wiki locally