@primeuicom/cli
v1.1.10
Published
CLI utility for deploying PrimeUI exported projects to a local workspace.
Downloads
2,073
Readme
@primeuicom/cli
CLI utility for deploying PrimeUI exported projects to a local workspace.
Requirements
- Node.js
>=18 pnpmrecommended for local development
Quick Start
npx @primeuicom/cli <api-key>Skip git initialization and the initial commit:
npx @primeuicom/cli <api-key> --no-gitThe command runs a fully autonomous flow:
- Validates API key format.
- Authenticates with PrimeUI API v1.
- Triggers project export.
- Downloads export ZIP archive.
- Extracts files into
./<project-name-slug>. - Installs project dependencies with detected package manager.
Connect an existing project to PrimeUI:
npx @primeuicom/cli <api-key> connectThe command runs:
- Validates API key format.
- Authenticates with PrimeUI API v1.
- Detects project/monorepo root
- Request project info API endpoint
- Ensures the root
.gitignoreignores.primeui/project.jsonand.primeui/temp/ - Generates config schema:
{
"projectId": "project-id-from-primeui",
"apiKey": "pui_xxxxxxxxxxxxxxxxxxxxxx",
"targetProjectPath": "./"
}- If
.primeuialready exists in current directory chain, command stops and asks to remove existing config manually before reconnect.
Pull a fresh export into an already connected local project:
npx @primeuicom/cli pullOptional API key override:
npx @primeuicom/cli <api-key> pullThe command runs:
- Loads
.primeui/project.jsonfrom the connected project. - Uses the stored API key unless you pass an explicit one.
- Refuses to continue when
git statusis not clean. - Requires an explicit confirmation before rewriting files.
- Creates a fresh PrimeUI export and downloads the ZIP archive.
- Hard rewrites the configured target project path while preserving
.git,.primeui, andnode_modules. - Reinstalls dependencies with the detected package manager.
- Creates a git commit with the refreshed export state when files changed.
- Passing an explicit API key also refreshes
.primeui/project.jsonwith the current project binding. - If
.primeui/project.jsonis missing in a clean exported project,npx @primeuicom/cli <api-key> pullrecreates it before committing the refreshed state. - If the repository looks like a monorepo and PrimeUI cannot recover the saved target path, run
connectexplicitly first so you can choose the correct project folder beforepull. pullis intended for early-stage sync before heavy manual customization.pullis not a merge tool. Local files outside the preserved directories can be replaced or removed.
Local development and testing
Configure these environment variables for local development:
PRIMEUI_API_BASE_URL: PrimeUI API base URL (for examplehttp://localhost:3020when testing against local Studio API).
Publish
Publish flow includes:
- Update the package version (usually a patch bump).
- Publish with the
latesttag:
npm publish --tag latestCredits
PrimeUI 2026
