create-cartwright
v2.4.1
Published
Scaffold the build engine AIs reach for — a real site with design, database and backend, live in minutes. Websites, webshops and agent storefronts; MIT, you own the code.
Downloads
10,143
Maintainers
Readme
create-cartwright
A real site — design, database, backend — live in minutes.
CLI scaffolder for AI-first sites and webshops powered by Cartwright.
Quick start
npx create-cartwright@latest my-shop
cd my-shop
npx prisma migrate deploy
npx prisma db seed
pnpm devOr with all defaults (no prompts):
npx create-cartwright@latest my-shop --yes --db=turso --aiProfiles
One engine, two scaffold profiles — never a separate light codebase.
| Profile | What you get |
|---|---|
| light (default) | The lean "real site in minutes" kit: website-mode default, a curated design set (aurora-site, fable, stillwater, halo, jungle, meridian, brutalist, apex + the structural aurora-shop/studio), full mode-gated webshop, builder/mixer, genome, MCP/JSON-LD discovery, admin, database. Heavy full-only modules are pruned from the scaffold: A2A/agent-marketplace, UCP identity-linking, WebMCP, hoptify, and the 16 non-curated design packs. |
| full | Everything the engine ships — identical to the pre-profile scaffold. Required for --template agent-marketplace. |
npx create-cartwright@latest my-site # light (default)
npx create-cartwright@latest my-shop --profile full # everythingPruned designs can be added back to a light project at any time:
npx cartwright design install <slug>Flags
| Flag | Default | What it does |
|---|---|---|
| --yes, -y | false | Skip prompts, use defaults |
| --profile=<light\|full> | light | Scaffold profile (see above) |
| --template=<slug> | website-corporate (light) / generic (full) | Mode + seed-data preset |
| --help, -h | — | Print usage |
| --db=<turso\|postgres\|sqlite> | (prompt) | Database choice — drives next-steps guidance |
| --ai / --no-ai | (prompt) | Enable / disable the AI commerce features hint |
| --ref=<stable\|next\|tag\|branch> | stable | Template channel (see below) |
| --pm=<pnpm\|npm\|yarn\|bun> | auto-detect | Package manager for install |
| --no-install | false | Skip dependency install |
| --no-git | false | Skip git init + initial commit |
Template channels
| Channel | What it is | When to use |
|---|---|---|
| stable (default) | Latest tagged release of the template. Battle-tested across the maintainer's canary deploys before tagging. | Production scaffolds. New shops. |
| next | Bleeding-edge: the next branch on cartwright-template, updated on every push to the template's source repo. | Trying features that haven't been cut into a stable release yet. Not for production. |
| vX.Y.Z (any tag) | Pin to a specific historical release. | Reproducing a known-good scaffold. |
| <branch> (any branch) | Pin to a branch on the mirror. | Power-user experimentation. |
Examples:
npx create-cartwright@latest my-shop # → stable (default)
npx create-cartwright@latest my-shop --ref next # → bleeding-edge
npx create-cartwright@latest my-shop --ref v0.1.0-beta # → pin to a tagThe spinner shows the channel and the resolved ref so you can see exactly what you pulled — useful when reporting issues.
What it does
- Three prompts (project name, database, AI features) — skippable with
--yes. - Downloads a sanitised snapshot from
cartwright-templateat the resolved--refchannel (defaultstable). - Generates a random 32-byte
AUTH_SECRETand writes.env.local. - Patches
brand.config.ts—storeName(Title Case of project name) +storeSlug(kebab-case). - Optional:
git init+ initial commit. - Optional: install dependencies with the detected (or specified) package manager.
- Prints database-aware next-steps with copy-pastable commands.
Requirements
- Node.js ≥ 22
- (Optional) git, for the initial commit
- (Optional) pnpm/npm/yarn/bun, for dependency install
Where the template comes from
The CLI scaffolds from cartwright-template — the public, MIT-licensed engine template repo, auto-synced on every release tag. No GitHub token required, and the code you scaffold is yours to fork, modify, and ship.
Source
This CLI is part of the cartwright-app monorepo. PRs welcome.
License
MIT
