disk npm package ships a CLI under the same name. Run it with npx disk from any machine that has Node, with no install required and no platform restrictions. Use it to create disks, list and inspect them, manage who can mount them, and run serverless commands against the data, all from a script, CI job, or your terminal. For a step-by-step walkthrough, see the Quickstart.
disk talks to the Archil control plane over HTTPS. It has no native dependencies and works on any platform Node.js does. This page is a reference for every command it accepts; for a walkthrough, see the Quickstart.
Authentication
disk reads credentials from environment variables or flags:
API keys are account-level credentials. They are not the same as disk tokens — see the disk users concept page.
Disks
disk list
List the disks in the current region.
-o json emits an array suitable for piping into jq.
disk get <id>
Show details for a disk: status, region, mounts, authorized users, connected clients.
disk create <name>
Create a new disk. The response includes a one-time disk token for mounting — save it; it cannot be retrieved again.
disk delete <id>
Delete a disk. This does not delete the underlying bucket data.
disk exec <id> <command...>
Run a bash command inside a Firecracker microVM with the disk mounted at /mnt/archil, which is also the working directory — so relative paths address the disk root. Stdout, stderr, and the exit code from the remote command are forwarded back. See Serverless Execution for the full model.
disk also accepts the sugar form disk <id> exec <cmd...> for ergonomics:
disk grep <pattern> <id>[/<path>]
Search a disk for lines matching a regular expression, using Search files. The part of the
target after the first / is the directory to search; without it, the whole disk is searched. The target accepts a
disk ID or name. The search is recursive unless you pass --no-recursive.
Text output prints matches as
file:line:text on stdout, and context lines as file-line-text with -- between
groups, like rg. A summary goes to stderr, with a warning when the search did not complete. The command exits 0
when it finds matches and 1 when it finds none.
API keys
API keys live at the account level. Manage them with theapi-keys subcommand.