Back to Nocobase

nb self update

docs/docs/en/api/cli/self/update.md

2.1.261.4 KB
Original Source

nb self update

Update the installed NocoBase CLI when the current CLI is managed by a standard global npm, pnpm, or yarn installation.

Usage

bash
nb self update [flags]

Parameters

ParameterTypeDescription
--channelstringRelease channel to update to, default auto; options: auto, latest, test, beta, alpha
--yes, -ybooleanSkip update confirmation
--jsonbooleanOutput JSON
--skillsbooleanAlso refresh the globally installed NocoBase AI coding skills
--verbosebooleanShow detailed update output

Update Behavior

nb self update first detects the current install method at runtime. It does not use the historical self-install-methods.json cache.

When an update is available, the command uses the same package manager that manages the current global CLI install:

Install methodUpdate command
npm-globalnpm install -g @nocobase/cli@<channel>
pnpm-globalpnpm add -g @nocobase/cli@<channel>
yarn-globalyarn global add @nocobase/cli@<channel>

Interactive confirmation defaults to yes. Use --yes to skip the prompt in scripts.

Examples

bash
nb self update
nb self update --yes
nb self update --skills
nb self update --channel alpha --json