OpenCode
OpenCode is an open-source command-line AI coding assistant that supports multiple AI providers to help you write code, debug, and manage projects.
About OpenCode
OpenCode is an open-source command-line AI coding assistant. It supports multiple AI providers (including OpenAI, Anthropic, Google, etc.) and can be used directly in your terminal to help you write code, debug issues, understand codebases, and perform various development tasks.
Installation
Using Go
go install github.com/opencode-ai/opencode@latestUsing Homebrew (macOS/Linux)
brew install opencode-ai/tap/opencodeUsing Install Script
curl -fsSL https://opencode.ai/install.sh | bashConfiguration Steps
OpenCode supports configuration through config files or environment variables.
Method 1: Using Config File (Recommended)
Create an opencode.json file in your project root or ~/.config/opencode/ directory:
{
"provider": "anthropic",
"providers": {
"anthropic": {
"apiKey": "your_kouri_token",
"baseURL": "https://api.kourichat.com"
}
},
"model": "claude-sonnet-4-5-20250929"
}You can also use OpenAI compatible mode:
{
"provider": "openai",
"providers": {
"openai": {
"apiKey": "your_kouri_token",
"baseURL": "https://api.kourichat.com/v1"
}
},
"model": "gpt-4o"
}Method 2: Using Environment Variables
For Anthropic mode:
export ANTHROPIC_API_KEY="your_kouri_token"
export ANTHROPIC_BASE_URL="https://api.kourichat.com"For OpenAI compatible mode:
export OPENAI_API_KEY="your_kouri_token"
export OPENAI_BASE_URL="https://api.kourichat.com/v1"Add the above commands to your shell configuration file (~/.zshrc or ~/.bashrc) to make them permanent.
Start Using
After configuration, run the following command in your terminal to start OpenCode:
opencodeCommon commands:
# View help
opencode --help
# Ask a question directly
opencode "How to implement quicksort in Python?"
# Specify model
opencode --model claude-sonnet-4-5-20250929 "Explain this code"
# Start an interactive session in the current directory
opencodeConfiguration Options
| Option | Description |
|---|---|
provider | AI provider, options include openai, anthropic, google, etc. |
baseURL | API base URL, set to https://api.kourichat.com or https://api.kourichat.com/v1 |
apiKey | Your Kouri Ai token |
model | Model name to use |
Make sure to replace your_kouri_token with your actual Kouri Ai API token.
OpenCode is an open-source project that supports multiple AI providers. When using Kouri Ai, you can choose between OpenAI compatible mode or Anthropic mode based on your needs.
More Information
For more advanced features and usage, please refer to the OpenCode GitHub Repository.
Claude Code
Claude Code is Anthropic's command-line AI coding assistant that helps you write code, debug, and manage projects.
OpenClaw
OpenClaw is an open-source personal AI assistant that supports WhatsApp, Discord, Telegram, and more. Configure Kouri Ai models to power your OpenClaw instance with high-quality AI at low cost.