Skip to content

OpenCode

Account & API Keys Setup

The first step to start using Siraya AI is to create an account and get your API key.

Installation

Start with the one-liner curl install - no Docker or complex deps needed:

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

This adds the opencode CLI globally.

Verify with opencode --version, then launch via opencode.

For VS Code integration, it pairs seamlessly as an LSP client.

Full docs: opencode.ai/docs​​

Setup guide

Siraya AI powers model access via its OpenAI-compatible API .​​​

Export these env vars (add to \~/.zshrc for persistence):

export OPENAI_API_BASE=https://llm.siraya.pro/v1
export OPENAI_API_KEY=your-siraya-api-key

Source your shell (source ~/.zshrc) and relaunch.

Basic Usage

Run opencode in a repo to init: It prompts project context, then use slash commands in the TUI.​

  • /connect: Link Siraya AI (auto-detects env vars).
  • /models: List/select (e.g., Claude 3.5 Sonnet or Gemini 3 Flash).
  • /init: Scans repo, suggests plan (e.g., "Analyze main.rs and create layers").
  • Core flow: /plan for outline, /build to generate/run code, /improve for refinements.