TLDR usage

This commit is contained in:
Jarek Rozanski 2026-10-11 11:04:55 +02:00
commit 1d7c529067
No known key found for this signature in database

View file

@ -5,6 +5,32 @@ Config and `make` utilities for running **OpenCode v2** inside a
environment that mounts your working directory read-write, limits network
access by policy, and keeps agent-installed tooling out of your host machine.
## TL;DR
```console
git clone <this-repo> && cd opencodev2
# 1. Install sbx (one-time) — https://docs.docker.com/ai/sandboxes/install/
brew install docker/tap/sbx # macOS
# 2. Log in + store API key (one-time)
sbx login
# Option A: built-in provider (Anthropic, OpenAI, Google, OpenRouter, ...)
sbx secret set anthropic
# Option B: custom provider (e.g. Mistral)
sbx secret set-custom --host api.mistral.ai --env MISTRAL_API_KEY --value "$MISTRAL_API_KEY"
sbx policy allow network api.mistral.ai:443
# 3. Build image + install shim (one-time)
make build && make install
# 4. Use from any project directory
cd ~/my-project
opencode-sandbox
```
## Prerequisites
1. Install the `sbx` CLI (one-time, on your host):