OpenCode Integration

Use Repowise with OpenCode via the opencode LLM provider. No API keys — OpenCode manages auth and model selection.


Table of contents

  1. Quick setup
  2. Provider
    1. Model selection
    2. Interactive selection
  3. Reasoning
  4. Concurrency
  5. Comparison with Codex CLI
  6. Official docs

Quick setup

curl -fsSL https://opencode.ai/install | bash
opencode                      # first-run setup: configure your provider

cd /path/to/your-repo
repowise init --provider opencode --yes

OpenCode is detected automatically when it’s on PATH. No API keys to store.

Provider

opencode uses your local OpenCode CLI:

repowise init --provider opencode --yes

It runs:

opencode run --format json --dangerously-skip-permissions --dir <repo>

Repowise sends the prompt on stdin, parses OpenCode’s JSONL output, and treats opencode/* cost as $0.00.

Model selection

opencode/default uses OpenCode’s configured default model. To pick a specific model:

repowise init --provider opencode --model opencode/deepseek-v4-pro

List available models:

opencode models

Interactive selection

When you run repowise init interactively, the provider table includes opencode with a status indicator. If OpenCode is installed, it shows as available and you can select it directly.

If OpenCode is not installed, the interactive prompt shows:

Install:   curl -fsSL https://opencode.ai/install | bash
Setup:     opencode  (first run sets up your provider)
Models:    opencode models  (list available models)

Reasoning

The opencode provider does not pass reasoning effort flags. OpenCode handles reasoning through its own model and agent configuration.

Concurrency

Up to 4 opencode run subprocesses run at once. Set REPOWISE_OPENCODE_CONCURRENCY to change the limit; values below 1 are treated as 1.

REPOWISE_OPENCODE_CONCURRENCY=2 repowise generate --unwritten

Comparison with Codex CLI

Aspect opencode codex_cli
CLI opencode run codex exec
Auth OpenCode providers codex login
Format --format json JSONL --json JSONL
Reasoning N/A (OpenCode manages) model_reasoning_effort
Editor integration None MCP, hooks, plugin
Key storage No No

Official docs