Quickstart
Get up and running with Vyoma in minutes.
Install the SDK
npm install vyomaCreate a client
client.ts
import { VyomaClient } from "vyoma"
const client = new VyomaClient({
apiKey: process.env.VYOMA_API_KEY!,
})Create a sandbox
sandbox.ts
const { sandbox } = await client.sandbox.create({
templateId: "node-20",
timeout: 300, // seconds
})
console.log("Sandbox ID:", sandbox.id)Execute code
exec.ts
const result = await client.sandbox.exec(
sandbox.id,
'node -e "console.log(42)"'
)
console.log(result.stdout)Write files
files.ts
await client.sandbox.write(
sandbox.id,
"hello.js",
'console.log("Hello from Vyoma")'
)
const result = await client.sandbox.exec(
sandbox.id,
"node hello.js"
)
console.log(result.stdout)Stop the sandbox
cleanup.ts
await client.sandbox.stop(sandbox.id)You’ve successfully created a sandbox, executed code, and managed files.