Skip to content
sistemo.io beta

JavaScript quickstart

1. Install

npm install @sistemo/sdk

2. Set your key

export SISTEMO_API_KEY=sk_live_xxxxxxxxxxxxxxxx

3. Run code

Save as hello.mjs:

import { Sandbox } from "@sistemo/sdk";

const sb = await Sandbox.create();
try {
  const r = await sb.run("uname -a");
  console.log(r.stdout);
  console.log(r.exitCode);   // 0
} finally {
  await sb.close();
}
node hello.mjs

4. Several commands in one sandbox

import { Sandbox } from "@sistemo/sdk";

const sb = await Sandbox.create({ stack: "node" });
try {
  await sb.run("npm init -y");
  const r = await sb.run("node -e 'console.log(process.version)'");
  console.log(r.stdout);
} finally {
  await sb.close();          // always clean up
}

5. Pick an image and size

const sb = await Sandbox.create({
  stack: "python",           // base | python | node | ai | debian13 | ubuntu26.04
  vcpus: 1,                  // the default; free allows up to 2 vCPU / 2 GB per machine
  memoryMb: 1024,
  rootfsSizeGb: 10,
});

Always close

There's no using cleanup by default — wrap usage in try/finally and call await sb.close() so a crash doesn't leak a billing sandbox.

Next: Sandbox API · Examples