nb env
Manage saved NocoBase CLI envs. An env stores connection details and local runtime information, such as the API address, authentication info, local app path, and database configuration.
Starting from this version, the CLI separates two concepts:
current env: the env currently used by the active shell or agent runtime, isolated byNB_SESSION_IDwhen possiblelast env: the last env used globally, used as a fallback when session mode is not enabled
Usage
Subcommands
Examples
session mode
Session mode is recommended by default. It lets the current env in different terminals, shells, or agent runtimes stay isolated from one another instead of interfering in parallel.
If session mode is not enabled, nb env use updates the global last env, and other sessions without session isolation are affected as well.
See nb session setup for how to enable it.

