Get started
Launch OpenCode with Ollama:Capabilities
Chat
Ask questions about a repository or task
Command line
Run commands from your working directory
File edits
Read and edit files in your project
Subagents
Split work across tasks
Web fetch
Fetch and summarize web pages
Vision
Send images and screenshots
Models
Choose a model with enough context for your repository.Cloud models
Use larger models without downloading them.
Local models
Choose a model and set a 64k+ context window.
OpenCode requires a context length of 64k or higher. See Context length for more information.
Manual setup
1. Install OpenCode
2. Configure Ollama as a provider
Add an Ollama provider toopencode.json:
3. Run OpenCode
Configuration precedence
ollama launch opencode starts OpenCode with an inline config for the selected Ollama model. It does not overwrite ~/.config/opencode/opencode.json; existing OpenCode settings still apply.
Models defined only in opencode.json do not appear in the ollama launch model picker.
See OpenCode’s config precedence.
