Before you begin
- A terminal and a local project folder.
- Credentials for your chosen model provider. Available models and usage depend on that provider.
- Already using OpenCode 1? Back up your configuration and read the migration guide before switching. V1 and V2 share configuration locations.
Authentication and access are managed directly by each provider.
Install your CLI
This guide covers OpenCode 2. On macOS, choose the installer or Homebrew. On Linux, use the installer. On Windows, get the standalone CLI for your architecture from the official setup documentation; V2 does not support Windows package managers.
Continue in the official documentation
Choose one installation method. Copy the command for your system and run it in your own terminal.
curl -fsSL https://opencode.ai/v2/install | bashbrew install anomalyco/tap/opencode-v2Check the installation
Check that the displayed version starts with 2. If it shows 1, another OpenCode installation may be taking precedence in your PATH.
opencode --versionSign in and start
Open a terminal in a project folder you want to work with, then start the CLI:
opencodeInside OpenCode, run /connect, choose your provider, and follow its authentication steps. Then run /models and select an available model. These are commands for the OpenCode interface, rather than your shell.
/connect/modelsTry your first task
Begin by asking for an explanation of the project. Review the response before requesting edits.
Explain the structure of this project without modifying files.
If something goes wrong
The terminal cannot find opencode
Open a new terminal and check whether your installation directory is included in PATH.
No model is available
Repeat /connect and /models inside OpenCode. Check your provider credentials and model access.
A session will not start
Check the background service with the command below. See the official troubleshooting guide before changing service files or session data.
Existing plugins fail after switching versions
V1 plugin implementations require migration for V2. Consult the migration guide before enabling them.
opencode service statusKeep it up to date
Keep using the same V2 installation channel. Review its current update instructions in the official setup documentation, then check opencode --version again.
Official sources
- OpenCode · Setup
- OpenCode · CLI
- OpenCode · Providers
- OpenCode · Troubleshooting
- OpenCode · Migration from V1
These are independent guides to the providers’ tools. ORQST integration availability follows the product roadmap.
