nb env update
nb env update updates the configuration of a saved env. You can use it to adjust the API address, authentication method, source origin, local app path, public path, port, database parameters, and more. After the update finishes, the CLI automatically handles any required follow-up steps according to the changes.
If you do not pass any configuration parameters, the CLI still performs a re-sync based on the current env state.
Usage
Common options
API and authentication options
Source and download options
Application options
Database options
Configuration cleanup
Notes
Tip
If you only want the CLI to re-sync based on the latest state of the current env, simply run nb env update or nb env update <name> without extra options.
- After the update is complete, the CLI automatically handles any required follow-up synchronization based on the changes made this time
- Other options only update the saved env configuration; they do not automatically restart the application or replace local source code or Docker images
- After modifying settings such as
app-path,app-port,timezone, ordb-*, the CLI usually prompts you to runnb app restart --env <name>; if the change involves the built-in database managed by the CLI, it will prompt you to usenb app restart --env <name> --with-db - After modifying settings such as
app-port,app-public-path, orcdn-base-urlthat affect reverse-proxy output, rerunnb proxy nginx generateornb proxy caddy generateif you already use a generated proxy config - When updating source settings such as
source,download-version,docker-registry,git-url, ornpm-registry, only the saved values are changed. Existing local source code, dependencies, and images are not automatically replaced --access-tokencannot be used together with--auth-type basicor--auth-type oauth- The same field cannot be used with both
--unsetand an explicit value at the same time. For example, do not use--unset git-urltogether with--git-url ... - If you switch the authentication method to
basicoroauth, or clear the token, you usually need to runnb env auth <name>afterward

