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
npm i -g @quan-erp/cliCommands
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).
| Command | Description |
|---|---|
| quan-erp version / -v / --version | Print CLI version |
| quan-erp new / new-plugin | Scaffold a plugin from the official template |
| quan-erp new-project | Clone 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:dev | Start the base stack (docker compose -f base/docker-compose.yaml up -d) |
| quan-erp help | Show usage |
quan-erp helpnew-project
Scaffold a full Quark ERP project from the official template into the current directory (use an empty folder).
quan-erp new-project
quan-erp new-project --version latestnew / new-plugin
Interactive scaffold for a plugin under plugins/. Prompts for name and related metadata, then creates the plugin from the official template.
quan-erp new
quan-erp new-plugin
quan-erp new-plugin --version latestwatch
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
quan-erp watch sample-esbuild: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.
quan-erp build:prod sample-es
quan-erp pack:prod sample-esbase:dev
Start the local base Docker stack from the project root.
quan-erp base:dev
# equivalent: docker compose -f base/docker-compose.yaml up -dOutput layout
Watch and production builds place versioned artifacts under available-plugins. Installing from the ERP UI activates the plugin under installed-plugins.
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.jsonTips
- 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