Creating your first pilet
A pilet is a single feature module — built, deployed, and loaded into the shell independently. This guide takes one from scaffold to published version. The thing that makes the loop pleasant is the emulator: it gives you the real app shell locally, so you can develop and test a pilet with hot reload and accurate types, without running any platform infrastructure.
Scaffold
--source is the app shell's package name (or a path to its emulator .tgz while you develop locally). The initializer installs the emulator and piral-cli for you.
Write the pilet
A pilet has exactly one required entry: an exported setup function. The shell calls it once when the pilet loads, handing over the typed Pilet API — and everything the pilet contributes (pages, menu items, extensions) is registered from there. Import PiletApi from the shell package so the API is typed to your shell:
src/index.tsx:
Develop locally
With hot reload. No platform access needed — the emulator provides the full shell.
Build and publish
Publishing locally? Use --interactive to log in through your browser — there's no API key to create, store, or paste into the terminal:
In CI/CD (no browser), authenticate with an API key from a secret instead — see the pipeline below.