nb portal pull

Pull portal source from source storage into the local workspace

Usage

nb portal pull <portal> [flags]

Flag

FlagTypeDescription
<portal>stringPortal name or slug.
--env, -estringCLI env name. If omitted, the current env is used.
--yes, -ybooleanSkip cross-env confirmation.
--forcebooleanDelete the existing local workspace and pull it again.
--pathstringPortal workspace directory. Defaults to the saved path, then ./<portal>.
--git-repostringTemporarily pull source from this Git repository without updating the portal source configuration.
--git-branchstringGit branch for the temporary --git-repo pull. Defaults to main.
--git-pathstringDirectory inside the temporary Git repository. Defaults to the repository root (.).
--install / --no-installbooleanRun pnpm install after pulling source. Enabled by default.

Examples

nb portal pull customer
nb portal pull customer --env prod --yes
nb portal pull customer --path ./portals/customer
nb portal pull customer --git-repo git@github.com:nocobase/customer-portal.git --git-branch main --git-path portals/customer
nb portal pull customer --force
nb portal pull customer --no-install

Notes

When the pulled workspace contains package.json, pnpm install runs by default. Use --no-install to skip it.

Git source storage clones the configured repo and branch, then copies --git-path. To pull from a Git repo one time without changing the remote portal record, pass --git-repo; --git-branch and --git-path can only be used together with --git-repo. Use nb portal config when you want to persist Git source settings.

With default nocobase storage, pull downloads a source archive through the API and writes it to the development workspace. After a successful pull, the development workspace path is saved to the CLI env config as portals.<portal>.path.