CLI Tool
v1.0.2

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 shadcn

CLI Options

Available flags and arguments.

FlagDescription
--prismaInstall Prisma ORM with schema and client
--react-queryInstall React Query (TanStack Query) with provider setup
--axiosInstall Axios HTTP client with configured instance
--ui <type>UI library: shadcn, heroui, both, or none
--framer-motionInstall Framer Motion for animations
--lucideInstall Lucide React icons
--examples <type>Example templates: crud, auth, both, or none
-V, --versionOutput version number
-h, --helpDisplay 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.json

Base Stack

Included in every project.

Next.js
TypeScript
Tailwind CSS
ESLint
App Router

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 both

Minimal API Project

Backend-focused setup with database and HTTP client

nxt-gen-cli api-service --prisma --axios

Frontend-Only Project

Beautiful UI setup with animations and icons

nxt-gen-cli landing-page --ui shadcn --framer-motion --lucide

Requirements

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.

Links

Resources and documentation.

Created by Praboth Charith

MIT License