Using the CLI#
Overview#
- Using the CLI requires you to do the full local install.
Installing the Desktop App install in remote only mode does NOT include the full AI Workbench CLI. There is a partial CLI installed, but it’s not for users.
To get the full CLI on your local machine you must do the full local install.
- The CLI provides many of the same features as the Desktop App.
You can manage locations, projects, environments and applications. Run
nvwb --helpto see available commands andnvwb <command> --helpfor the full syntax and flags of any command.- On Windows, you must use the CLI in the AI Workbench WSL2 distribution.
It is not available on the Windows side, but you can use it by opening a terminal for the
NVIDIA-Workbenchdistribution.- There are two CLI modes: interactive via
nvwbor individual commands direct through the binary. Interactive mode uses the
nvwbshell wrapper command that is sourced into your shell through.bashrc. It is not the binary itself.For scripts and agents, you should configure things to call the binary directly with
~/.nvwb/bin/nvwb-cli.- The commands
activate,deactivate,openandcloseset shell state interactively. These commands set or unset environment variables in an interactive shell session via
nvwb <command>.They are not for calling the CLI binary directly by scripts or agents. Scripts and agents must use the
-cand-pflags with the binary to explicitly identify the location (“context”) and project on every call where relevant.- The built-in help flag is the primary reference for the CLI.
The how to pages and the CLI reference page provide context, organization and output details for what the
--helpflag produces.Use
--helpfor flags and arguments; use the docs for context and behavioral guidance.
Key Concepts#
- Shell wrapper
The
nvwbcommand available in your terminal locally after the full install or on a remote. A bash function sourced from~/.local/share/nvwb/nvwb-wrapper.shthrough.bashrc. Handles session state commands and passes everything else to the binary.- CLI binary
The actual executable at
~/.nvwb/bin/nvwb-cli. Scripts and agents should call this directly rather than relying on the shell wrapper.- Context/Location
Context is the legacy term for a location in the Desktop App. It hasn’t been refactored in the CLI and is present as the
-cflag and the commandnvwb list contexts- Session state
Environment variables tracked by the wrapper script about the active context and open project in a terminal. Set when using the wrapper
nvwbwith the commandsactivate,deactivate,open, andcloseare not used when calling the binary directly.