Demo

CLI

Install @quan-erp/cli from npm to scaffold projects and plugins, watch builds, produce production packs, and start the local base Docker stack. Run commands from a Quark ERP project root (or an empty folder for new-project).

Install

The official CLI is published as @quan-erp/cli on npm. Requires Node.js 18+. After install, quan-erp is the primary command (quark-erp and erp are aliases).

  • npm i -g @quan-erp/cli — install globally
  • quan-erp — primary command
  • quark-erp / erp — aliases for the same CLI
SHinstall
npm i -g @quan-erp/cli

Commands

Use these from a Quark ERP project root unless noted. Optional --version <tag> on new / new-plugin / new-project selects the template version (default latest).

CommandDescription
quan-erp version / -v / --versionPrint CLI version
quan-erp new / new-pluginScaffold a plugin from the official template
quan-erp new-projectClone the project template into the current directory
quan-erp watch <plugin>Watch and rebuild a plugin in development
quan-erp build:prod <plugin>Production build → base/available-plugins/
quan-erp pack:prod <plugin>Production build + zip archive
quan-erp base:devStart the base stack (docker compose -f base/docker-compose.yaml up -d)
quan-erp helpShow usage
TShelp
quan-erp help

new-project

Scaffold a full Quark ERP project from the official template into the current directory (use an empty folder).

TSnew-project
quan-erp new-project quan-erp new-project --version latest

new / new-plugin

Interactive scaffold for a plugin under plugins/. Prompts for name and related metadata, then creates the plugin from the official template.

TSnew plugin
quan-erp new quan-erp new-plugin quan-erp new-plugin --version latest

watch

Primary day-to-day command. Rebuilds the plugin in development and syncs artifacts into base/available-plugins/<name>/<version>/ (and installed-plugins when already installed).

  • Argument: plugin folder name under plugins/ (must match module.metadata.json name)
  • Run from the project root so plugins/ and base/ resolve correctly
TSwatch
quan-erp watch sample-es

build:prod & pack:prod

Use build:prod for a production-oriented compile into available-plugins. Use pack:prod when you also need a zip archive for distribution.

TSbuild & pack
quan-erp build:prod sample-es quan-erp pack:prod sample-es

base:dev

Start the local base Docker stack from the project root.

TSbase:dev
quan-erp base:dev # equivalent: docker compose -f base/docker-compose.yaml up -d

Output layout

Watch and production builds place versioned artifacts under available-plugins. Installing from the ERP UI activates the plugin under installed-plugins.

SHpaths
1base/available-plugins/<plugin-name>/<version>/ 2├── backend/ 3├── frontend/ 4└── module.metadata.json 5 6base/backend/installed-plugins/<plugin-name>/ 7├── backend/ 8├── frontend/ 9└── module.metadata.json

Tips

  • Prefer @quan-erp/cli from npm over any legacy repo-root ./erp binary
  • Run from the project root — relative paths plugins/ and base/ are required for watch / build / pack
  • pluginVersion in module.metadata.json becomes the available-plugins version folder
  • If the UI does not pick up changes, confirm the plugin exists under both available-plugins and installed-plugins
  • quan-erp help lists the commands your installed CLI supports
  • Package page: https://www.npmjs.com/package/@quan-erp/cli