Freestyle Docs

Freestyle / Docs

Domains CLI

Use the Freestyle CLI to verify domains and map them to VM ports.

Use the Domains CLI for domain verification and VM domain mappings.

Prerequisites

Set your API key:

export FREESTYLE_API_KEY="your-api-key"

Run commands through npx:

npx freestyle domains --help

Verify A Domain

Create a verification request and print the TXT record details:

npx freestyle domains verify example.com

Complete verification by domain:

npx freestyle domains complete --domain example.com

Or complete verification by verification ID:

npx freestyle domains complete --verification-id <verification-id>

List pending verification requests:

npx freestyle domains verifications

List Verified Domains

npx freestyle domains list

Use JSON output when scripting:

npx freestyle domains list --json

Map A Domain To A VM

npx freestyle domains map app.example.com --vm-id <vm-id> --vm-port 3000

List mappings:

npx freestyle domains mappings

Filter mappings by domain:

npx freestyle domains mappings --domain app.example.com

Delete a mapping:

npx freestyle domains unmap app.example.com

Create A VM With A Domain

The VM CLI can attach a domain while creating a VM:

npx freestyle vm create --domain app.example.com --port 3000

For application workflows, use the SDK so your server can verify domains, configure DNS instructions, create VMs, and map domains in one flow.

esc