@vendure-platform/create
v0.5.0
Published
CLI tool to scaffold a Vendure demo project with Vendure Platform plugins
Readme
@vendure-platform/create
Scaffold a Vendure Platform project with selected plugins, Docker infrastructure, demo data, and an optional Next.js storefront.
Usage
npx @vendure-platform/create my-projectThis starts an interactive setup. For non-interactive usage, provide both --plugins and --company:
npx @vendure-platform/create my-project \
--company "Acme Corp" \
--plugins approval-workflows,price-rules \
--no-storefrontCLI Flags
| Flag | Description | Default |
|------|-------------|---------|
| --plugins <list> | Comma-separated optional plugin keys | (interactive prompt) |
| --company <name> | Company name for branding | (derived from project name) |
| --registry-token <token> | Vendure private-registry npm auth token (baked into .npmrc) | (interactive prompt) |
| --license-token <token> | Vendure Platform server-side license token (written to .env) | (interactive prompt) |
| --no-storefront | Skip the Next.js storefront | included |
| --github | Create a private GitHub repo via gh CLI | no |
| --github-org <org> | GitHub organization for the repo (only used with --github) | vendurehq |
| --no-install | Skip npm install after scaffolding | runs install |
| --no-git | Skip git init | inits git |
| --dry-run | Print what would be created without writing files | off |
When --plugins and --company are both provided, the CLI runs in non-interactive mode.
Tokens: registry vs license
The Vendure Enterprise Portal issues two distinct tokens with different purposes - keep them straight:
- Registry token: npm auth token for the private registry. Lets
${pm} installdownload@vendure-platform/*packages. The CLI writes it into the project.npmrcas_authToken..npmrcis gitignored. - License token: checked at server boot by the License Guard plugin. The CLI writes it into
.envasVENDURE_PLATFORM_LICENSE_TOKEN.
They are not interchangeable. Pass each via its dedicated flag (--registry-token, --license-token) or paste each at its own interactive prompt. Either can be skipped (blank input) if you want to add it later.
Plugin Tiers
Plugins fall into three tiers (mirroring @vendure-platform/plugin-meta):
- Core: always active, can't be disabled. Hidden from the interactive prompt.
- Optional: active by default. Pre-ticked in the prompt; deselect to emit
<key>: falsein the generatedvendure-config.ts. - Requires config: inactive by default. Pick from the prompt to enable; the generated config carries the env-var-driven options block.
| Key | Plugin | Category | Tier |
|-----|--------|----------|------|
| license-guard | License Guard | platform | core-requires-config |
| org-hierarchy | Org Hierarchy | b2b | core |
| advanced-search | Advanced Search | search | core |
| workflow-engine | Workflow Engine | platform | core |
| approval-workflows | Approval Workflows | b2b | optional |
| global-search | Global Search | search | optional |
| entity-access-control | Entity Access Control | b2b | optional |
| tax-id-management | Tax ID Management | b2b | optional |
| shopping-list | Shopping List | commerce | optional |
| quick-order | Quick Order | commerce | optional |
| reorder-from-history | Reorder from History | commerce | optional |
| store-credit | Store Credit / Gift Cards | commerce | optional |
| quote-management | Quote Management | b2b | optional |
| price-rules | Price Rules | commerce | optional |
| packaging-units | Packaging Units | commerce | optional |
| content-versioning | Content Versioning | platform | optional |
| configurator | Configurator | commerce | optional |
| sso | SSO | platform | requires-config |
| audit-trail | Audit Trail | platform | requires-config |
The canonical list lives in libs/plugin-meta/src/index.ts; this table mirrors it.
Dependencies
Inter-plugin dependencies are resolved by VendurePlatform.init() at runtime - not by the scaffolder. Selecting approval-workflows will activate org-hierarchy and workflow-engine automatically (they're core anyway). Selecting global-search will activate advanced-search (also core). Integration sub-plugins between active pairs are wired automatically.
After Scaffolding
cd my-project
docker compose up -d
npm run populate
npm run devSee the Quick Start guide for the full walkthrough.
