Benchmarked
Runloop
Last updated
Was this helpful?
Was this helpful?
npm install @computesdk/runloopRUNLOOP_API_KEY=your_runloop_api_keyimport { runloop } from '@computesdk/runloop';
const compute = runloop({
apiKey: process.env.RUNLOOP_API_KEY,
});
// Create sandbox
const sandbox = await compute.sandbox.create();
// Run a command
const result = await sandbox.runCommand('echo "Hello from Runloop!"');
console.log(result.stdout); // "Hello from Runloop!"
// Clean up
await sandbox.destroy();interface RunloopConfig {
/** Runloop API key - if not provided, will use RUNLOOP_API_KEY env var */
apiKey?: string;
/** Execution timeout in milliseconds */
timeout?: number;
}