CODING CLIENTS

opencode

Use opencode with your Yugos project key.

1. Install the launcher

Install opencode and Python 3.11 or newer, then install the yugos command. These commands work in macOS and Linux terminals.

curl -fsSL https://www.yugos.ai/install.sh | sh
export PATH="$HOME/.local/bin:$PATH"

The installer puts one command, yugos, in ~/.local/bin, after checking it against its published SHA-256. It runs yugos claude, yugos codex, yugos pi and yugos opencode. It stores no key, and Claude Code, Codex and opencode are configured only for the process it starts. If ~/.local/bin is not on your PATH, the installer adds it to your shell profile under a # yugos comment; set YUGOS_NO_MODIFY_PATH=1 to skip that. The export line above makes yugos available in the current terminal. You can inspect the installer and the script before running them, and rerun the installer to update. Your normal client arguments pass through, and --env staging uses the staging API. To uninstall, delete ~/.local/bin/yugos.

2. Add your project key

Create a key in API keys and add it to a .env file in your project. Keep the file out of source control. The paid yugos route requires credit in Billing.

YUGOS_API_KEY="<your project key>"

Run yugos from your project directory. It reads only the Yugos key from the nearest .env containing one, searching parent directories when needed. An exported key takes precedence. Use yugos opencode --env-file /path/to/.env to select a file explicitly. It does not execute the file or load its other variables.

3. Check and start

yugos check
yugos opencode

The check verifies authentication and the yugos model ID without sending an inference request. yugos applies its settings to this process and keeps your usual local permissions. Start a new conversation when changing providers or model routes.

How opencode is configured

yugos opencode passes a yugos provider in OPENCODE_CONFIG_CONTENT, opencode's inline config. It applies only to the opencode process it starts and is merged over your own opencode.json files, which are not changed. The provider looks like this:

{
  "model": "yugos/yugos",
  "small_model": "yugos/yugos",
  "provider": {
    "yugos": {
      "npm": "@ai-sdk/openai-compatible",
      "options": {
        "baseURL": "https://api.yugos.ai/v1",
        "apiKey": "{env:YUGOS_API_KEY}"
      },
      "models": { "yugos": { "name": "Yugos auto" }, … }
    }
  }
}

The key is never written to the config: opencode reads YUGOS_API_KEY from the environment yugos opencode starts it with. Session titles use small_model, so they also go through Yugos. The model list comes from the catalog, so every model can be pinned with /models or yugos opencode --model yugos/gpt-6-luna; yugos/yugos lets Yugos pick per request. Your other providers stay available.

4. Verify an interactive task

First ask for a short reply, then try this in a small test project:

Read example.py and change add(a, b) to return a + b. Make no other changes, then tell me what changed.

Create example.py with return a - b first. Approve the read and edit using your normal permissions, check the saved file, then send a follow-up message. This verifies streaming, local tools, and conversation continuity. The catalog check verifies the connection; this task also verifies the interactive tools.

opencode 1.19.5 was used for the November 5, 2026 compatibility checks. Use a current client and rerun the interactive check after upgrading. Yugos returns text and proposed tool calls; the client runs tools on your machine.

Inspect usage

Open Requests for the request receipt and Usage & spend for actual model costs. Client cost displays are estimates. opencode may retry a failed request on its own, and each retry is billed as a new request. See Routing & models for current capabilities. Images are not supported by this coding-client setup.

Troubleshooting

If opencode lists no Yugos models, start it with yugos opencode rather than opencode: plain opencode does not get the Yugos provider. If you set OPENCODE_CONFIG_CONTENT yourself, yugos opencode adds the provider to it and keeps your model choice; it refuses to start if that value is not valid JSON.