b38a84de8b8060cbd3b5d6e52c13f8de7d16e261
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 + bakedopencode.jsondata/- 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(seeprovider.weave.models). When the catalog changes, update that list by hand. - Copy from the TUI is broken over Docker.
COPYfrom the TUI isn't working properly in a container. I've only found messy workarounds, no real solution yet - kept things simple here instead.
Description