Skip to main content
OpenCode is a 100% open-source, terminal-focused AI coding assistant that runs multiple models and integrates deeply with developer tools for coding automation.

Prerequisites

Before you begin, ensure you have a Cerebras API Key. Get an API key from the Cerebras Cloud console.
Paid tier required. This integration is only available on paid Cerebras plans. Visit the Cloud Console to upgrade your plan.

Configure OpenCode

1

Install OpenCode in your terminal

Run the following:
curl -fsSL https://opencode.ai/install | bash
After installation, reload your shell configuration so the opencode command is available in your current session:
source ~/.zshrc
If you use bash, run source ~/.bashrc instead.
2

Select Cerebras

Run the following command, then select Cerebras from the dropdown menu:
opencode auth login
step1
3

Configure API key

Enter your Cerebras API key:step2
4

Select a model and start coding!

Launch OpenCode in your project directory:
opencode
Once inside the OpenCode interface, type /models and press Enter to open the model selector. Choose a Cerebras model from the list.step3Now you can start coding!step4

Available Models

OpenCode supports all Cerebras models for AI coding assistance:
ModelParametersBest For
gpt-oss-120b120BLargest model for the most demanding tasks
zai-glm-4.7357BAdvanced 357B parameter model with strong reasoning capabilities
You can switch between models at any time by typing /models inside the OpenCode interface.