Quickstart
One environment variable, five commands: a running sandbox, a command, and a link anyone can open. Then the same from TypeScript, Python and Go.
1. Install#
Sandal is in private beta. The CLI and SDKs are not on npm, PyPI or the Go proxy yet: request access and we send you an install bundle (0.1.0-beta.16) and add you to an organization with a project.
From the bundle's CLI folder, install the binary for your platform (one file, no runtime needed) and turn on the shell integration:
mkdir -p ~/.local/bin
install -m 755 sandal-darwin-arm64 ~/.local/bin/sandal # Intel Mac: sandal-darwin-x64, Linux: sandal-linux-x64 or sandal-linux-arm64
export PATH="$HOME/.local/bin:$PATH"
eval "$(sandal shell-init zsh)" # bash: sandal shell-init bash
sandal --version # 0.1.0-beta.162. One variable: your API key#
Create a key in Console → API Keys and export it. That is the only setting: the CLI and every SDK find the key's organization and project themselves.
export SANDAL_API_KEY=... # from Console → API KeysOn your own machine you can sign in with the browser instead: sandal login (confirm the code, pick a project; sandal logout removes the session). sandal whoami shows what you are using. SANDAL_ORGANIZATION_ID and SANDAL_PROJECT_ID still work as overrides, for a key that can see more than one project.
3. Five commands to a link anyone can open#
sandal create # running in about 2 s
sandal exec -- python3 -c "print('hello from', __import__('platform').node())"
sandal exec --detach -- python3 -m http.server 8000 # a web server in the background
sandal share current 8000 # prints a link: open it in your browser
sandal delete current --yessandal createuses your project's default template and sizes(2 vCPU, 4 GiB, 20 GiB disk). No template id needed;--size m,--name,--desktopand--runtime general-linux-vm(a Full VM) are optional.currentis the last sandbox you created in this shell (the shell integration from step 1). Without it, pass the id thatsandal createprinted.execstreams the output and exits with the remote exit code.--detachprints a process id forsandal exec logs|wait|kill.sandal shareexposes the port and prints a share link that anyone can open for one hour, without an API key.--ttl 30m(1 min to 24 h) and--single-usechange that; see Share links.- Outside a terminal (scripts,
| jq), every command prints JSON, anddeleteneeds--yes.
4. The same from TypeScript#
npm install ./sandal-typescript-v0.1.0-beta.16.tgz # from your bundle's SDK folder; Node.js 20+import { Sandal } from "@sandal-dev/sdk";
const sandal = new Sandal(); // reads SANDAL_API_KEY (or the `sandal login` profile)
const sb = await sandal.createSandbox(); // waits until it is running: default template, size s
try {
const result = await sb.exec("python3 -c 'print(2 + 2)'");
console.log(result.exitCode, result.stdout.trim()); // 0 4
await sb.startCommand("python3 -m http.server 8000");
const { url } = await sb.share(8000); // a link anyone can open for 1 hour
console.log("open", url);
await new Promise((resolve) => setTimeout(resolve, 60_000)); // one minute to look at it
} finally {
await sb.delete();
}Run it with node quickstart.mjs.
5. The same from Python#
python3 -m venv .venv && . .venv/bin/activate
pip install ./sandal_sdk-0.1.0b16-py3-none-any.whl # from your bundle's SDK folder; Python 3.11+import asyncio
from sandal import Sandal
async def main() -> None:
sandal = Sandal() # reads SANDAL_API_KEY (or the `sandal login` profile)
try:
async with await sandal.create_sandbox() as sb: # deleted when the block ends
result = await sb.exec("python3 -c 'print(2 + 2)'")
print(result.exit_code, result.stdout.strip()) # 0 4
await sb.start_command("python3 -m http.server 8000")
link = await sb.share(8000)
print("open", link.url, flush=True)
await asyncio.sleep(60) # one minute to look at it
finally:
await sandal.close()
asyncio.run(main())A blocking client with the same methods is SandalSync.
6. The same from Go#
tar xzf sandal-go-v0.1.0-beta.16.tar.gz # from your bundle's SDK folder; Go 1.23+
go mod edit -require=sandal.dev/go@v0.0.0 -replace=sandal.dev/go=./sandal-go-v0.1.0-beta.16
go mod tidypackage main
import (
"context"
"fmt"
"log"
"strings"
"time"
sandal "sandal.dev/go"
)
func main() {
ctx := context.Background()
client, err := sandal.NewSandalFromEnv(sandal.SandalEnvOptions{}) // reads SANDAL_API_KEY
if err != nil {
log.Fatal(err)
}
sb, err := client.CreateSandbox(ctx, sandal.SandalCreateSandboxOptions{}) // default template, size s
if err != nil {
log.Fatal(err)
}
defer sb.Delete(ctx, sandal.SandalLifecycleOptions{})
result, err := sb.Exec(ctx, []string{"python3", "-c", "print(2 + 2)"}, nil)
if err != nil {
log.Fatal(err)
}
fmt.Println(result.Status, strings.TrimSpace(result.Stdout)) // 0 4
if _, err := sb.StartCommand(ctx, []string{"python3", "-m", "http.server", "8000"}, nil); err != nil {
log.Fatal(err)
}
shared, err := sb.Share(ctx, 8000, sandal.SandalExposeOptions{}) // a link anyone can open for 1 hour
if err != nil {
log.Fatal(err)
}
fmt.Println("open", shared.URL)
time.Sleep(time.Minute) // one minute to look at it
}Run it with go run ..
What to expect#
Measured on the production deployment in November 2026, from one client in Europe (Helsinki). SDK commands use the direct exec path where the sandbox's image offers it (the default Linux template and the default container image do) and the API otherwise; a one-shot sandal exec uses the API path:
| Step | Typical |
|---|---|
create (Linux sandbox, size s, warm pool) | about 1.5-3.5 s |
create --size m and larger (no warm pool yet) | 12-16 s |
create --runtime general-linux-vm (Full VM) | 15-19 s |
create --desktop (Linux desktop) | 17-22 s |
| First command on a fresh sandbox | about 0.3-1.4 s |
| Later commands on one SDK handle | about 125 ms median (about 50 ms on the default container image) |
One sandal exec from the CLI (a new process each time) | about 0.4-0.6 s |
sandal share | about 1-2 s |
delete | about 1 s |
A create that has to wait says why (queued, waiting_for_capacity, waiting_for_quota, provisioning) on stderr, or as pendingReason in JSON and in the SDKs' onProgress / on_progress.
Next steps#
- Sandboxes: files, terminals, lifecycle, snapshots and forks
- Secrets: keep API keys out of the sandbox
- Give Sandal to your coding agent and the integrations
- CLI reference, TypeScript SDK, Python SDK, Go SDK
- Limits:
sandal limits --allshows your quota