Freestyle Docs

Freestyle / Docs

Quickstart

Install Freestyle and create your first VM.

Freestyle VMs are full Linux virtual machines designed for long running, complex tasks.

Install

pnpm add freestyle@latest
bun add freestyle@latest
npm install freestyle@latest
yarn add freestyle@latest

Set your API key before calling the API:

export FREESTYLE_API_KEY="your-api-key"

Create A VM

import { Freestyle } from "freestyle";

const freestyle = new Freestyle();

const { vm } = await freestyle.vms.create({
  // Required: a VM reaches nothing it has not been allowed to.
  firewall: { rules: [{ action: "allow", source: {}, destination: { public: true } }] },
});

const result = await vm.exec("echo 'hello from freestyle'");
console.log(result);

Next Steps

Add to your Agent

esc