OpenCode

Integrate OpenCode with Docker CLIProxyAPI and RTK on Debian

Integrate OpenCode with Docker CLIProxyAPI and RTK on Debian

This guide shows how to connect OpenCode to a local CLIProxyAPI instance running in Docker and use RTK to compact bash output before OpenCode reads it. Overview Flow OpenCode -> API call to http://localhost:8317/v1 CLIProxyAPI (Docker) -> forwards through OAuth subscription Claude / Gemini / Codex <- RTK hook compacts bash output before OpenCode reads it Step 1: Check That CLIProxyAPI Docker Is Running docker ps | grep cliproxy # Quick test curl http://localhost:8317/v1/models | jq # If you mapped a different port, replace 8317 accordingly.