The Freestyle CLI is useful for one-off operations while developing or debugging.
Prerequisites
Set your API key:
export FREESTYLE_API_KEY="your-api-key"
Run commands through npx:
npx freestyle --help
List VMs
npx freestyle vm list
Use JSON output when scripting:
npx freestyle vm list --json
Create And Exec
npx freestyle vm create --exec 'uname -a'
Delete the VM after the command completes:
npx freestyle vm create --exec 'npm test' --delete
SSH
npx freestyle vm create --ssh
For a temporary debug session:
npx freestyle vm create --ssh --delete
Operate On An Existing VM
npx freestyle vm exec <vm-id> 'pwd'
npx freestyle vm delete <vm-id>
Use the SDK for long-lived application workflows and the CLI for operational tasks.