Skip to content

SDK

This section documents the programmatic API in @earendil-works/gondolin.

To keep this easier to navigate, the SDK docs are split into focused guides:

Quick Start

import { VM } from "@earendil-works/gondolin";

const vm = await VM.create();

// String form runs via `/bin/sh -lc "..."`
const result = await vm.exec("curl -sS -f https://example.com/");

console.log("exitCode:", result.exitCode);
console.log("stdout:\n", result.stdout);
console.log("stderr:\n", result.stderr);

await vm.close();

Typical SDK Flow

  1. Create a VM with VM.create(...)
  2. Run commands via vm.exec(...) or open an interactive shell
  3. Configure optional policy/hooks (network, ingress, SSH, VFS)
  4. Close the VM with vm.close()