AIO Sandbox includes the OpenCode CLI. OpenCode is an open-source terminal coding agent, so you can run it directly inside the sandbox or launch it through the built-in terminal page.
http://localhost:8080/opencode to redirect to the built-in terminal and start opencodeopencode inside the containerYou can generate the OpenCode configuration at container startup with environment variables:
| Variable | Default | Description |
|---|---|---|
OPENCODE_API_KEY | Required | Provider API key |
OPENCODE_MODEL | Required | Model ID |
OPENCODE_PROVIDER | ark | Provider ID |
OPENCODE_BASE_URL | https://ark.cn-beijing.volces.com/api/v3 | API endpoint |
OPENCODE_PROVIDER_NPM | Auto-detected | AI SDK npm package for the provider |
OPENCODE_JSON | None | Full OpenCode config JSON; highest priority |
OPENCODE_PROVIDER_NPM usually does not need to be set manually. If OPENCODE_BASE_URL contains anthropic, AIO Sandbox uses @ai-sdk/anthropic; otherwise it defaults to @ai-sdk/openai-compatible.
The default provider is ark, so most setups only need an API key and model ID:
Anthropic-compatible endpoint:
OpenAI-compatible endpoint:
For full customization, pass an OpenCode config JSON with OPENCODE_JSON:
OPENCODE_JSONOPENCODE_API_KEY + OPENCODE_MODEL and other OPENCODE_* environment variables~/.config/opencode/config.jsonWhen OPENCODE_JSON or OPENCODE_API_KEY + OPENCODE_MODEL is set, AIO Sandbox writes ~/.config/opencode/config.json during container startup. For long-lived custom configuration, either pin the full configuration with OPENCODE_JSON or edit the file while not setting OPENCODE_* environment variables.