nb portal create

Создаёт локальное рабочее пространство Portal из шаблона и создаёт или обновляет запись Portal

Использование

nb portal create <portal> [flags]

Параметр

ПараметрТипОписание
<portal>stringPortal name or slug.
--templatestringTemplate package, local path, or file:// URL. Default: @nocobase/portal-template-default.
--env, -estringCLI env name. If omitted, the current env is used.
--yes, -ybooleanSkip cross-env confirmation.
--titlestringPortal display title.
--forcebooleanDelete the existing workspace and recreate it.
--source-storagenocobase | gitWhere Portal source code is managed. Default: nocobase.
--git-repostringGit repository URL used with --source-storage=git.
--git-branchstringGit branch used with --source-storage=git.
--git-pathstringDirectory inside the Git repository; defaults to the repository root (.).

Примеры

nb portal create customer
nb portal create customer --template @nocobase/portal-template-default
nb portal create customer --env dev --yes
nb portal create customer --source-storage git --git-repo git@github.com:nocobase/customer-portal.git

Примечания

The command writes .env, .env.local, and portal.config.json. If the template contains package.json, it runs pnpm install. Portal names must use lowercase letters, numbers, underscores, or hyphens, and start with a lowercase letter or number.

Связанные команды