Documentation Index
Fetch the complete documentation index at: https://docs.superserve.ai/llms.txt
Use this file to discover all available pages before exploring further.
Opencode is an open-source terminal coding agent. Run it in a Superserve sandbox so its shell commands and file edits stay isolated from your machine.
Via the console
-
Go to console.superserve.ai and click Create sandbox.
-
Pick the
superserve/node-22 template.
-
Open Advanced Options and add
ANTHROPIC_API_KEY under Environment Variables.
-
Create the sandbox, open its Terminal, and run:
curl -fsSL https://opencode.ai/install | bash && opencode
export PATH=/home/user/.opencode/bin:$PATH
Via the SDK
npm install @superserve/sdk
export SUPERSERVE_API_KEY=ss_live_...
import { Sandbox } from "@superserve/sdk"
const sandbox = await Sandbox.create({
name: "opencode",
fromTemplate: "superserve/node-22",
envVars: { ANTHROPIC_API_KEY: "sk-ant-..." },
})
await sandbox.commands.run("curl -fsSL https://opencode.ai/install | bash")
await sandbox.commands.run("echo 'export PATH=/home/user/.opencode/bin:$PATH' >> ~/.bashrc")
Open the sandbox in the console, launch the terminal, and run opencode.
Persist sessions
await sandbox.pause()
await sandbox.resume()