1 Install CLI and Desktop apps#
# OpenCode 2 CLI and destop
brew install anomalyco/tap/opencode-v2 && brew install --cask opencode-desktop# Check MCP's
opencode mcp list-
Command palette shortcuts, press Cmd + Shift + P (or Cmd + P) and search for
-
Press ⌘⇧A (Command + Shift + A): Toggle Auto-Approve to bypass terminal execution prompts for that active session
-
The main shared configuration is: ~/.config/opencode/opencode.json
-
CLI-specific configuration is: ~/.config/opencode/cli.json
2 Guide: Configuring a 64k Context in Ollama and OpenCode v2#
For local coding agents, a larger context window can accommodate instructions, tool results, and conversation history. Ollama recommends at least 64k tokens for agent and coding tasks, but this uses more memory; confirm that the model and hardware can handle it. Ollama’s default allocated context varies with available VRAM (currently 4k below 24 GiB, 32k at 24–48 GiB, and 256k at 48 GiB or more).