Quickstart
Create your first sandbox, run a command in it, and tear it down. This page shows the CLI and the SDK side by side. Both authenticate with a CreateOS API token — generate one from your dashboard.
CLI
1. Install
Bash1curl -sfL https://raw.githubusercontent.com/NodeOps-app/createos-cli/main/install.sh | sh -2# or with Homebrew3brew tap nodeops-app/tap && brew install createos
2. Sign in
Bash1createos login
This opens a browser to sign in. For CI, pass a token instead: createos login --token <your-token>.
3. Create a sandbox
Bash1# See available sizes2createos sandbox shapes34# Create one5createos sandbox create --shape s-1vcpu-1gb --name my-box
4. Run a command
Bash1createos sandbox exec my-box -- uname -a
5. Open a shell
Bash1createos sandbox shell my-box
6. Clean up
Bash1createos sandbox rm my-box --force
See the CLI reference for the full command set.
SDK
1. Install
Bash1npm install @nodeops-createos/sandbox
2. Create, run, destroy
TypeScript1import { createClient } from "@nodeops-createos/sandbox";23const client = createClient({4 apiKey: process.env.CREATEOS_SANDBOX_API_KEY!,5 // baseUrl defaults to https://api.sb.createos.sh6});78const sandbox = await client.createSandbox({ shape: "s-1vcpu-1gb" });910const { result } = await sandbox.runCommand("uname", ["-a"]);11console.log(result.stdout);1213await sandbox.destroy();
See the SDK quickstart and tutorial to go further.
REST API
Every operation is also a plain HTTP call:
Bash1# Create2curl -X POST https://api.sb.createos.sh/v1/sandboxes \3 -H "X-Api-Key: $CREATEOS_API_KEY" \4 -H "Content-Type: application/json" \5 -d '{"shape": "s-1vcpu-1gb"}'67# Run a command (replace :id with the returned sandbox id)8curl -X POST https://api.sb.createos.sh/v1/sandboxes/:id/exec \9 -H "X-Api-Key: $CREATEOS_API_KEY" \10 -H "Content-Type: application/json" \11 -d '{"cmd": "uname", "args": ["-a"]}'
See the REST API reference for every endpoint.