Documentation

Quickstart

Install the SDK, create a sandbox, run a command, destroy it.

Prerequisites

  • A Syva API key.
  • Node.js 22+ for TypeScript, or Python 3.11+ for Python.

Set up your environment

VariableDescription
SYVA_API_KEYYour project API key from the Syva dashboard.
.env.local
SYVA_API_KEY=syva_...

Install

Terminal
npm install @syva/sdk dotenv

Write your code

quickstart.ts
import { config } from "dotenv";
config({ path: ".env.local" });

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

const sandbox = await Sandbox.create({
  image: "node-22:base",
});

const result = await sandbox.runCommand("printf", ["Hello from Syva Sandbox!\n"]);
console.log(result.stdout.trim());

await sandbox.destroy();

Run it

Terminal
npx tsx quickstart.ts
Output
Hello from Syva Sandbox!