Skip to main content
OpenCode is one of the most powerful open-source AI coding agents available today. This guide walks you through integrating SiliconFlow APIs with OpenCode to leverage high-performance models in your development workflow.

Step 1: Install OpenCode

Install OpenCode by running the following command in your terminal:
curl -fsSL https://opencode.ai/install | bash
*Note: This guide demonstrates CLI-based setup for quick integration. OpenCode also offers multiple installation options including desktop app, IDE extensions and platform integrations to fit different workflows:
  • Terminal CLI: Install via curl, npm, Homebrew, or system package managers
  • Desktop app (Beta): Available for macOS, Windows, and Linux
  • IDE extensions: Integrates with VS Code, Cursor, Zed, Windsurf, and VSCodium
  • Platform integrations: Connect with GitHub and GitLab
Visit OpenCode’s official download page for more details.

Step 2: Launch OpenCode

Runopencodein your terminal to launch OpenCode:
opencode

Step 3: Configure SiliconFlow

  • Connect to SiliconFlow: Enter /connect in the OpenCode to open the API provider selection page
  • Select SiliconFlow: Choose SiliconFlow from the available providers
  • Add API Key: Get your SiliconFlow API key and paste it when prompted
  • Select Models: Run /models to access powerful models including:
    • deepseek-ai/DeepSeek-V3.2
    • moonshotai/Kimi-K2-Thinking
    • MiniMaxAI/MiniMax-M2.1
    • zai-org/GLM-4.7
    • And more
You’re all set! Start coding with AI-powered assistance by asking OpenCode to help with your development tasks with SoTA models.

OpenCode Command Shortcut

Below is a quick reference of commonly used OpenCode commands and agents to help you navigate:
CommandActionDescription
/modelsSwitch ModelsAccess the list of available models and switch between them to suit specific tasks.
/newNew SessionClear the current context and return to the main interface to start a new task session。
/compactCompress ContextCompress conversation history to reduce token usage while preserving key context.
/initBuilt-in commandsCreate or update AGENTS.md file. Learn more.
/undoUndo Previous MessageUndo the last message in the conversation.
Tip: Any file changes made will also be reverted.
/shareCreate public linksAllows you to create public links to your OpenCode conversations, so you can collaborate with teammates or get help from others.
NOTE: Shared conversations are publicly accessible to anyone with the link.
/exitexit the appSafely close the agent and return to your standard terminal.
For more details, please refer to the official OpenCode documentation.