Command-line Interface (CLI) Basics

The Command-line Interface (CLI) provides all the same features as the Desktop App, and you can work with all of your Locations and Projects using the CLI.


CLI commands are always run in a local terminal, even when you are working with a remote Location.

You can learn about the CLI by opening a terminal and running nvwb --help or nvwb -h.

A simplified way of understanding the CLI is to divide it into two basic patterns, described below:

nvwb [command_1] [command_2] [flags]

  • The first argument command_1 is basically a “verb”, and the second, command_2, is an “object” or “objects”.

  • The flags specify special behavior of the command and are preceded by - or --.

  • Examples:

    • nvwb list contexts: prints a table of remote locations that have been added to your local AI Workbench.

    • nvwb list contexts --wide: prints the same table with extra columns of metadata.

    • nvwb create project: starts an interactive flow in the terminal to create a new Project in the current location.

  • Some commands don’t require a command_2, examples being:

    • nvwb deactivate: kills the active location in the terminal but does not shut down the Workbench Service.

    • nvwb deactivate --shutdown: the optional flag --shutdown will also kill the Workbench Service.

    • nvwb close: closes the currently open Project in the terminal but not if any applications are running in the container.

    • nvwb close -f: force closes any running applications and closes the Project.

nvwb [command_1] [variable_name] [flags]

  • The first argument command_1 is again a “verb”, and the second, <variable>, is a user-created name for a specific object like a Location, Project or Application.

  • Examples:

    • nvwb activate AWS-A100: activates the named location, AWS-A100, in the shell and prepends (nvwb: AWS-100) to your prompt.

    • nvwb open example_project: opens the Project example_project in the active location and prepends (nvwb: AWS-100/example_project) to your prompt.

    • nvwb start jupyterlab: starts the JupyterLab application in the currently open Project on the currently active Location.

    • nvwb start jupyterlab --no-gpus: starts the JupyterLab application but doesn’t mount GPUs into the container.

  • Pattern 1: nvwb command_1 [command_2] -h prints the help menu in the terminal, where the second command is optional.

    • Examples

      • nvwb list -h prints the help menu for the list command.

      • nvwb list projects -h prints the help menu for listing Projects.

  • Pattern 2: nvwb command_1 -h prints the help menu in the terminal.

    • Examples

      • nvwb open -h prints the help menu for the open command.

      • nvwb history -h prints the help menu for history command.

Previous Introduction
Next Managing Locations with CLI
© Copyright 2023-2024, NVIDIA. Last updated on Jan 21, 2024.