nb source download

Fetch NocoBase from npm, Docker, or Git. --version is shared by all three source types: npm uses a package version, Docker uses an image tag, and Git uses a git ref.

Usage

nb source download [flags]

Parameters

ParameterTypeDescription
--yes, -ybooleanUse defaults and skip interactive prompts
--verbosebooleanShow verbose command output
--localestringCLI prompt language: en-US or zh-CN
--source, -sstringSource type: docker, npm, or git
--version, -vstringnpm package version, Docker image tag, or Git ref
--replace, -rbooleanReplace the target directory if it already exists
--dev-dependencies, -D / --no-dev-dependenciesbooleanWhether npm/Git installs devDependencies
--output-dir, -ostringDownload target directory, or directory for the Docker tarball
--git-urlstringGit repository URL
--docker-registrystringDocker image repository name without tag
--docker-platformstringDocker image platform: auto, linux/amd64, or linux/arm64
--docker-save / --no-docker-savebooleanWhether to save the pulled Docker image as a tarball
--npm-registrystringRegistry used for npm/Git downloads and dependency installation
--build / --no-buildbooleanWhether to build after npm/Git dependency installation
--build-dtsbooleanWhether to generate TypeScript declaration files during npm/Git build

Examples

nb source download
nb source download -y --source npm --version alpha
nb source download -y --source npm --version alpha --no-build
nb source download --source npm --version alpha --output-dir=./app
nb source download --source docker --version alpha --docker-registry=nocobase/nocobase --docker-platform=linux/arm64
nb source download -y --source docker --version alpha --docker-save -o ./docker-images
nb source download --source git --version alpha --git-url=git@github.com:nocobase/nocobase.git
nb source download --source git --version fix/cli-v2
nb source download -y --source npm --version alpha --build-dts
nb source download -y --source npm --version alpha --npm-registry=https://registry.npmmirror.com

Version Aliases

With Git source, common dist-tags are resolved to branches: latest -> main, beta -> next, alpha -> develop.