LogoFreestyle

VM CLI

Use the Freestyle CLI for operational VM workflows and quick debugging.

Prerequisites

  • Set FREESTYLE_API_KEY in your environment.
  • Run commands as npx freestyle ....

Core workflows

List VMs

npx freestyle vm list

Create 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>' \
  --delete

Open an interactive SSH session

npx freestyle vm create --snapshot <snapshot-id> --ssh

For temporary debug sessions:

npx freestyle vm create --snapshot <snapshot-id> --ssh --delete

Exec 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.

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>' \
  --delete

See Systemd Services for the full troubleshooting flow.

On this page

Freestyle AI

Documentation assistant

Experimental: AI responses may not always be accurate—please verify important details with the official documentation.

How can I help?

Ask me about Freestyle while you browse the docs.