Freestyle
Freestyle provider for ComputeSDK: full Linux virtual machines designed for long-running, complex agent tasks, with instant startup, persistence, and cheap snapshotting.
Installation & Setup
npm install @computesdk/freestyleAdd your Freestyle credentials to a .env file:
FREESTYLE_API_KEY=your_freestyle_api_keyFreestyle base images ship no language runtime, so the first sandbox on an account bakes a Node + Python snapshot once (~20 s) and every sandbox after boots from it in ~200–300 ms. Set FREESTYLE_SNAPSHOT_ID (or the snapshotId option) to your own snapshot to skip baking.
Usage
import { freestyle } from '@computesdk/freestyle';
const compute = freestyle({
apiKey: process.env.FREESTYLE_API_KEY,
});
// Create sandbox
const sandbox = await compute.sandbox.create();
// Run a command
const result = await sandbox.runCommand('echo "Hello from Freestyle!"');
console.log(result.stdout); // "Hello from Freestyle!"
// Clean up
await sandbox.destroy();Configuration Options
Capabilities
Freestyle VMs are full Linux guests, so the whole filesystem surface is native rather than shelled through runCommand:
Snapshots (compute.snapshot.create / list / delete) and reconnect-by-id (compute.sandbox.getById) are supported. getUrl is not: Freestyle exposes VMs through mapped domains (freestyle.domains), not a stock per-port URL.
Last updated
Was this helpful?