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

Prerequisites

Before you begin, ensure you have a Cerebras API Key. Get a free API key here.

Configure OpenCode

1

Install OpenCode in your terminal

Run the following:
curl -fsSL https://opencode.ai/install | bash
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!

Run the /models command to select a model:step3Now you can start coding!step4