Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.capriole.ai/llms.txt

Use this file to discover all available pages before exploring further.

What is OpenCode?

OpenCode is a Go-based open-source command-line programming tool (CLI) that provides powerful AI assistance for developers.

Prerequisites

Before you begin, make sure you have:

Installation

Install OpenCode with the official install script:
curl -fsSL https://opencode.ai/install | bash
Or install it with npm:
npm install -g opencode-ai
Verify the install:
opencode --version

Configuration

Create or update ~/.config/opencode/opencode.json: Use apiKey for the GPT provider and authToken for the Claude provider.
{
  "$schema": "https://opencode.ai/config.json",
  "model": "capriole-ai-openai/openai/gpt-5.5",
  "small_model": "capriole-ai-openai/openai/gpt-5.5",
  "enabled_providers": ["capriole-ai-openai", "capriole-ai-claude"],
  "provider": {
    "capriole-ai-openai": {
      "npm": "@ai-sdk/openai",
      "name": "Capriole AI OpenAI",
      "options": {
        "baseURL": "https://api.caprioletech.com/v1",
        "apiKey": "{env:CAPRIOLE_AI_API_KEY}"
      },
      "models": {
        "openai/gpt-5.5": {
          "name": "GPT 5.5"
        }
      }
    },
    "capriole-ai-claude": {
      "npm": "@ai-sdk/anthropic",
      "name": "Capriole AI Claude",
      "options": {
        "baseURL": "https://api.caprioletech.com/v1",
        "authToken": "{env:CAPRIOLE_AI_API_KEY}"
      },
      "models": {
        "claude-opus-4-7": {
          "name": "Opus 4.7"
        }
      }
    }
  }
}

Start OpenCode

Set your API key, then start OpenCode:
export CAPRIOLE_AI_API_KEY="YOUR_CAPRIOLE_AI_API_KEY"
opencode

Supported models

OpenCode currently supports GPT 5.5 and Opus 4.7 through Capriole AI.