Skip to main content

CLI commands

Executable entrypoints run with deno run (the generated project wires them up as deno task commands). They expose behavior, not exported symbols.

create​

deno run -A jsr:@nzip/lofi/create

The deno run -A jsr:@nzip/lofi/create <name> command: scaffolds a new local-first PWA project from the validated starter template. Pass --sync to also provision a managed Jazz app and write it into the project's .env, so the app can offer synced, backed-up accounts from the first boot.

build​

deno run -A jsr:@nzip/lofi/build

The deno task build command: builds the static PWA into dist/ with a source-hash build id, a service-worker precache manifest, and a scan that fails the build if server secrets leak into client output.

dev​

deno run -A jsr:@nzip/lofi/dev

The deno task dev command: runs the Astro development server after lofi preflight checks and diagnostics.

doctor​

deno run -A jsr:@nzip/lofi/doctor

The deno task doctor command: prints a value-free readiness report covering the package, Deno, project layout, environment, storage, identity, sync, and PWA, and exits non-zero when the project is blocked.

preview​

deno run -A jsr:@nzip/lofi/preview

The deno task preview command: serves the built dist/ output locally over HTTP for previewing the production PWA.

provision​

deno run -A jsr:@nzip/lofi/provision

The deno task jazz:provision command: generates a managed Jazz app and writes its configuration into .env, so the project can offer synced, backed-up accounts. Prints the new app id and how to claim it — never the secrets, which live only in the git-ignored .env.

test​

deno run -A jsr:@nzip/lofi/test

The deno task test command: runs the generated project's local-first test suite, retaining browser artifacts under test-results/.