import { Sandbox, Secret } from "@superserve/sdk"
// One-time: store your key as a secret. It never enters the sandbox.
await Secret.create({
name: "anthropic-key",
value: "sk-ant-...",
provider: "anthropic",
})
const sandbox = await Sandbox.create({
name: "opencode",
fromTemplate: "superserve/node-22",
secrets: { ANTHROPIC_API_KEY: "anthropic-key" },
})
await sandbox.commands.run("curl -fsSL https://opencode.ai/install | bash")
await sandbox.commands.run("echo 'export PATH=/home/user/.opencode/bin:$PATH' >> ~/.bashrc")