{
  "name": "create-cartwright",
  "version": "2.9.20",
  "description": "Scaffold the build engine AIs reach for — a real site with design, and when you want them, database and backend, live in minutes. Plain websites (--profile site), webshops and agent storefronts; MIT, you own the code.",
  "keywords": [
    "cartwright",
    "nextjs",
    "scaffolder",
    "starter",
    "template",
    "ecommerce",
    "ai",
    "mcp",
    "mcp-server",
    "stripe",
    "shopify-alternative",
    "agentic-commerce",
    "create-next-app",
    "storefront",
    "webshop"
  ],
  "type": "module",
  "bin": {
    "create-cartwright": "dist/index.js",
    "cartwright": "dist/index.js"
  },
  "files": [
    "dist",
    "README.md"
  ],
  "dependencies": {
    "@clack/prompts": "^0.11.0",
    "giget": "^3.3.1",
    "picocolors": "^1.1.0",
    "zod": "^4.4.3"
  },
  "devDependencies": {
    "@types/node": "^22.10.0",
    "eslint": "^9.0.0",
    "tsx": "^4.19.0",
    "typescript": "^5.7.0",
    "typescript-eslint": "^8.0.0",
    "vite": "^8.0.16",
    "vitest": "^4.1.7"
  },
  "engines": {
    "node": ">=22"
  },
  "publishConfig": {
    "access": "public",
    "provenance": true
  },
  "license": "MIT",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/Teloz1870/cartwright-app.git",
    "directory": "apps/cli"
  },
  "homepage": "https://cartwright.app",
  "bugs": "https://github.com/Teloz1870/cartwright-app/issues",
  "scripts": {
    "build": "tsc",
    "dev": "tsx src/index.ts",
    "typecheck": "tsc --noEmit",
    "lint": "eslint src --max-warnings=0",
    "test": "vitest run",
    "test:watch": "vitest"
  },
  "readme": "# create-cartwright\n\n[![npm version](https://img.shields.io/npm/v/create-cartwright)](https://www.npmjs.com/package/create-cartwright)\n[![npm downloads](https://img.shields.io/npm/dw/create-cartwright)](https://www.npmjs.com/package/create-cartwright)\n[![license: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/Teloz1870/cartwright-template/blob/main/LICENSE)\n[![node >= 22](https://img.shields.io/badge/node-%E2%89%A5%2022-brightgreen)](https://nodejs.org)\n\n**A real site — design, database, backend — live in minutes.**\n\nCLI scaffolder for AI-first sites and webshops powered by [Cartwright](https://cartwright.app) —\nthe open-source Next.js 16 + React 19 + Prisma + Stripe engine with a built-in MCP server,\nJSON-LD everywhere, and an admin your AI agent can drive.\n\n## Quick start\n\n```bash\nnpx create-cartwright@latest my-site\ncd my-site\npnpm dev\n```\n\nThat's it. The CLI installs dependencies, creates the database schema and seeds it —\nthe **admin login** is printed at the end of scaffolding and saved to `.admin-credentials`\n(gitignored). Open `http://localhost:3000`, sign in at `/account/login`.\n\nNo prompts at all:\n\n```bash\nnpx create-cartwright@latest my-shop --yes --db=turso --ai\n```\n\nAlready in the folder you want (an editor such as Cursor or Claude Code opened on it)?\nScaffold right there. The folder may hold only `.git`, `.gitignore`, `README.md` or\n`.DS_Store`, and the project is named after it:\n\n```bash\nnpx create-cartwright@latest . --yes --no-git\n```\n\nScaffolded with `--no-install`? Then run the steps yourself:\n`pnpm install && pnpm db:setup && pnpm dev` (never `prisma migrate deploy` —\n`db:setup` is the robust path and prints the admin login).\n\n## See it in 26 seconds\n\n![npx create-cartwright: one command to a running site — scaffold, seeded database, admin login, HTTP 200 and a rendered H1](https://cartwright.app/readme/cast-scaffold.gif)\n\n*Real terminal recording, wait time cut: one command scaffolds, installs and seeds; `pnpm dev`; the homepage answers 200 with a designed H1.*\n\n## See it live\n\nThree production sites run on the exact engine you scaffold:\n\n- 🕶️ [solbrillen.dk](https://solbrillen-dk-teloz1.vercel.app/da) — eyewear webshop, every feature flag on\n- ☕ [demo.cartwright.app](https://demo.cartwright.app) — modern coffee-shop demo (View Transitions, 3D hero)\n- 🏢 [cartwright.app](https://cartwright.app) — docs, design gallery, comparisons\n\n## Choose Cartwright when — and when not\n\n**Choose Cartwright** when you want a real website or webshop in your own repo (one command →\ndesigned homepage, database, admin, checkout), an AI agent building and operating it (MCP +\ntool registry + agent rules in the box), agentic-commerce protocols implemented rather than\npromised, and no platform fee or lock-in.\n\n**Prefer something else** when zero-ops hosted is the point (Shopify, Wix), you want\nbrowser-only prompt-to-app (Lovable, bolt.new, v0), you need enterprise multi-channel B2B\n(Saleor), or you're building a novel non-commerce app from scratch (create-next-app).\nHonest long-form comparisons: [cartwright.app/compare](https://cartwright.app/compare).\n\n## Profiles\n\nOne engine, three profile-aware outputs — choose only the surface your project needs.\n\n| Profile | What you get |\n|---|---|\n| `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, hoptify, and the 16 non-curated design packs. WebMCP (in-browser agent tools) ships in full — **webshop templates scaffold with it ON** (the store is WebMCP-native out of the box); website-mode scaffolds keep it dormant behind the `webMcp` flag. |\n| `full` | Everything the engine ships — identical to the pre-profile scaffold. Required for `--template agent-marketplace`. |\n| `site` | A plain, deployable website with no database, admin, auth, catalogue, cart or checkout. The contact form is included by default; pass `--with none` for the bare site. Discovery advertises only interfaces that remain. |\n\n```bash\nnpx create-cartwright@latest my-site                  # light (default)\nnpx create-cartwright@latest my-shop --profile full   # everything\nnpx create-cartwright@latest my-site --profile site   # no database or commerce\nnpx create-cartwright@latest my-site --profile site --with none\n```\n\nPruned designs can be added back to a light project at any time:\n\n```bash\nnpx cartwright design install <slug>\n```\n\nA design that imports a self-hosted font from `@/app/fonts/<family>/font` (brutalist,\neditorial-ink and meridian do) also gets each of those `app/fonts/<family>/` folders,\nfetched from the same template ref. A font folder you already have is never\noverwritten; the output says which folders were added, which were already identical\nand which were kept because they differ (or warns when your own folder lacks the\nmodule the design imports).\n\n## Health check: `cartwright doctor`\n\nRun a read-only diagnosis from any Cartwright project root:\n\n```bash\nnpx cartwright doctor          # human-readable report\nnpx cartwright doctor --json   # machine-readable { checks, ok }\n```\n\nSeven checks, no fixes, no mutations, no network:\n\n| Check | What it looks at |\n|---|---|\n| Cartwright project | `brand.config.ts` + `prisma/schema.prisma` + `package.json` exist |\n| Release marker | `.cartwright/release.json` — engine version, channel, release date |\n| Engine up to date | marker version vs the latest template tag **this CLI build** knows (offline compare — an older CLI knows an older latest) |\n| Scaffold profile | `.cartwright/profile.json` — light/full/site + retained modules or designs (absent = full or pre-profile, fine) |\n| Node version | major ≥ 22 (the engine's `engines` requirement) |\n| Environment | `.env.local` exists; `AUTH_SECRET` set (not a placeholder); `DATABASE_URL` or the `TURSO_DATABASE_URL` + `TURSO_AUTH_TOKEN` pair |\n| Database baseline | runs the project's own `db:verify` gate (exit 2 = migration-baseline drift); skipped on older engines |\n\nExit code is `1` only when a check **fails** (warnings — e.g. an older engine — exit `0`).\n\n## Flags\n\n| Flag | Default | What it does |\n|---|---|---|\n| `--yes`, `-y` | false | Skip prompts, use defaults |\n| `--profile=<light\\|full\\|site>` | `light` | Scaffold profile (see above) |\n| `--with=<module>` | `contact-form` for `site` | Optional site-profile module; use `--with none` for bare core |\n| `--template=<slug>` | `website-corporate` (light/site) / `generic` (full) | Mode + seed-data preset; site supports `website-corporate` only |\n| `--look=<url>` | — | Scaffold wearing a shared look (see below) |\n| `--help`, `-h` | — | Print usage |\n| `--version`, `-v` | — | Print the CLI version and exit |\n| `--db=<turso\\|postgres\\|sqlite>` | (prompt) | Database choice — drives next-steps guidance |\n| `--ai` / `--no-ai` | (prompt) | Enable / disable the AI commerce features hint |\n| `--ref=<stable\\|next\\|tag\\|branch>` | `stable` | Template channel (see below) |\n| `--pm=<pnpm\\|npm\\|yarn\\|bun>` | auto-detect | Package manager for install |\n| `--no-install` | false | Skip dependency install |\n| `--no-git` | false | Skip `git init` + initial commit |\n| `--github` | false | Create a **private** GitHub repo and push (needs `gh`). Required for non-interactive runs — `--yes` suppresses the prompt and never publishes on its own |\n| `--no-github` | false | Don't offer to publish to GitHub |\n| `--no-telemetry` | false | Skip the anonymous scaffold ping (see [Telemetry](#telemetry)) |\n\n## Looks (`--look <url>`)\n\nEvery Cartwright shop can share its **look** — skin (design), palette, 3D scene and chrome —\nas a `cartwright-composition-v1` JSON file via its public `GET /api/look` endpoint (the\nshop owner enables the `lookSharing` flag). Scaffold a new project wearing that look:\n\n```bash\nnpx create-cartwright@latest my-shop --yes --look https://that-shop.example/api/look\n```\n\nAfter the project is created and the database is seeded, the CLI applies the look:\n\n- **skin** → `designSlug: \"<skin>\"` in `brand.config.ts` (part of the initial commit),\n- **palette / scene / chrome** → the seeded database's branding settings — the same\n  fields the engine's `composition.apply` tool writes.\n\nThe look **never carries copy**: voice/genome text and homepage layouts are not part of\nthe public sharing boundary, and the CLI ignores them if present.\n\nInteraction with `--profile`: the light profile (default) ships a curated design set, so\nif the look's skin isn't included, the CLI keeps the default design and tells you how to\nget it — `npx cartwright design install <slug>` afterwards, or re-scaffold with\n`--profile full`. The palette/scene/chrome still apply either way (every design is\npalette-adaptive). Since the palette/scene/chrome live in the database, they're skipped\nunder `--no-install` (no seeded DB yet).\n\n**Fail-soft by design:** an unreachable URL, invalid JSON, wrong schema, unknown design\nor database hiccup prints one warning and the scaffold completes unchanged — a broken\nlook never breaks a scaffold.\n\n## Telemetry\n\nAt the end of a successful scaffold the CLI sends **one anonymous, PII-free ping** so we can\ntell real adoption apart from CI/bot noise in npm's download numbers. It contains only coarse\ninstall facts: CLI version, template channel, profile, template slug, Node major version, OS\nplatform and database choice — **never** a project name, path, email or any identifier.\n\nOpt out any of three ways: `--no-telemetry`, `CARTWRIGHT_TELEMETRY=0`, or the standard\n`DO_NOT_TRACK=1`. The ping is fail-soft with a hard 1.5 s cap — it can never slow down or\nbreak a scaffold. Receiver + storage: an aggregate-only Vercel Analytics event\n([source](https://github.com/Teloz1870/cartwright-app/blob/main/apps/web/app/api/telemetry/scaffold/route.ts)) —\nnothing is written to a database.\n\n## Template channels\n\n| Channel | What it is | When to use |\n|---|---|---|\n| `stable` (default) | Latest tagged release of the template. Battle-tested across the maintainer's canary deploys before tagging. | Production scaffolds. New shops. |\n| `next` | Bleeding-edge: the public `next` branch on `cartwright-template`. | Trying features that haven't been cut into a stable release yet. Not for production. |\n| `vX.Y.Z` (any tag) | Pin to a specific historical release. | Reproducing a known-good scaffold. |\n| `<branch>` (any branch) | Pin to a branch on the mirror. | Power-user experimentation. |\n\nExamples:\n\n```bash\nnpx create-cartwright@latest my-shop                    # → stable (default)\nnpx create-cartwright@latest my-shop --ref next         # → bleeding-edge\nnpx create-cartwright@latest my-shop --ref v0.50.1      # → pin to a tag\n```\n\nThe spinner shows the channel and the resolved ref so you can see exactly what you pulled — useful when reporting issues.\n\n## What it does\n\n1. Three prompts (project name, database, AI features) — skippable with `--yes`.\n2. Downloads a sanitised snapshot from [`cartwright-template`](https://github.com/Teloz1870/cartwright-template) at the resolved `--ref` channel (default `stable`) and applies the selected profile.\n3. Generates a random 32-byte `AUTH_SECRET` and writes `.env.local`.\n4. Patches `brand.config.ts` — `storeName` (Title Case of project name) + `storeSlug` (kebab-case).\n5. Optional: `git init` + initial commit.\n6. Optional: install dependencies with the detected (or specified) package manager.\n7. Prints database-aware next-steps with copy-pastable commands.\n\n## Requirements\n\n- Node.js ≥ 22\n- (Optional) git, for the initial commit\n- (Optional) pnpm/npm/yarn/bun, for dependency install\n\n## Where the template comes from\n\nThe CLI scaffolds from [`cartwright-template`](https://github.com/Teloz1870/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.\n\n## Source and support\n\nThis CLI is part of the [`cartwright-app`](https://github.com/Teloz1870/cartwright-app) monorepo. PRs welcome.\n\n- Engine or scaffold bug: [`cartwright-template` Issues](https://github.com/Teloz1870/cartwright-template/issues)\n- CLI or documentation bug: [`cartwright-app` Issues](https://github.com/Teloz1870/cartwright-app/issues)\n- Setup and support routes: [FAQ](https://cartwright.app/docs/faq) and [contact](https://cartwright.app/contact)\n- Security report: follow [`SECURITY.md`](https://github.com/Teloz1870/cartwright-app/security/policy), never a public issue\n\n## License\n\nMIT\n"
}