JavaScript / TypeScript SDK¶
Private beta
Sistemo Cloud is not open for signups yet, and the SDK packages below are not published until it is. Request an invite — the source is public on GitHub meanwhile.
The official JS/TS client — a thin, zero-dependency wrapper (native fetch) over the REST API. Ships with TypeScript types.
Install¶
Works in Node 18+, Bun, and Deno. In the browser it uses the browser's fetch (but don't ship a secret sk_live_… key to browsers).
Configure¶
export SISTEMO_API_KEY=sk_live_xxxxxxxxxxxxxxxx
# optional — self-hosted control plane:
export SISTEMO_BASE_URL=https://your-own-host:8000
Hello, sandbox¶
import { Sandbox } from "@sistemo/sdk";
const sb = await Sandbox.create(); // reads SISTEMO_API_KEY
const r = await sb.run("node -e 'console.log(2 + 2)'");
console.log(r.stdout, r.exitCode); // "4\n" 0
await sb.close();
What's here¶
Notes¶
The SDK sends a User-Agent header on every request (required — generic UAs are blocked by the cloud WAF). Pin a version in production: