Skip to main content
The hx CLI covers the sandbox workflows in this section: profile setup, sandbox creation, network policies, volume management, process execution, file transfer, terminals, snapshots, image builds, and port exposure. Use the CLI when you want a shell-first workflow or need to script sandbox operations outside the SDKs. For the underlying API concepts, see Creating Sandboxes, Network Policies, Volumes, Sandbox Lifecycle, Sandbox Processes, Local Filesystem, Base Images, Build And Upload A Custom Image, and Sandbox Terminal.

Install

See Install for macOS, Linux, Windows, and direct-download instructions.

Configure Profiles

Login with your account
Login with and save credentials to a profile:
List saved profiles and run a command with a specific profile:
The CLI uses the default profile unless you pass --profile. hx configure prompts for an API key if --api-key is omitted and stores profiles in ~/.hx_config/config.

Open The Dashboard

Launch the interactive dashboard:
hx dash requires an interactive terminal. Running hx without a subcommand shows help; it does not open the dashboard automatically.

Manage Volumes

Create, list, and inspect persistent volumes:
Attach a volume at sandbox launch:
See Managing Volumes and Mounting Volumes for API-level rules.

Create Sandboxes

Launch from an image:
Launch from a snapshot:

Manage Outbound Network Access

Set a network policy when creating a sandbox:
Update a running sandbox or restore the default outbound policy:
Each --allow-out or --deny-out flag may be repeated. Network updates apply to new connections; established connections may continue until they close. See Network Policies for rule precedence, target formats, and domain behavior.

Build And List Images

hx vm image build packages a local Docker image before uploading it, so image builds require Docker to be available locally.
Build a Firecracker image from a local Docker image:
List available images:
hx vm image build also supports --wait-timeout and --poll-interval when you want to control how long the CLI waits and how often it polls build status.

Inspect, Stop, And Expose Sandboxes

List and inspect sandboxes:
Stop a sandbox:
Expose or remove an exposed sandbox port:
hx vm expose currently accepts exactly one --port value. Use <port>:auth or <port>:public when you want to override the default auth mode from --auth.
Sandbox workflows are grouped under the hx vm namespace (for example hx vm create, hx vm process, hx vm connect, and hx vm volumes).

Run Commands

Run a one-shot command inside a sandbox:

Manage Long-Running Processes

Start a background process:
Inspect, wait for, and stream a process:
Send input or terminate a process:

Work With Files

Copy files and directories between your machine and a sandbox:
Read a file directly from a sandbox:
The <sandbox-id>:/path shorthand is only supported by hx vm cp. hx vm read expects the sandbox ID and path as separate arguments.

Open An Interactive Terminal

Open a terminal in a selected sandbox:
Open a terminal in a specific sandbox:
Override the default command or set a working directory:
By default, hx vm connect starts /bin/bash -i -l.

Create And Restore Snapshots

Create a memory snapshot from a running sandbox:
List snapshots:
Restore from a snapshot:

JSON Output

Most commands support --json for scripting: