Skip to main content
The opencode template supports ANTHROPIC_API_KEY, OPENAI_API_KEY, or OPENCODE_API_KEY.

Run OpenCode

Create a machine from the opencode template, run OpenCode headlessly, and clean up. The SDK and CLI paths are equivalent — use the one that matches your workflow.

Interactive terminal

Open a PTY instead of a headless run to drive OpenCode interactively:
Use the session_id from machine pty create with --session-id.

Provider models

Work on a cloned repository

Serve OpenCode

OpenCode can run a headless HTTP server inside the machine. Start it on 0.0.0.0, then use machine.get_url(port) to connect through Nullspace’s preview URL routing.