> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/ai-workbench/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/ai-workbench/_mcp/server.

> Overview of using the AI Workbench CLI for interactive use, scripting

# 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 --help` to see available commands and `nvwb <command> --help` for 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-Workbench` distribution.

**There are two CLI modes: interactive via** `nvwb` **or individual commands direct through the binary.**

Interactive mode uses the `nvwb` shell 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`**,** `open` **and** `close` **set 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 `-c` and `-p` flags 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](/ai-workbench/reference/user-interface/cli) provide context, organization and output details for what the `--help` flag produces.

Use `--help` for flags and arguments; use the docs for context and behavioral guidance.

## Key Concepts

**Shell wrapper**

The `nvwb` command available in your terminal locally after the full install or on a remote.
A bash function sourced from `~/.local/share/nvwb/nvwb-wrapper.sh` through `.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 `-c` flag and the command `nvwb 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 `nvwb` with the commands `activate`, `deactivate`, `open`, and `close` are not used when calling the binary directly.