Docs Guides
Guide

OpenCode Setup

Official docs

Install OpenCode first

Official docs

With Node.js

npm install -g opencode-ai
json

Configure a provider

https://opencode.ai/docs/providers/

Two places to configure
Provider config (create the file if missing)
~ is the user home directory, e.g. C:\Users\admin on Windows
~/.config/opencode/opencode.json { "$schema": "https://opencode.ai/config.json", "provider": { "anthropic": { "options": { "baseURL": "https://api.digislash.com/v1" } } } }
json
Here we override the existing Anthropic base URL
API key config
~/.local/share/opencode/auth.json { "google": { "type": "api", "key": "1111111111111111111" }, "anthropic": { "type": "api", "key": "sk-xxxxxxxxxxxxx" } }
json
Open a terminal

image.png

Type /models

image.png

Pick an Anthropic model

image.png

Start using it

image.png