pnpm new

The scaffolder stamps a new app from _template/* into apps/<slug>. It refuses to overwrite an existing app, validates every input, strips feature-marker blocks, and guarantees no template token or marker leaks into the result (a leak deletes the broken app and errors).

pnpm new <slug> [options]        # slug must be kebab-case: ^[a-z][a-z0-9-]*$
pnpm new                         # no args in a TTY = interactive wizard

Flags

  • --title "My App" — display name (string; default: Title Case of the slug)
  • --tagline "..." — hero title (string; default: "<Title> — up and running.")
  • --description "..." — hero subtitle + package description (string; default: generic)
  • --type — app shape: webapp | website | website-blog | website-blog-docs | single-page (default: webapp)
  • --stack — react | static (default: react). static = plain HTML+JS+vanilla CSS BEM, website types only
  • --db — convex | supabase (default: convex). webapp only; supabase needs --stack react
  • --layout — authed app layout: sidebar | header | windows | macos (default: sidebar; webapp only)
  • --design — chrome design preset (default: minimal; one of 100, validated against the shell; react stack only)
  • --accent — accent color (default: blue; one of 18: blue, violet, indigo, cyan, teal, green, lime, amber, orange, rose, red, magenta, purple, sky, emerald, gold, slate, coral)
  • --mode — dark | light (default: dark)
  • --features a,b,c — optional features (default: all; webapp only; see the feature pool below)
  • --demo — crm | tasks | catalog | ./spec.json — start from a demo app: a generated domain (schema + backend + multi-view page) replaces the example/records placeholders. Forces --type webapp on the react stack
  • --fields "..." — reshape fields: "-key" removes, "[+]key:type[:Label]" adds/replaces. Works with --demo or alone (reshapes the generic records baseline)
  • --table <name> — rename the demo's primary table (camelCase; with --demo or --fields)
  • --labels "One,Many" — rename its labels, e.g. --labels "Client,Clients"
  • --port <n> — dev port (number; default: next free port in the 52xx range)
  • --list [--json] — print the catalogs and exit
  • --json — emit a final machine-readable @geenius-mvp:result line
  • --interactive — force the guided wizard

Feature pool

Convex: example, records, activity, api-keys, team, billing, admin, inbox, feedback, ai, uploads, mcp. Supabase: the same minus activity. settings + dashboard are always on. mcp implies api-keys — it is added automatically if omitted. --features only applies to --type webapp; passing it with another type is an error.

Demo flags: --demo, --fields, --table, --labels

pnpm new my-crm --demo crm --table clients --labels "Client,Clients" \
  --fields "+source:select:Lead source,-notes"
pnpm new my-app --fields "+points:number,-notes"     # no demo: reshapes the records baseline
pnpm new my-app --demo ./my-spec.json                 # community spec file
  • --demo <id> — one of crm, tasks, catalog: the codegen generates the schema block, CRUD backend (Convex) or SQL+RLS (Supabase), select-option constants, and a multi-view page from the spec. Each demo sets default design/accent/layout (crm: saas·blue·sidebar; tasks: dashboard·violet·header; catalog: minimal·teal·sidebar) — all overridable. Features default to everything except the example/records placeholders.
  • --demo ./spec.json — load a community spec file: { title, entities: [{ table, labels: [singular, plural], fields, titleKey, statusKey?, dateKey?, amountKey?, imageKey?, positionKey?, seed?, icon? }], defaults? }. The spec is validated (camelCase table, two labels, valid field types, select options, titleKey must name a field) with the exact error on failure.
  • --fields — comma-separated modifiers applied to the primary entity: -key removes a field (removing the title field is an error); key:type[:Label] (optional + prefix) adds a field or replaces an existing one. The 9 types: text, longtext, number, boolean, select, tags, date, image, position. New selects get placeholder one/two/three options; a missing Label is derived from the key. Backend AND frontend follow.
  • --fields without --demo — reshapes the generic records baseline: the generated records domain replaces the records feature.
  • Role keys auto-drop: if a status/date/amount/image/position role field is removed or its type changes, that role key is dropped and its views (board, timeline/calendar, stats totals, gallery, canvas) hide automatically.
  • Seed rows follow: seed values for removed fields are dropped, and a row is dropped entirely if its title value no longer lines up.
  • --table / --labels — rename the primary entity (the demo-eject move); they require --demo (or --fields).
  • Constraints: --demo builds a webapp (--type other than webapp errors) and needs --stack react; --db convex or supabase both work.

The result: a .demo.json manifest in the app root (id, db, per-entity featureId/table/path/titleKey/labels/hasSeed/mcp) — pnpm smoke reads it to drive the demo round-trip — and, with --json, a demo object in the result line listing each generated table and its field keys. See the Demo apps page for the three demos in detail.

The wizard

Running pnpm new with no arguments in a terminal (or with --interactive) starts a guided wizard that walks the same choices — name, type, stack, db, layout, design, accent, mode, features — and validates as it goes. AI agents should pass explicit flags instead.

--list and --list --json

pnpm new --list          # human catalogs: 100 designs, 18 accents, features, layouts, types, stacks, dbs, demos
pnpm new --list --json   # the FULL machine manifest in one call

The JSON manifest contains tool/version, usage strings for every command, types (with backend/singlePage flags), stacks, dbs with their per-db feature pools, layouts, the full design catalog with categories, accents, modes, deployProviders, demos (per demo: title, description, entities with fields and seedRows, defaults, fieldTypes, and a ready-to-use usage string), demoSpecFiles + fieldsWithoutDemo usage strings, and notes (including the after-scaffold step list).

The @geenius-mvp:result line

With --json, the final stdout line is a single parseable JSON object prefixed with @geenius-mvp:result. Parse only that line.

@geenius-mvp:result {"ok":true,"slug":"my-idea","dir":"apps/my-idea","type":"webapp","stack":"react","db":"convex","layout":"macos","design":"prism","accent":"violet","mode":"dark","port":"5200","features":["dashboard","settings","example","activity","admin"],"next":["pnpm install","cd apps/my-idea && npx convex dev --once","pnpm exec tsc --noEmit","pnpm deploy my-idea"]}