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, Custom images, and Sandbox terminal.
For Mac creation, desktop sharing, and persistent disk commands, see macOS sandboxes (Beta). macOS is enabled for teams on request.
For GPU image builds and creation, use hx 0.1.25 or later and follow GPU sandboxes. Contact us to enable GPU access for your team.
Install
See Install for macOS, Linux, Windows, and direct-download instructions.Configure Profiles
Login with your accountOpen 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, inspect, and delete persistent volumes:See Managing Volumes and
Mounting Volumes for API-level rules.
Manage Secrets
Store encrypted values and pass them to sandbox processes as environment variables. Values are read from a file or stdin, encrypted locally, and never shown again:--secret is merged over the vault and wins on a clash. --entry sets or replaces a variable and --remove drops one. A secret a vault uses can’t be deleted until the vault stops using it:
op_token secret. --1password-field is repeatable and takes ENV=item/[section/]field:
Fill Credentials Into Browser Sessions
Store each part of a website login as a secret with allowed origins, group them in a vault, and fill them into a browser session’s login form:op_token secret and name the allowed origins with the fill. The nth --1password-ref (item/[section/]field) fills the nth --selector:
See Credential fill for outcomes, allowed origins, one-time codes and tab choice.
Create Sandboxes
Launch from an image:Manage Outbound Network Access
Set a network policy when creating a sandbox:--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
Building from a local Docker image requires local Docker. With
--remote, the
CLI uploads a Dockerfile build context and builds it remotely without local Docker.--remote --enable-gpu-builds. Use hx vm image wait to wait
for GPU publication as well as build completion. See Custom images
for build methods and readiness.
Create GPU sandboxes
Use
--region us and a GPU-ready image built by your team. --memory sets system
RAM; GPU memory is determined by the GPU type. --disk defaults to 12 GiB for GPU
sandboxes and must be at least 12 GiB. Follow the GPU guide for
the complete build, create, run, and stop sequence.
Inspect, Stop, And Expose Sandboxes
List and inspect sandboxes:Run Commands
Run a one-shot command inside a sandbox:Manage Long-Running Processes
Start a background process:Work With Files
Copy files and directories between your machine and a sandbox:Open An Interactive Terminal
Open a terminal in a selected sandbox:Create And Restore Snapshots
Create a memory snapshot from a running sandbox:JSON Output
Most commands support--json for scripting: