Skip to content

OpenCode Guide

OpenCode is an open-source AI coding assistant framework. It supports integration with multiple AI models, including code generation, modification, and review workflows.

Installation

Choose an installation method based on your workflow.

macOS / Linux

bash
curl -fsSL https://opencode.ai/install | bash

Windows PowerShell

Using WSL is recommended. Install it with the macOS / Linux method above inside WSL.

Connect to GoRouter

After installation, choose one of the following methods to connect OpenCode to GoRouter.

Using CC-Switch is recommended for centralized configuration.

Steps:

  1. Follow Create API Key to generate an API key.
  2. Follow CC-Switch to configure a unified provider.
  3. Restart OpenCode after configuration is complete.