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:
- VM Lifecycle & Command Execution
- Networking, Ingress, and SSH
- Filesystem, Guest Assets, and Snapshots
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¶
- Create a VM with
VM.create(...) - Run commands via
vm.exec(...)or open an interactive shell - Configure optional policy/hooks (network, ingress, SSH, VFS)
- Close the VM with
vm.close()