SDKs

Node.js and Python

Dependency-free SDK facades over the same stable Warden command contract.

Why SDKs exist

The first Node.js and Python SDKs wrap the standalone Warden contract. They make argv, environment, streams and receipt parsing natural in each language without duplicating policy or backend logic.

Node.js

CODE
import { spawn } from "@maelys/warden";

const run = await spawn({
  profile: "project-rw",
  argv: ["npm", "test"],
  receipt: true,
});

process.stdout.write(run.stdout);
console.log(run.receipt.backend);

Python

CODE
from maelys_warden import run

result = run(
    profile="untrusted",
    argv=["python", "-m", "pytest"],
    receipt=True,
)

print(result.returncode)
print(result.receipt["planDigest"])

When to use C instead

Use the C library when the host needs direct lifecycle control, an in-memory JSON/MIR pipeline, custom stdio plumbing, or an optional Netd adapter without spawning the Warden CLI itself.