Install
The curl install script is not available in beta.
- npm
- bun
- pnpm
- Yarn
During beta, the binary is called
opencode2.Homebrew
Homebrew installation is not available in beta.Arch Linux
Arch Linux installation is not available in beta.Windows
- chocolatey
- scoop
- mise
- docker
Chocolatey installation is not available in beta.
Prerequisites
To use OpenCode in your terminal, you’ll need:- A modern terminal emulator like:
- API keys for the LLM providers you want to use.
Connect
With OpenCode you can use any LLM provider by configuring its API key. Run/connect in the TUI and select your provider.
/models to browse the providers and models available to your project. See Providers for connection and
configuration details.
Usage
You are now ready to use OpenCode in your project. Here are a few common workflows.Ask questions
Ask OpenCode to explain your codebase.Add features
Ask OpenCode to add a feature by describing the desired behavior and providing relevant context.Undo changes
Use/undo when a change isn’t what you wanted.
/undo multiple times to move the conversation
boundary back, or use /redo to restore the staged conversation and files. See Undo for
limitations and safety details.