CLI
Primus provides two command-line tools:
- App scaffolder - create a new project from templates.
- Primus CLI - add pages and features to an existing project.
Scaffold a new app (create-primus-saas)
Create a full-stack app or pick a specific stack:
npx create-primus-saas my-app --stack fullstack --template saas
Available stacks:
fullstack(default) - .NET backend + React frontend + docker-composebackend- .NET backend onlyfrontend- React frontend onlyfrontend-angular- Angular frontend only
What it creates:
backend/ASP.NET Core Web APIfrontend/React (or Angular forfrontend-angular)docker-compose.ymlfor fullstack- Starter pages (dashboard, users, settings) based on template choice
Install the Primus CLI (primus)
The Primus CLI currently supports a single command: add.
npm install -g @primussoft/primus-cli
Available commands
# Add a page template
primus add page:dashboard
# Generate a CRUD page (requires a model name)
primus add page:crud --model Product
# Generate a CRUD API (requires a model name)
primus add api:crud --model Product
# Scaffold built-in features
primus add auth
primus add notifications
Project layout assumptions
The CLI assumes a conventional project structure:
- Frontend pages live in
src/pages - Backend code lives in
backend(or../backend/../PrimusDemoApi)
If your project uses a different layout, run the CLI from the repo root that matches these paths.