VM CLI
Use the Freestyle CLI for operational VM workflows and quick debugging.
Prerequisites
- Set
FREESTYLE_API_KEYin your environment. - Run commands as
npx freestyle ....
Core workflows
List VMs
npx freestyle vm listCreate from snapshot and run one command
npx freestyle vm create \
--snapshot <snapshot-id> \
--exec '<command>'Create, run one command, and auto-cleanup
npx freestyle vm create \
--snapshot <snapshot-id> \
--exec '<command>' \
--deleteOpen an interactive SSH session
npx freestyle vm create --snapshot <snapshot-id> --sshFor temporary debug sessions:
npx freestyle vm create --snapshot <snapshot-id> --ssh --deleteExec on an existing VM
npx freestyle vm exec <vm-id> '<command>'Delete a VM
npx freestyle vm delete <vm-id>Common options
--json: return machine-readable output.--delete:- with
--ssh: delete when SSH session exits. - without
--ssh: delete after create/exec completes.
- with
Debugging systemd startup failures
For VM_SETUP_FAILED, capture logs immediately from a fresh VM:
npx freestyle vm create \
--snapshot <snapshot-id> \
--exec 'journalctl --no-pager -eu <service-name>' \
--deleteSee Systemd Services for the full troubleshooting flow.