Create a project
init copies a starter into a new directory, names the project after it, installs and writes the .env files.
Installation walks through it and the first run.
init
pnpx @frigear-nu/cli init [dir] [--platform <platform>] [-t <template>] [--ref <ref>] [--force] [--no-install]
| Argument | Default | Purpose |
|---|---|---|
dir | frigear-app | Directory to create. Its name becomes the root package.json name. |
--platform, --starter | asked, web when not interactive | What to build: web, mobile, desktop, web,mobile or web,mobile,desktop, or the starter's name. See the table below. |
-t, --template | Any giget source to copy instead of a starter, for example gh:org/repo/path#ref. Not together with --platform. | |
--ref | main | Branch or tag of the repository to copy the starter from. |
--force | false | Write into a directory that is not empty. |
--no-install | Skip pnpm install and pnpm prepare:env. |
--platform | Starter (also accepted as the value) | What you get |
|---|---|---|
web | workspace | apps/web with sign-in, account pages and user management in the admin area |
mobile | mobile | apps/mobile, a Capacitor app that signs in at an existing issuer |
web,mobile | mobile-standalone | both, with apps/web as the app's OAuth server and API |
desktop | desktop | apps/desktop, a Tauri app that signs in at an existing issuer, or runs offline with its own server |
web,mobile,desktop | multi-platform | all three, with apps/web as the OAuth server and API of both apps |
With -t, the root package.json is still renamed (when there is one), and pnpm prepare:env only runs when the
template has that script.
Picked one platform and need another later? platform add adds it to the project you
have, with the same root scripts the bigger starter has.
create-frigear-app
pnpm create frigear-app [dir] [--platform <platform>] [-t <template>] [--ref <ref>] [--force] [--no-install]
npm create frigear-app@latest [dir] [--platform <platform>]
create-frigear-app is what pnpm create and npm create find. It has no dependencies: it runs init of
@frigear-nu/cli@latest with the package manager that started it (pnpm dlx, npx, yarn dlx or bunx), so it
takes the same arguments as init, and every CLI release reaches it without releasing create-frigear-app. The
starters come from main unless you pass --ref. Set FRIGEAR_CLI to run another CLI, such as
@frigear-nu/cli@0.1.0 or a packed tarball.
Next steps
- Installation – run the new project and sign in.
- Platforms – add a mobile, desktop or second web app.