CLI
Primus UI CLI
Primus UI CLI commands and configuration.
The Primus UI CLI copies component source code into your project so you can fully customize it.
It is published on npm as primus-ui (verified at v1.0.1 on 2026-01-22).
Install and initialize​
Run the initializer in your project root:
npx primus-ui init
Non-interactive (CI/defaults):
npx primus-ui init --yes
This generates primus.json and creates src/components/ui.
Add components​
npx primus-ui add <component-name>
List available components​
npx primus-ui list
Configuration​
primus.json controls where components are installed:
{
"framework": "vite",
"componentsPath": "src/components/ui",
"tailwind": true,
"typescript": true,
"aliases": {
"components": "@/src/components/ui",
"utils": "@/lib/utils"
}
}
Primus SaaS CLI (scaffolding)​
For page and API scaffolding, use the Primus SaaS CLI:
npx primus-saas-cli add page:dashboard
npx primus-saas-cli add page:crud --model Product
npx primus-saas-cli add api:crud --model Product
This CLI generates templates in src/pages and backend folders based on your project layout.
Primus SaaS UI Components
@primus/ui-core is the zero-dependency base design system. All HTML elements — buttons, forms, tables, badges, cards — are styled automatically when the CSS is loaded. No classes required for most elements.