nb portal dev

Start development mode for the specified Portal's local source directory. It is normally used after nb portal create or nb portal pull.

It refreshes .env and .env.local in the local source directory, then runs pnpm dev there.

Usage

nb portal dev <portal> [flags]

Flag

FlagTypeDescription
<portal>stringPortal name or slug
--env, -estringCLI env name. If omitted, the current env is used
--yes, -ybooleanSkip the interactive confirmation when an explicit --env differs from the current env

Examples

Start development mode for a Portal in the current env:

nb portal dev customer

Start development mode for a Portal in a specified env:

nb portal dev customer --env dev --yes

Notes

dev starts the dev server from the Portal's local source directory. It doesn't create a Portal record, and it doesn't pull remote source; if the local source directory doesn't exist, use nb portal create or nb portal pull first.

The local source directory must contain package.json. ssh envs don't support starting Portal development mode yet.