nb env add

Save a named NocoBase API endpoint and switch the CLI to use that env. When oauth authentication is selected, nb env auth is started automatically.

Usage

nb env add [name] [flags]

Parameters

ParameterTypeDescription
[name]stringEnv name; prompted in TTY when omitted, required in non-TTY mode
--verbosebooleanShow detailed progress when writing config
--localestringCLI prompt language: en-US or zh-CN
--api-base-url, -ustringNocoBase API URL, including the /api prefix
--auth-type, -astringAuthentication type: token or oauth
--access-token, -tstringAPI key or access token used with token authentication

Examples

nb env add
nb env add local
nb env add local --api-base-url http://localhost:13000/api --auth-type oauth
nb env add local --api-base-url http://localhost:13000/api --auth-type token --access-token <token>