# Run a command in the sandboxruntools sandbox exec my-first-sandbox "echo Hello from RunTools!"# SSH into the sandboxruntools sandbox ssh my-first-sandbox
Or use the SDK programmatically:
Copy
import { RunTools } from '@runtools/sdk';const rt = new RunTools({ apiKey: process.env.RUNTOOLS_API_KEY });// Create a sandboxconst sandbox = await rt.sandbox.create({ template: 'base-ubuntu' });await sandbox.waitForReady();// Execute commandsconst result = await sandbox.exec('echo "Hello from RunTools!"');console.log(result.stdout); // "Hello from RunTools!"
# Pause the sandbox (saves full VM state, stops billing)runtools sandbox pause my-first-sandbox# Later: resume in under a secondruntools sandbox resume my-first-sandbox# Your processes are still running!
Or via SDK:
Copy
await sandbox.pause();// ... later ...await sandbox.resume();