# JS-Stack CLI — Full Documentation (@vipinyadav02/createjsstack) > Author: Vipin Yadav > Email: vipinxyadav.work@gmail.com > Portfolio: https://devxvipin.me > Website: https://createjsstack.dev > GitHub: https://github.com/vipinyadav01/js-stack > npm: https://www.npmjs.com/package/@vipinyadav02/createjsstack # CLI Options (/docs/cli-options) Run `create --help` for the authoritative list: ```bash npx @vipinyadav02/createjsstack@latest create --help ``` ## Options [#options] | Option | Description | Values | | ------------------- | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `--preset` | Start from a preset | `mern`, `next-fullstack`, `react-vite`, `express-api` | | `--frontend` | Frontend framework | `react`, `next`, `vue`, `nuxt`, `svelte`, `sveltekit`, `solid`, `qwik`, `astro`, `angular`, `remix`, `react-router`, `tanstack-router`, `tanstack-start`, `none` | | `--backend` | Backend framework | `express`, `hono`, `fastify`, `nest`, `koa`, `elysia`, `next`, `convex`, `none` | | `--database` | Database | `mongodb`, `postgres`, `mysql`, `sqlite`, `none` | | `--orm` | ORM / ODM | `prisma`, `drizzle`, `mongoose`, `typeorm`, `mikro-orm`, `none` | | `--auth` | Authentication | `better-auth`, `clerk`, `next-auth`, `lucia`, `none` | | `--api` | API style | `trpc`, `orpc`, `graphql`, `rest`, `none` | | `--runtime` | Runtime | `node`, `bun`, `deno`, `workers` | | `--addons` | Extra tools (CSV) | `docker`, `biome`, `turborepo`, `pwa`, `tauri`, `vitest`, `playwright`, `cypress` | | `--package-manager` | Package manager | `npm`, `pnpm`, `bun` | ## Flags [#flags] | Flag | Description | | ---------------------------- | ----------------------------------- | | `--yes` | Skip all prompts, use defaults | | `--git` / `--no-git` | Initialize a git repository | | `--install` / `--no-install` | Install dependencies after creation | | `--dry-run` | Preview files without writing them | | `--verbose` | Print the resolved configuration | Some combinations are validated and auto-fixed (for example, Next.js as a frontend with a conflicting backend). The CLI warns you when it adjusts a choice. ## Other commands [#other-commands] | Command | Description | | ------------------- | -------------------------- | | `list` | List all available presets | | `add-preset ` | Register a custom preset | | `info` | Print environment info | # Components (/docs/components) These docs are built with **Fumadocs**. This page shows the building blocks you can use in any `.mdx` file under `content/docs`. ## Callouts [#callouts] This is an informational callout. Careful — this needs attention. Something went wrong. ## Cards [#cards] Create your first project. Every available flag. ## Tabs [#tabs] ```bash npm install ``` ```bash pnpm install ``` ```bash bun install ``` ## Steps [#steps] Pick a stack. Generate the project. Install and run. ## Accordions [#accordions] Yes — TypeScript is the default. Use `--no-typescript` for JavaScript. Yes — pass `--package-manager npm | pnpm | bun`. ## File tree [#file-tree] ## Code blocks [#code-blocks] Syntax highlighting is powered by Shiki: ```ts title="example.ts" export function greet(name: string): string { return `Hello, ${name}!`; } ``` # Getting Started (/docs/getting-started) ## Requirements [#requirements] * **Node.js 18+** (Node 20 or 22 recommended) * One of **npm**, **pnpm**, or **bun** ## Create a project [#create-a-project] ### Run the CLI [#run-the-cli] No install needed — run it directly with your package manager. ```bash npx @vipinyadav02/createjsstack@latest my-app ``` ```bash pnpm dlx @vipinyadav02/createjsstack@latest my-app ``` ```bash bunx @vipinyadav02/createjsstack@latest my-app ``` ### Pick your stack [#pick-your-stack] Answer the prompts, or skip them entirely with a preset and `--yes`: ```bash npx @vipinyadav02/createjsstack@latest my-app --preset mern --yes ``` ### Install & run [#install--run] ```bash cd my-app npm install npm run dev ``` Pass any combination of flags with `--yes` to skip all prompts — perfect for CI or scripts. See [CLI Options](/docs/cli-options). ## Custom stack example [#custom-stack-example] ```bash npx @vipinyadav02/createjsstack@latest my-app \ --frontend next \ --backend hono \ --database postgres \ --orm drizzle \ --package-manager pnpm \ --yes ``` # How It Works (/docs/how-it-works) createjsstack builds a project by **layering templates**, one per choice you make. Each layer contributes its own files: ``` base → frontend → backend → database/orm → auth → api → addons → examples ``` ## package.json is merged, not overwritten [#packagejson-is-merged-not-overwritten] Every layer can ship a `package.json`. Instead of the last layer winning, the files are **deep-merged** — dependencies, devDependencies, and scripts from all layers combine into one file, while your project's `name` and `version` are preserved. A mern project ends up with react +{" "} react-dom (frontend), express +{" "} cors + helmet (backend), and{" "} mongoose (ORM) — all in a single, valid{" "} package.json. ## What a project looks like [#what-a-project-looks-like] Every generated project also gets an **MIT `LICENSE`** and a `"license": "MIT"` field out of the box. ## Three ways to configure [#three-ways-to-configure] They compose left to right — later wins: 1. **Presets** — a named bundle (`--preset mern`) 2. **Flags** — override any single choice (`--database postgres`) 3. **Prompts** — run with no flags for a guided setup ## Template resolution [#template-resolution] Templates are resolved relative to the installed package, so generation works from **any directory** — not just the repository root — and paths containing spaces are handled correctly. # Introduction (/docs) `@vipinyadav02/createjsstack` is a modern CLI that scaffolds production-ready JavaScript & TypeScript full-stack projects in seconds — pick a frontend, a backend, a database, and go. Run one command and get a working project with sensible defaults, a clean structure, and best practices baked in. ```bash npx @vipinyadav02/createjsstack@latest my-app --preset mern --yes ``` ## Why createjsstack [#why-createjsstack] Templates are layered — base + frontend + backend + database — and their `package.json` files are deep-merged into one coherent project. Named bundles like `mern` and `next-fullstack` get you started instantly, and any flag can override a preset. React, Next, Vue, Svelte, Express, Hono, Nest, Prisma, Drizzle, Mongoose, and more — mix and match. Prefer clicking? Build your stack visually and copy the exact command. ## Next steps [#next-steps] Head to [Getting Started](/docs/getting-started) to create your first project, or browse the [CLI Options](/docs/cli-options) reference. # Presets (/docs/presets) A **preset** is a named bundle of choices applied as a base layer. Explicit flags always override preset values, so you can start from a preset and tweak. ```bash npx @vipinyadav02/createjsstack@latest my-app --preset mern --yes ``` ## Available presets [#available-presets] | Preset | Frontend | Backend | Database | ORM | | ---------------- | -------- | ------- | -------- | -------- | | `mern` | react | express | mongodb | mongoose | | `next-fullstack` | next | next | postgres | prisma | | `react-vite` | react | — | — | — | | `express-api` | — | express | postgres | prisma | Run npx @vipinyadav02/createjsstack\@latest list to print every preset. ## Override a preset [#override-a-preset] The preset sets the base; flags win on top: ```bash # MERN, but swap MongoDB for Postgres + Prisma npx @vipinyadav02/createjsstack@latest my-app \ --preset mern \ --database postgres \ --orm prisma \ --yes ``` ## Unknown presets [#unknown-presets] If you pass a name that isn't a preset, the CLI stops and lists the valid ones instead of generating a broken project.