Files
app-opencode-experiment/README.md
2026-07-02 13:46:40 +02:00

1.2 KiB

app-open-code-experiment

opencode in a Docker container, wired to weave as the model provider. Default model weave/glm-5.2. LSP baked in for TypeScript/JS and Python.

Setup

Create a docker-compose.override.yml (gitignored) with your weave key and repo mount:

services:
  opencode:
    environment:
      WEAVE_API_KEY: "..."
    volumes:
      - /path/to/your/repo:/workspace/repo

Then:

docker compose up -d
docker compose exec opencode opencode

Or a one-shot against a registered model:

docker compose exec opencode opencode run --model weave/glm-5.2 "..."

Layout

  • config/opencode/ - image: Dockerfile + baked opencode.json
  • data/ - persisted opencode state (gitignored)
  • docker-compose.yml - opencode service

Caveats

  • No model discovery on weave. I haven't found a way to discover models on weave.redpencil.io, so they are configured explicitly in opencode.json (see provider.weave.models). When the catalog changes, update that list by hand.
  • Copy from the TUI is broken over Docker. COPY from the TUI isn't working properly in a container. I've only found messy workarounds, no real solution yet - kept things simple here instead.