CLI Reference

The DevZero CLI (dz) allows users to use DevZero directly from the terminal.

Installation #

See instructions

Authenticate #

Log in to DevZero to authenticate dz with the login command:

dz login
  1. You should automatically be directed to the browser, but if not, simply cmd+click on the authentication link.
  2. Ensure the confirmation code displayed in the browser matches up with the one in your terminal.
  3. Log in to DevZero if you aren’t already.
  4. That’s it - you’re in!‍

Usage and common commands #


This will establish an SSH connection with a developer environment.

dz ssh

VS Code and other IDEs #

VS Code #

code will open up an environment in VS Code.

dz code

Jetbrains IDEs #

For Jetbrains IDEs (IntelliJ, Goland, PyCharm etc):

  1. Install the IDE on your DevBox
  2. Download Jetbrains Gateway from here
  3. Use the ide command
dz ide goland # for Goland
dz ide idea # for Idea Ultimate
dz ide pycharm # for PyCharm

Help (+ other commands) #

You can easily see all available commands by using help:

$ dz help
DevZero enables development in the cloud

  dz [command]

Available Commands:
  cdk         cdk utilities
  completion  Generate the autocompletion script for the specified shell
  help        Help about any command
  ide         Connects an IDE to a box
  kube        devzero in k8
  login       Authenticates the user
  machines    manage VMs
  onboard     Simplify DZ onboarding tasks
  ssh         Connect to a running DevZero instance
  update      Updates the dz binary
  version     CLI version

  -h, --help              help for dz
  -p, --password string   password for auth
  -u, --username string   username for API-auth

Use "dz [command] --help" for more information about a command.

To get more information about a specific command:

dz <command> --help

Completion #

dz completion bash > /etc/bash_completion.d/dz
sudo bash -c "dz completion bash > /etc/bash_completion.d/dz"
source /etc/bash_completion.d/dz


Cloudformation functionality is available under dz cdk

Onboard #

dz onboard create-keys will automatically create a private/public ssh keypair on your local machine, and send the public key up to DevZero. We place this public key on machines that you launch so that you can connect to them from your local computer. All of your keys created with DevZero are visible in your profile settings.

Simplifying Environment Setup With DZ Magic #

DZ Magic is a versatile command-line tool designed to streamline the process of setting up development environments. With just a few simple steps, DZ Magic collects information about your local repositories, installed packages, dotfiles, and Visual Studio Code extensions, and compiles them into a convenient template.

dz onboard magic
dz onboard magic-delete

Kubernetes #

Kubernetes related functionality is available under dz kube

Installing and using the DZ CLI from a DevBox #

Add this snippet to the scriptpolicy of a Template (or your Personal Policy) to install dz automatically in your environments:

- script: |
    cd /home/devzero
    curl -o dz
    chmod +x dz
    sudo mv dz /usr/local/bin/
  runas: devzero

Feature requests #

If there’s anything you wish you could do from your terminal that isn’t in the DZ CLI yet, please drop us a line at!

NextTemplating Syntax