sbx-opencodev2/sbxenv.yaml

45 lines
1.5 KiB
YAML
Raw Permalink Normal View History

2026-10-10 23:51:14 +02:00
schemaVersion: "1"
name: opencodev2
agent: opencode
# Mount this project directory into the sandbox as the primary workspace.
workspace: .
env: {}
# Use the image built by `make image` instead of Docker's stock opencode
# template, so the sandbox runs the OpenCode CLI version pinned in ./Dockerfile
# rather than whatever version Docker last baked into docker/sandbox-templates:opencode.
sandboxOptions:
template: opencode-v2:local
# memory: 8g
# cpus: 4
# Provider credentials are stored on the host (outside this file) with the
# sbx CLI, not here. Run one of these once before `make run`:
# sbx secret set anthropic
# sbx secret set openai
# sbx secret set google
# sbx secret set openrouter
# sbx secret set github --command 'gh auth token' # for PRs/repo access
#
# OpenCode Zen or another custom API key:
# sbx secret set-custom --host opencode.ai --env OPENCODE_API_KEY --value "$OPENCODE_API_KEY"
# sbx policy allow network opencode.ai:443
# Uncomment to expose a port the agent starts inside the sandbox (e.g. a dev
# server) on the host:
# ports:
# - sandbox: 3000
# host: 3000
# protocol: tcp4
# lifecycle.* commands (initialize/postCreate/preRemove) run on the HOST, not
# inside the sandbox, so they're for preparing the workspace on disk (cloning
# repos, host-side `npm install` into a mounted dir) — not for changing tools
# installed inside the sandbox. Use ./Dockerfile + sandboxOptions.template for
# that instead.
# lifecycle:
# postCreate:
# - command: npm install
# workdir: .