Skip to content

Use the OpenCode CLI ​

OpenCode is an open-source agent for the terminal that works with many model providers. Xandria can run the Agent on it, using the providers you've already set up in OpenCode.

Tested on Linux

We've tested OpenCode with Xandria on Linux. It may work on macOS, but we haven't tested it there yet, and Xandria for Windows offers only Codex. On those computers, the Codex CLI or a chat model is the tested choice.

1. Install and set up OpenCode ​

  1. Install OpenCode by following its instructions.
  2. In a terminal, run opencode and connect a model provider.
  3. Check it works: ask it something, then quit.

2. Choose OpenCode in Xandria ​

On Linux and macOS, Xandria already lists OpenCode under Configured Providers, set to run the opencode command.

  1. Open Settings → AI.
  2. Under Model Defaults, open the Chat list and choose OpenCode.
  3. Find OpenCode in Configured Providers and choose Test. Xandria runs OpenCode and reports whether it answered.

If opencode isn't on your PATH, enter its full path in Binary Path in its card (which opencode shows it). Leave Model empty to use OpenCode's default, or enter one.

Open Agent from the rail and ask a question. Changes the Agent proposes wait for your approval, as with any model. See Let AI edit Notes and Canvas.

Your questions and the passages the Agent reads go to whichever provider OpenCode uses, under your account and its terms.

Next: Ask your library

Your library. Your reading. Your work.