T-Ex LLM
T-Ex LLM

OpenCode

OpenCode is an open source AI coding agent that supports multiple AI providers including OpenAI, Anthropic, and Google.

The T-Ex LLM integration with OpenCode is the opencode-vicoa plugin, published at github.com/vicoa-ai/opencode-vicoa.

Installation

The easiest way to get started is through the T-Ex LLM CLI, which automatically installs and configures the OpenCode plugin:

# Install T-Ex LLM CLI, if you haven't done so
npm i -g @texllm/cli

# Launch OpenCode with T-Ex LLM integration
tex-llm opencode

After authentication via the web portal, you're ready to use OpenCode from anywhere.

Manual Installation

If you prefer manual setup, add the plugin to your OpenCode config (~/.config/opencode/config.json):

{
  "$schema": "https://opencode.ai/config.json",
  "plugins": ["opencode-vicoa"]
}

Then authenticate with T-Ex LLM CLI or set your API key manually:

export TEX_LLM_API_KEY="your-tex-llm-api-key"

Usage

Starting a Session

Once installed, you can launch OpenCode in two ways:

Option 1: Direct OpenCode command

opencode

OpenCode will automatically sync with T-Ex LLM when the plugin is installed.

Option 2: Via T-Ex LLM CLI

tex-llm opencode

This additionally prepares project files for fuzzy search on T-Ex LLM mobile and web apps.

Using OpenCode for a Single Session

If you want to use OpenCode temporarily without changing your default agent:

tex-llm --agent opencode

This keeps your default agent unchanged for future sessions.

Making OpenCode Your Default Agent

To make tex-llm always launch OpenCode by default:

tex-llm --set-default opencode

After running this command, tex-llm will automatically launch OpenCode. You can override for a single session with tex-llm --agent claude or tex-llm --agent codex.

Upgrading the Plugin

Keep the OpenCode plugin up to date with:

tex-llm opencode --upgrade

This clears the cached plugin so OpenCode fetches the latest version on the next run.