Skip to main content
The archil npm package ships the archil command for managing sandboxes and disks from any machine with Node.js 22.19 or later. Run it with npx archil, or install it with npm install -g archil.
It’s a different program from the Linux archil client that mounts disks, but both answer to archil. When the npm CLI receives a mount command it doesn’t handle, such as archil mount or archil unmount, it passes the command to the Linux client. If the Linux client comes first on your PATH, run the commands on this page with npx archil.

Sign in

archil login opens the console in your browser. After you approve, the console creates an API key named CLI on <hostname> and hands it to the CLI, which saves it as a profile and makes it the default. Pass --no-browser to print the link instead of opening it. logout removes the key from this machine. To revoke the key itself, delete it under API Keys in the console. Without a browser, such as in CI or over SSH, set ARCHIL_API_KEY and ARCHIL_REGION, or save a key with archil profile create: Flags take precedence over environment variables, which take precedence over the selected profile. Manage profiles with archil profile create, list, use, and delete.

Sandboxes

Commands accept an exact sandbox ID or a unique name. Lifecycle commands wait for the sandbox to settle; pass --no-wait to return once the request is accepted.
create also accepts --base-image, --max-ttl-seconds, --idle-ttl-seconds, --on-timeout pause|delete, and --max-concurrent-processes.

Run commands and open shells

run streams output and exits with the remote command’s exit code. Put -- before the command so its flags aren’t parsed as CLI options. In a shell, Ctrl+] is the emergency escape.

Desktops

desktop also accepts --port for the local port and --no-open to print the URL without opening a browser. See Desktops.

SSH and port forwarding

See SSH and port forwarding.

Disks

archil disk takes the same commands as the disk CLI:

Output and scripting

In a terminal, commands show progress and print tables. When stdout is piped, list, get, create, and the lifecycle commands print JSON instead; pass -o table or -o json to choose. Progress and errors go to stderr. Set NO_COLOR to turn colors off. The standalone disk and sandbox executables in the disk package take the same commands and keep their original output: tables unless you pass -o json, and Error (<status>): <message> errors.

Shell completion

Completion covers commands, options, profile names, and your sandbox names.