selan.ai Gateway Reactor
Apps

Docs · OpenCode

Run OpenCode on your company's accounts

One command instead of opencode, and every argument passes through. The same models, connectors and limits as Claude Code and Codex. For how the pieces fit together, start at the docs.

Get started

What do I need before I start?

OpenCode 2. Selan launches it; it does not bundle it. On macOS or Linux, install it with Homebrew:

brew install opencode

or with OpenCode's own installer:

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

On Windows:

scoop install opencode

You also need selan 1.24.0 or later. If you have an older one, selan update replaces it in place. If you have no selan or no session yet, see Install and Sign in. One session serves every client, OpenCode included.

How do I run OpenCode through Selan?

selan opencode

OpenCode opens its own screen on a provider called Selan, with your company's models, connectors and skills in it. Every argument goes to OpenCode as typed, so one prompt without the screen is:

selan opencode run "fix the tests"

and selan opencode --help is OpenCode's own help. Selan's page for the command is selan help opencode.

What does Selan write to my OpenCode config?

Nothing. No credential lands on disk either. Each launch hands OpenCode a private server and its configuration in the environment, for that launch only, so a bare opencode keeps whatever it had: your own providers, models and servers.

The one thing a launch keeps on disk is your company's plugin marketplaces, fetched with git into your selan directory, ~/.selan/. See skills.

Does OpenCode get my company's connectors?

Yes, the same connectors selan claude and selan codex bring.

  • Connectors Selan hosts work at once. Brave Search, Slack and Selan run on your session, with nothing to sign in to.
  • A connector with its own sign-in asks for it through OpenCode the first time you use it.
  • Your own server wins. If your OpenCode config already defines a connector under the same name, your server is kept.
  • Connectors served over SSE are not offered.

Does OpenCode get my company's skills?

Yes. The plugin marketplaces your company switched on are fetched with git into ~/.selan/, and the skills in their plugins are offered to OpenCode.

Choosing a model

Which models does OpenCode get?

Every model in your company's Selan catalog: Claude, OpenAI's GPT, Gemini on Vertex, OpenRouter, Ollama, whatever your company connected. The list comes from Selan's gateway at each launch, with each model's name and context size, so a model an owner switches on is there the next time you start OpenCode. Only Selan's provider is enabled for that launch.

Pick one in OpenCode's /models picker, or with OpenCode's own flag, -m selan/id.

Claude models served from a Claude subscription do not answer in OpenCode. Anthropic answers them with its own message, “Third-party apps now draw from your extra usage, not your plan limits.” That is Anthropic's rule for apps other than Claude Code, and Selan passes the message on. Every other model in the catalog answers; for Claude on your subscription, use selan claude.

How do I start OpenCode on a named model?

selan opencode --model vertex:gemini-3.8-flash

Selan's --model takes a provider:model. It is checked with your company before OpenCode starts, and a model your company does not serve is refused there, with the reason.

Going further

Which of my company's rules apply to OpenCode?

All of them. Every request goes from your machine through Selan's gateway, as it does for Claude Code and Codex, so the same rules apply:

  • who is calling: each request is yours, under your own sign-in;
  • the models your company allows;
  • spend limits and concurrency limits;
  • secret scanning, before the provider sees a prompt;
  • the database calls listed under Logs;
  • usage counted to you.

Tested with OpenCode 2.2.0: its requests reached the gateway and were served, tool calls included.

What if selan opencode did not work?

  • OpenCode is not installed, or is older than 2. Install it one of the three ways above, then run selan opencode again.
  • --model was refused. The launch says why. Name a model your company serves, or pick one in /models.
  • A model is missing from /models. The list is read at each launch, so quit and relaunch first. If it is still missing, ask an owner whether your company serves it.
  • selan opencode upgrade or selan opencode service … is refused. Run those with plain opencode, as the message says.
  • Something else. The error messages are collected in Reference, and you can always ask us.