NocoBase CLI
Description
NocoBase CLI (nb) is the command-line entry point for initializing, connecting to, and managing NocoBase apps in a local workspace.
It supports two common setup paths:
- Connect an existing NocoBase app and save it as a CLI env
- Install a new NocoBase app from Docker, npm, or Git, then save it as a CLI env
When creating a new local app, nb init can also install or update NocoBase AI coding skills. Use --skip-skills when you want to skip that step.
Usage
The root command mainly displays help and dispatches execution to command groups or standalone commands.
Topics
nb --help shows the following topics:
Commands
Standalone commands exposed directly by the root command:
Display help text
Show help for the root command:
Show help for a command or command group:
Examples
Interactive setup:
Browser-based setup:
Create a Docker-based app non-interactively:
Connect an existing app:
Start the app and refresh runtime commands:
Call an API:
View CLI default config:
View commercial license status:
Environment variables
The following environment variables affect CLI behavior:
Example:
Configuration files
Default config file:
After setting NB_CLI_ROOT=/your/workspace, the config file path becomes:
The CLI also keeps compatibility with legacy project config under the current working directory.
Current env session cache is stored in:
The globally last-used env is stored in the lastEnv field in config.json. When NB_SESSION_ID is not set, the CLI falls back to that global value.
Runtime command cache is stored in:
This file is generated or refreshed by nb env update and caches runtime commands synchronized from the target app.

