CLI reference
Piral's tooling lives in the piral-cli package. You don't install it globally. Instead:
- Scaffolding is done with npm initializers (
npm init piral-instance,npm init pilet), which download a throwaway scaffolder on demand. - The initializers add
piral-cli(plus a bundler plugin) as a local dev dependency of the generated project. - You then run commands through the generated npm scripts (
npm start,npm run build) or directly withnpx(npx pilet build).
This keeps each project pinned to its own CLI and bundler versions, with nothing to maintain on your machine globally.
Scaffolding
npm init piral-instance
Create a new app shell.
npm init pilet
Create a new pilet for a given app shell.
Everything after the -- is forwarded to the initializer — don't drop it.
App shell commands
Run these from inside a shell project, via the generated scripts or npx.
piral debug
Start the app shell dev server (this is what npm start runs).
piral build
Build the app shell for production (this is what npm run build runs).
The default all produces both dist/release/ (deploy this) and dist/emulator/ (publish this for pilet developers).
piral publish
Publish the emulator package so pilet teams can install it.
This is equivalent to npm publish dist/emulator/<shell>-<version>.tgz. Use --registry to target a private registry.
Pilet commands
Run these from inside a pilet project.
pilet debug
Start the pilet dev server inside the emulated shell (this is what npm start runs). The target shell is read from your package.json.
pilet build
Build the pilet bundle.
pilet publish
Build (if needed) and publish to a feed service. Choose how you authenticate:
Use --interactive for day-to-day publishing from a developer machine — you don't need to create or store a secret. Use --api-key (from a CI secret) for pipelines and any non-interactive automation.
pilet upgrade
Upgrade the emulator dev dependency to a newer shell version.
pilet validate
Check the pilet's format and metadata before publishing.
Generated projects already wire npm start and npm run build to the right CLI calls. Add the rest ("publish": "pilet publish", "validate": "pilet validate") to package.json so your team and CI use one consistent entry point.