Cubicle

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/sdk
import { 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 gone

The 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

AI coding tools can read these docs as plain text: start with llms.txt or see Docs for AI tools.

On this page