Skip the repetitive setup. Build your dream stack in seconds.
nxt-gen-cli is a powerful command-line tool designed to streamline the creation of Next.js applications. It automates the configuration of essential tools and libraries, allowing you to focus on building features, not configuration.
Whether you need a full-stack application with Prisma and Auth.js, or a lightweight frontend with Shadcn UI, nxt-gen-cli has you covered.
Run directly with npx to always use the latest version (Recommended):
npx nxt-gen-cli@latestOr install globally:
npm install -g nxt-gen-cliSimply run the command and follow the prompts:
npx nxt-gen-cliYou will be guided to select your preferred tools:
- ORM: Prisma, Drizzle, or None
- UI Library: Shadcn UI, HeroUI, Both, or None
- Authentication: NextAuth.js (Auth.js), Clerk, or None
- State Management: React Query, Axios
- Validation: Zod + React Hook Form
- Testing: Vitest, Playwright
- Extras: Docker, Storybook, i18n, etc.
For power users, skip the prompts by passing flags directly:
# Create a full-stack app
npx nxt-gen-cli my-app --orm prisma --ui shadcn --auth next-auth --react-query --pnpm
# Create a minimal API service
npx nxt-gen-cli api-service --orm drizzle --docker --ci| Feature | Description |
|---|---|
| Prisma | Full Prisma ORM setup with schema template and client. |
| Drizzle | Lightweight, type-safe SQL ORM with Drizzle Kit. |
| Feature | Description |
|---|---|
| Shadcn UI | Beautiful, accessible components built with Radix UI. |
| HeroUI | Modern, fast, and accessible UI library. |
| Framer Motion | Production-ready animation library for React. |
| Lucide React | Clean, consistent, and tree-shakable icons. |
| Feature | Description |
|---|---|
| NextAuth.js | Complete authentication solution for Next.js. |
| Clerk | Complete user management and authentication. |
| Feature | Description |
|---|---|
| React Query | Powerful asynchronous state management. |
| Axios | Promise based HTTP client for the browser and node.js. |
| Forms | Integrated React Hook Form + Zod validation. |
| i18n | Internationalization support with next-intl. |
| Feature | Description |
|---|---|
| Testing | Vitest for unit tests, Playwright for E2E. |
| CI/CD | GitHub Actions workflows for build and lint. |
| Docker | Containerization with standardized Dockerfile. |
| Husky | Git hooks for pre-commit linting and commit messages. |
Usage: nxt-gen-cli [name] [options]
Arguments:
name Project name (prompted if not provided)
Options:
--orm <type> ORM: prisma, drizzle, none
--auth <type> Auth Provider: next-auth, clerk, none
--ui <type> UI Library: shadcn, heroui, both, none
--react-query Install React Query (TanStack Query)
--axios Install Axios HTTP client
--forms Add Forms (RHF + Zod)
--intl Add Internationalization (next-intl)
--docker Add Docker Support
--ci Add CI/CD (GitHub Actions)
--husky Add Husky & Lint-staged
--vitest Add Vitest
--playwright Add Playwright
--storybook Add Storybook
--framer-motion Install Framer Motion
--lucide Install Lucide React icons
--examples <type> Examples: crud, auth, both, none
--license <type> License: MIT, Apache, none
--no-install Skip dependency installation
-h, --help Display help information
my-project/
├── .github/
│ └── workflows/
│ └── ci.yml # if --ci
├── .husky/ # if --husky
├── e2e/
│ └── example.spec.ts # if --playwright
├── messages/
│ └── en.json # if --intl
├── prisma/
│ └── schema.prisma # if --orm prisma
├── public/
├── src/
│ ├── app/
│ │ ├── api/
│ │ │ ├── auth/ # if --auth next-auth
│ │ │ └── posts/ # if --examples crud
│ │ ├── auth/ # if --examples auth
│ │ ├── posts/ # if --examples crud
│ │ ├── layout.tsx
│ │ └── page.tsx
│ ├── components/
│ │ ├── examples/ # if --forms
│ │ ├── providers/
│ │ │ └── query-provider.tsx # if --react-query
│ │ └── providers.tsx
│ ├── db/
│ │ └── schema.ts # if --orm drizzle
│ ├── lib/
│ │ ├── auth.ts # if --auth next-auth
│ │ ├── axios.ts # if --axios
│ │ ├── db.ts # if --orm drizzle
│ │ ├── prisma.ts # if --orm prisma
│ │ ├── schemas.ts # if --forms
│ │ └── utils.ts # if --ui shadcn
│ ├── i18n.ts # if --intl
│ └── middleware.ts # if --auth clerk OR --intl
├── .dockerignore # if --docker
├── .env
├── Dockerfile # if --docker
├── drizzle.config.ts # if --orm drizzle
├── next.config.mjs
├── package.json
├── playwright.config.ts # if --playwright
├── prisma.config.ts # if --orm prisma
├── tailwind.config.ts
├── tsconfig.json
└── vitest.config.ts # if --vitestContributions are welcome! Please open an issue to discuss proposed changes before submitting a pull request.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Distributed under the MIT License. See LICENSE.md for more information.
Praboth Charith
- Website: praboth.me
- GitHub: @PrabothCharith