Create projects from LAST templates. Pick Payload + TanStack Start (with CMS) or blank TanStack Start (no CMS).
Bare Payload v4 + TanStack Start starter. Boots standalone: placeholder /, admin at /admin, REST at /api/*. Users-only auth, en-only, Postgres push:false.
- CMS:
userscollection with auth, plain lexical editor, committed migrations (bun run db:migrate), first user viabunx payload create-first-user. - Shell:
withPayloadRoot+ThemeProvider(class mode) + Base-UIToaster(toast.add(), never sonner); site 404 (SiteNotFound) + error boundary (SiteError); favicon +robots.txt(admin/api disallowed). - Backend kernel (
src/server/):{ data }/{ error }envelope,HttpError(5xx hidden on wire),withContext(request-id, logs, never-throws), zodparseWith+parseJsonBody+parseSearchParams+parsePaginationParams(limit 1–100 default 20). Business Postgres via Bun-nativegetBusinessSql()/getBusinessDb(). - Ops:
/api/live(no I/O) +/api/ready(DB probe, 503 when degraded), DockerHEALTHCHECK, minimal security headers, graceful shutdown (Nitro close + SIGINT/SIGTERM drain),bun run smokeboot contract, CI (typecheck + biome + migrate + test + node-server build + live smoke),compose.yamllocal Postgres (bun run db:up), single.bun-versionsource. - Frontend: TanStack Query/Form/Store wired (no explicit providers), Tailwind v4 semantic tokens, shadcn components including a development-only
/uishowcase with sidebar, CodeBlock, and Trace examples.
Deliberately not included: real auth beyond Payload users, collections beyond users, i18n (stays en-only until the app has ≥2 locales), pagination UI, rate limiting, OpenAPI, email/storage/RAG/chat.
Bare TanStack Start starter, no CMS. Boots standalone: placeholder /, REST health at /api/*. Owns the canonical business-backend kernel in src/server/ — { data } / { error } envelope, HttpError (5xx hidden on wire), withContext (request-id, never-throws), zod helpers, Bun-native Postgres (getBusinessSql() / getBusinessDb()), /api/live (no I/O) + /api/ready (DB probe) — plus compose local Postgres, smoke boot contract, and CI.
Deliberately not included: Payload, /admin, collections, auth beyond the withAuth 501 stub.
bunx --bun --package @lst97-oss/last-cli last-cli create my-appYou can also run it with npm and Node.js 22 or newer:
npx @lst97-oss/last-cli create my-appThe interactive prompts let you select the template and choose whether to install dependencies with Bun and initialize Git. To accept the defaults without prompts, add --yes:
bunx --bun --package @lst97-oss/last-cli last-cli create my-app --yesThe command creates my-app, updates its package name and README title, copies .env.example to .env, and optionally runs git init and bun install. It does not run database migrations.
After creation, edit .env and start the app:
cd my-app
bun run db:up # local Postgres via compose.yaml
bun run db:migrate
bun run generate:types
bun run generate:importmap
bun run generate-routes
bun run devbun install
bun run build
bun test
bun run check # format check + Biome lint + bun check typecheck
bun run format # bun fmt (Bun 1.4.4+)
bun run lint:fix # apply Biome lint/import fixes
bun check --no-script # raw typecheck (bare `bun check` runs the aggregate `check` script)Node.js 22 or newer is required when running through npm. Bun can run the CLI with bunx --bun and is used to install and run the generated template.
MIT