A powerful, interactive CLI to bootstrap your full-stack monorepo featuring Next.js, NestJS, and your choice of authentication.
There are two ways to use this CLI:
The easiest way to use the CLI is to run it on-demand. This ensures you are always using the latest version:
npx create-next-nestIf you plan to use this frequently, you can install it globally on your system:
# Using npm
npm install -g create-next-nest
# Using pnpm
pnpm add -g create-next-nest
# Using bun
bun add -g create-next-nestAfter installing globally, you can simply run:
create-next-nestOnce you start the CLI, it will guide you through the setup:
npx create-next-nest- Project Name: Enter the name for your project folder.
- Auth Library: Select your preferred authentication system.
- Auto Install: Choose 'Yes' to automatically trigger
pnpm install.
- 🏗️ Monorepo Architecture - Clean separation of frontend and backend using a modern monorepo setup.
- ⚡ Next.js - Optimized React framework for the frontend.
- 🦅 NestJS - Scalable, enterprise-grade Node.js framework for the backend.
- 🔐 Auth Choice - Choose between Better-Auth (modern & flexible) or Auth.js (NextAuth).
- 📦 Zero Config Setup - Automatic cloning and dependency installation.
- 🛠️ Smart Detection - Automatically detects your package manager (
pnpm,bun,yarn, ornpm). - 🎨 Beautiful CLI - Powered by
@clack/promptsfor a premium terminal experience.
When you run the CLI, you can choose from two production-ready templates:
Features Next.js 15+ and NestJS 11+ with Better-Auth. Ideal for modern applications requiring flexible, type-safe authentication.
- Source: Deveripon/Next-Nest-Better-Auth
A standard-compliant setup featuring Next.js, NestJS, and Auth.js. Features JWT-based authentication and Role-Based Access Control (RBAC).
If you prefer to skip the CLI, you can use degit directly:
# For Better-Auth
npx degit Deveripon/Next-Nest-Better-Auth my-app
# For Auth.js
npx degit Deveripon/next-nest-auth-js-starterkit my-app- Node.js: >= 20.x
- Package Manager: pnpm is highly recommended for the monorepo templates.
MIT © Deveripon
