Actions
macOS / Linux:
Alternatives: brew install anomalyco/tap/opencode or npm install -g opencode-ai
Windows: WSL recommended (then proceed as above). Alternatives: choco install opencode or npm install -g opencode-ai
Desktop app: https://opencode.ai/download
VS Code: open Extensions (Cmd+Shift+X on macOS, Ctrl+Shift+X on Windows), search for "OpenCode", install.
Important (curl install only): the install script places the binary in ~/.opencode/bin, which is not on your PATH by default. If opencode returns "command not found", add it to your PATH:
Run this in your terminal to fix the current session. To make it permanent, append the same line to ~/.zshrc (macOS default) or ~/.bashrc (most Linux), then restart your shell. The npm and brew install methods add the binary to PATH for you, so this step does not apply to them.
macOS / Linux (~/.zshrc or ~/.bashrc):
Windows PowerShell:
The three parameters mean:
"PHOENIQS_API_KEY", the environment variable name. Keep this exactly as written."your-api-key", replace with your MaaS API key."User", keep this exactly as written. It tells Windows to store the variable for your user account (it is not your Windows username).Open a new terminal afterward so the variable is loaded.
The file is not created automatically. Create the directory first:
Location: ~/.config/opencode/opencode.json Windows: C:\Users\<Username>\.config\opencode\opencode.json
File contents:
On first launch in a project, run /init to initialize the project structure.
Switch model mid-session:
echo $PHOENIQS_API_KEY./model matches an entry in opencode.json exactly, prefixed with phoeniqs/.