Common arguments


Make the operation more talkative. Can be set also via environment variable ROOTBOX_CLI_VERBOSE.


Displays the URL of the request to the API
rbx image list --verbose


In case of queued event do not wait for completion

It allows to perform operations asynchronously, which can be used to optimize the execution time of scripts.


Create virtual machine without waiting for the process to be completed
rbx vm create --name test-vm --os-disk ssd,10 --type a1.nano --image debian --ssh my-ssh --no-wait


Dry run for the request

Try to perform operations without making any real changes:

rbx disk create --name --type ssd --size 25 --dry-run


Specify output format of command. Can be set also via environment variable ROOTBOX_CLI_OUTPUT.

Available formats

  • table - Simple results as tabular (default).
  • list - Subsequent properties line by line.
  • tsv - Mostly works like tabular format, but without the header row. Efficiently usable in awk and shell.
  • json - Raw response of API
  • yaml - Full response displayed as YAML
  • id - Just resource ID line by line
View all disks in tsv format
rbx disk list -o tsv
View all networks in list format
rbx network list -o list
View all virtual machines in table format
rbx vm list -o table


JMESPath query string

JMESPath is quite a powerful tool that allows to efficiently obtain specific information about resources.

See the documentation and examples published on for details about syntax.


Calculates the total size of disks
rbx disk list -o json --query 'sum([].size)'
Summarize image size
rbx image list --query '[].{name:name,diskCount:length(disks),fileSize:fileSize}'
Attach all detached disk to VM
rbx disk list --query "[?state=='Detached'].{id:_id}" -o tsv | xargs -r -n 1 rbx vm disk attach --vm test-vm --disk
Stop all running virtual machines
rbx vm list --query "[?state=='Running'].{id:_id}" -o tsv | xargs -r -n 1 rbx vm stop --vm
Create new disk and attach to virtual machine
$ DISK_ID=$(rbx disk create --name my-ambigious-name --type ssd --size 10 -o tsv --query '[].[_id]')
$ rbx vm disk attach --vm test-vm --disk $DISK_ID

Note (1): In most cases, you can avoid using ID by naming resources uniquely.


Perform action without additional confirmation


Remove disk without additional confirmation
rbx disk delete --disk test-disk --yes

Note (1): Pretty useful when writing automatic scripts.


Override current project on the request. Can be set also via environment variable ROOTBOX_PROJECT.

A parameter intended for selecting an ad-hoc project for a single command.


List virtual machine on selected project
rbx vm list --output tsv --project-select MyProject
Czy uważasz ten artykuł za przydatny? Tak Nie