You are viewing an older versionGo to latest
nxt-gen-cli v2.0.0 is now available with interactive mode, support for multiple ORMs, UI libraries, and more.
nxt-gen-cli
The ultimate Next.js scaffold CLI generator. Customize your stack with Prisma, React Query, Shadcn, HeroUI, and more in seconds.
npx nxt-gen-cli my-project
Overview
Skip the repetitive setup and get straight to building.
nxt-gen-cli streamlines Next.js project creation by automating the installation and configuration of commonly used libraries. Instead of manually installing and wiring up Prisma, React Query, Axios, and UI frameworks, this CLI handles it for you through an interactive prompt or command-line flags.
Installation
Get started quickly with npm or npx.
Quick Start
Two ways to create your project.
Interactive Mode
Run without arguments and follow the guided prompts.
nxt-gen-cli
Command-Line Mode
Specify options directly for non-interactive usage.
nxt-gen-cli my-project --prisma --react-query --ui shadcnCLI Options
Available flags and arguments.
| Flag | Description |
|---|---|
--prisma | Install Prisma ORM with schema and client |
--react-query | Install React Query (TanStack Query) with provider setup |
--axios | Install Axios HTTP client with configured instance |
--ui <type> | UI library: shadcn, heroui, both, or none |
--framer-motion | Install Framer Motion for animations |
--lucide | Install Lucide React icons |
--examples <type> | Example templates: crud, auth, both, or none |
-V, --version | Output version number |
-h, --help | Display help information |
Project Structure
Generated file structure based on selected options.
File Tree
my-project/
├── prisma/
│ └── schema.prisma # Prisma schema (if --prisma)
├── src/
│ ├── app/
│ │ ├── api/
│ │ │ └── posts/
│ │ │ └── route.ts # Example API route
│ │ ├── auth/
│ │ │ └── page.tsx # Auth page
│ │ ├── posts/
│ │ │ └── page.tsx # Example page
│ │ ├── layout.tsx # Root layout with Providers
│ │ └── page.tsx # Home page
│ ├── components/
│ │ ├── providers/
│ │ │ └── query-provider.tsx
│ │ └── providers.tsx
│ └── lib/
│ ├── axios.ts # if --axios
│ ├── prisma.ts # if --prisma
│ └── utils.ts
├── package.json
├── tailwind.config.ts
└── tsconfig.jsonBase Stack
Included in every project.
Plus: src/ directory structure and @/* import alias
Examples
Common project configurations.
Full Stack Project
Complete setup with database, API, UI, animations, and examples
nxt-gen-cli my-app --prisma --react-query --axios --ui both --framer-motion --lucide --examples bothMinimal API Project
Backend-focused setup with database and HTTP client
nxt-gen-cli api-service --prisma --axiosFrontend-Only Project
Beautiful UI setup with animations and icons
nxt-gen-cli landing-page --ui shadcn --framer-motion --lucideRequirements
System prerequisites.
Node.js
18.17.0 or later
npm
9.0.0 or later
Support & Contact
Get help, report issues, or contribute to the project.
Report a Bug
Found something not working as expected? Open an issue and help us improve the CLI.
Request a Feature
Have an idea for a new feature or improvement? We'd love to hear your suggestions.
Contact via Email
For inquiries, collaborations, or direct support, feel free to reach out via email.
Join Discussions
Ask questions, share ideas, and connect with other users in GitHub Discussions.
Links
Resources and documentation.
Created by Praboth Charith
MIT License