Cubicle documentation
Cubicle runs QEMU/KVM virtual machines called Boxes that you create, run commands in and delete from the TypeScript SDK, the HTTP API or the cubicle CLI, and reach over SSH and a private network.
Cubicle runs Boxes: QEMU/KVM virtual machines, each with its own kernel and a persistent disk.
You manage them from the TypeScript SDK, the HTTP API or the cubicle CLI, and reach them over
SSH and a private network.
npm install @cubicle/sdkimport { Cubicle } from "@cubicle/sdk"
const cubicle = new Cubicle() // reads CB_SDK_API_URL and CB_SDK_API_KEY
const box = await cubicle.boxes.create({ name: "job-1" }) // resolves when the Box is ready
const result = await box.exec(["uname", "-a"])
console.log(result.stdout) // => "Linux box-job-1 … x86_64 GNU/Linux"
await box.delete() // resolves when the Box is goneThe Quickstart gets you an API key and runs a program like this one.
Before you start
- Cubicle is invite-only. Sign in with the email address on your invitation.
- Boxes are x86-64 Linux virtual machines.
- A command runs for at most 10 minutes and returns at most 1 MiB of output, all at once when it ends, with no stdin and no streaming. See Limits and defaults.
- There is no file upload or download API yet, and no public URL or public port. See Not available yet and Move files into and out of a Box.
- API keys cannot SSH into a Box, join the private
network or open the console, and commands sent with one
cannot rely on
sudo. - A snapshot stays on its Box's Node, where Boxes created from it also go, and is deleted with the Box. See Snapshots.
Building blocks
- Box: a virtual machine in an organization, with its own kernel, persistent disk and private IPv4 address.
- Snapshot: a copy of a stopped Box's disk, which you restore in place or create new Boxes from.
- Organization: owns Boxes, members and service accounts; a member needs a grant, a per-Box permission, to run commands in a Box or reach it.
- Service account: a non-interactive member of one organization, whose API keys authenticate programs such as CI jobs and agents.
- Private network: a WireGuard tunnel from your computer to the Boxes you have grants on, for SSH and other traffic to their private addresses.
Concepts defines these and every other term the docs use.
Choose your path
Quickstart
Create a Box, run a command in it from TypeScript and delete it.
TypeScript SDK
Manage Boxes, commands and snapshots from Node.js with @cubicle/sdk.
HTTP API
Call the /v1 REST API directly, with every endpoint and an OpenAPI document.
CLI
Use the cubicle command on macOS and Linux for Boxes, access and SSH.
How-to guides
Find the guide for a task, from running commands to snapshots and SSH.
Use cases
Walk through a goal end to end: an AI agent's sandbox, CI jobs or team development environments.
Give an AI agent a Box
Build a tool that lets an LLM agent run commands in a Box.
AI coding tools can read these docs as plain text: start with llms.txt or see Docs for AI tools.

