TLDR usage
This commit is contained in:
parent
1cc8dddc30
commit
1d7c529067
1 changed files with 26 additions and 0 deletions
26
README.md
26
README.md
|
|
@ -5,6 +5,32 @@ Config and `make` utilities for running **OpenCode v2** inside a
|
||||||
environment that mounts your working directory read-write, limits network
|
environment that mounts your working directory read-write, limits network
|
||||||
access by policy, and keeps agent-installed tooling out of your host machine.
|
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
|
## Prerequisites
|
||||||
|
|
||||||
1. Install the `sbx` CLI (one-time, on your host):
|
1. Install the `sbx` CLI (one-time, on your host):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue