Interactive CLI Use
Overview
Interactive use is done with nvwb and follows the activate/open model.
You activate a location, open a project, run commands, close that project and switch to another or deactivate the location when you are done.
This is the same workflow as the Desktop App, just in a terminal.
One terminal binds to one location and one project at a time.
Run nvwb activate <location> to attach a terminal to a location.
Run nvwb open <project-name> to attach the terminal to a project within that location.
All subsequent commands target that location and project until you change them.
To work on multiple projects, just use multiple terminals.
Each terminal maintains its own session state. Open a second terminal, activate the same or a different location, and open a different project.
Key Concepts
Activate / Deactivate
Binds or unbinds a terminal to a location.
When a location is active, (nvwb:<location>) appears in your prompt.
Open / Close
Binds or unbinds a terminal to a project within the active location.
When a project is open, commands like build, start and status target that project.
Start a Location and Open a Project
Step One: List available locations.
-
Run the following command:
-
Verify the location you want to use appears in the list
Step Two: Activate the location.
-
Run the following command, replacing
<location>with the location name: -
Verify that
(nvwb:<location>)appears in your prompt
Step Three: Open a project.
-
List available projects:
-
Open the project by name or path:
If you are already in the project directory, use
.instead:
Success: Your terminal is now bound to a location and project. Commands like status, build and start target that project.
Check Project Status
Run status to see the current state of the open project.
The output shows the build state, run state, applications and git status.
Build and Start an Application
Step One: Build the project container.
-
Run the following command:
-
Wait for the build to complete
To force a complete rebuild from scratch, use --full-build:
Step Two: Start an application.
-
List available applications:
-
Start the application by name:
To prevent the browser from opening automatically, use --no-browser:
To start the project container without starting any application, use --container:
Success: The application is running and accessible at the URL shown in the output.
Attach a Shell to the Container
Use attach to open an interactive shell inside the running project container.
To attach to the host machine running the AI Workbench service instead, use
--host:
Manage Packages
You can add and remove packages through the CLI.
Package changes modify the project configuration files and take effect on the next build.
Manage Environment Variables
Set environment variables that the project container uses at runtime.
Set sensitive environment variable.
If the container is running, stop it first with nvwb stop <app-name> or by stopping all applications.
If a new value is needed for a sensitive environment variable, it can be deleted and created again.
Version Control
The CLI provides git operations without leaving the terminal.
Run nvwb connect integration Github (or Gitlab) before using commands that interact with a remote repository.
See Integrations and Credentials for details.
Edit Environment Scripts and Project Files
Open environment scripts directly from the CLI.
Available scripts:
preBuild.bash,postBuild.bash, andonStart.bash. The first three scripts run during the container build;onStart.bashruns each time the project container starts.
Open any project file for editing.
Close and Deactivate
When you are done, close the project and deactivate the location.
Related Topics
- AI Workbench Command Line Interface (CLI) Reference - Full CLI command reference
- Basic Quickstart (CLI) - CLI quickstart tutorial
- Using the CLI Binary for Scripts and Agents - Using the CLI binary for scripts and agents
- Setting Up an Agent Skill - Setting up an agent skill for the CLI