Repowise supports OpenCode via the opencode LLM provider, which runs
documentation generation through your local OpenCode CLI installation.
No API keys are managed by repowise — OpenCode handles all authentication
and model selection through its own provider system.
Install OpenCode:
curl -fsSL https://opencode.ai/install | bashThen run opencode once to set up your model provider and authentication:
opencodeVerify the CLI is available:
opencode --versionRepowise detects OpenCode automatically: when opencode is in PATH,
the interactive provider selection shows it as "available" and it can
be used immediately.
Use opencode when you want Repowise page generation to run through
your local OpenCode CLI instead of an API key:
repowise init --provider opencode --yesYou can also persist it:
REPOWISE_PROVIDER=opencode repowise updateThe provider runs:
opencode run --format json --dangerously-skip-permissions --dir /absolute/path/to/repoRepowise sends the combined system + user prompt on stdin, parses
OpenCode's JSONL output (extracting text from text events and
token usage from step_finish events), and treats opencode/* cost
as $0.00 because billing is handled by OpenCode's own subscription/auth.
opencode/default uses OpenCode's configured default model — no
--model flag is passed. To use a specific model:
repowise init --provider opencode --model opencode/deepseek-v4-proOr use a bare model slug (the opencode/ prefix is optional):
repowise init --provider opencode --model deepseek-v4-proopencode models # all available models
opencode models opencode # models from the opencode providerThe opencode provider does not pass reasoning effort flags. OpenCode handles reasoning internally through its own model/agent configuration.
The provider enforces several safety measures:
- Uses
asyncio.create_subprocess_exec(no shell), so every argument is passed as a distinct list element — shell injection is impossible. - Model names are validated against a safe character set
(
[a-zA-Z0-9][a-zA-Z0-9._/\-]*), rejecting shell metacharacters before anything reaches the subprocess. - All paths are resolved with
Path.resolve()before being passed to--dir. - Subprocess execution is serialized via
asyncio.Semaphore(1). - A 600-second hard timeout with process kill prevents runaway calls.
| Aspect | opencode |
codex_cli |
|---|---|---|
| CLI command | opencode run |
codex exec |
| Auth | OpenCode providers | codex login |
| Output format | JSONL via --format json |
JSONL via --json |
| Reasoning modes | Not passed (OpenCode manages it) | model_reasoning_effort mapping |
| Sandbox | OpenCode manages its own | --sandbox read-only |
| Model discovery | opencode models |
codex debug models --bundled |
| Editor integration | None | .codex/config.toml, hooks, plugin |
| API keys stored | No | No |