A powerful, interactive command-line tool to scaffold modern web and backend projects with zero configuration. Create production-ready projects with your preferred tech stack in seconds!
π Full Documentation & Interactive Demo
- ποΈ Database ORM Support - Added Prisma ORM and Drizzle ORM backend options with PostgreSQL
- π Auto Database Creation - Drizzle templates now include
db:createscript for seamless database setup - π§ Enhanced Database Workflows - Complete database migration, schema management, and studio tools
- β‘ Zero Configuration Databases - Database templates work out of the box with Docker PostgreSQL
- π οΈ Robust Environment Loading - Fixed environment variable loading for reliable database connections
- π¨ shadcn/ui Integration - Ready-to-use setup for shadcn/ui with automatic configuration
- π§ Enhanced Next.js Templates - Improved file structure with proper .jsx/.tsx extensions
- π¦ Tailwind CSS v4 Support - Available in specific templates (Vite + Tailwind, shadcn variants)
- π― Better JavaScript Support - Proper .jsx extensions for JavaScript projects
- β‘ Automatic Setup - Pre-configured project structure and dependencies
- π¨ Beautiful Interactive UI - Animated CLI with colorful prompts
- π§ 12 Tech Stacks Supported - React, Next.js, Vue, Node.js, Python frameworks + shadcn/ui + Database ORMs
- οΏ½οΈ Database ORM Integration - Prisma and Drizzle ORM with PostgreSQL support
- οΏ½π¦ Automatic Dependency Installation - npm install & pip install handled automatically
- π― TypeScript Support - Choose JS or TS for React, Vue, Next.js, Node.js, and Database projects
- π¨ Tailwind CSS v4 - Modern styling in Tailwind-specific templates
- π§© shadcn/ui Setup - Ready-to-use configuration for adding shadcn components
- π Database Tools - Migration, schema generation, database studio, and auto-creation scripts
- π Auto-generated Files - README, .gitignore, and project structure
- β‘ Ready to Run - Projects work immediately after creation
- π§ Smart File Extensions - Proper .jsx/.tsx extensions based on language choice
- React (Vite) - Lightning-fast React development with Vite
- Vite + React + Tailwind v4 - React with modern Tailwind CSS
- Vite + shadcn/ui - Complete React + Tailwind + shadcn component library
- Next.js - The React framework for production with Tailwind v4
- Next.js + shadcn/ui - Next.js with shadcn components and Tailwind v4
- Vue (Vite) - Progressive JavaScript framework
- Node.js + Express - Fast, minimalist web framework
- Node.js + Express + Prisma (PostgreSQL) - π Express with Prisma ORM and PostgreSQL database
- Node.js + Express + Drizzle (PostgreSQL) - π Express with Drizzle ORM and PostgreSQL database
- Python + Flask - Lightweight WSGI web framework
- Python + Django - High-level Python web framework
Use npx to run without installation:
npx initgenInstall once, use anywhere:
npm install -g initgenThen run with:
initgenClone the repository:
git clone https://github.com/PankajKumardev/initgen.git
cd initgen
npm installRun locally:
node index.jsLink globally (optional):
npm linknode index.jsOr if you've linked it globally:
initgen- Choose your tech stack - Select from 7 different frameworks
- Project name - Enter your project name
- Choose language - Select JavaScript or TypeScript (where applicable)
- Initialize git - Optionally set up git repository
$ initgen
Project Structure Generator π
___ _ _ ____
|_ _|_ __ (_) |_ / ___| ___ _ __
| || '_ \| | __| | _ / _ \ '_ \
| || | | | | |_| |_| | __/ | | |
|___|_| |_|_|\__|\____|\___|_| |_|
Welcome to InitGen CLI!
? Choose your tech stack: React (Vite)
? Project name: my-app
? Choose language: TypeScript
? Initialize git repository? Yes
π¨ Creating your project...
π¦ Installing dependencies...
β Installed dependencies
β Project created successfully!
π Project: my-app
π Location: /path/to/my-app
π Next steps:
cd my-app
npm run dev
β¨ Happy coding! β¨my-app/
βββ src/
β βββ App.jsx/tsx
β βββ App.css
β βββ main.jsx/tsx
βββ public/
βββ index.html
βββ package.json
βββ .gitignore
βββ README.md
my-app/
βββ src/
β βββ components/
β β βββ ui/
β β βββ Button.jsx/tsx
β β βββ Card.jsx/tsx
β βββ lib/
β β βββ utils.js/ts
β βββ App.jsx/tsx
β βββ main.jsx/tsx
βββ public/
βββ index.html
βββ tailwind.config.js
βββ components.json
βββ package.json
βββ .gitignore
βββ README.md
my-app/
βββ src/
β βββ app/
β βββ page.jsx/tsx
β βββ layout.jsx/tsx
β βββ globals.css
βββ public/
βββ tailwind.config.js
βββ package.json
βββ .gitignore
βββ README.md
my-app/
βββ src/
β βββ components/
β β βββ ui/
β β βββ button.jsx/tsx
β β βββ card.jsx/tsx
β βββ lib/
β β βββ utils.js/ts
β βββ app/
β βββ page.jsx/tsx
β βββ layout.jsx/tsx
β βββ globals.css
βββ public/
βββ tailwind.config.js
βββ components.json
βββ package.json
βββ .gitignore
βββ README.md
my-app/
βββ src/
β βββ index.js
β βββ routes/
β βββ controllers/
β βββ models/
βββ package.json
βββ .env.example
βββ .gitignore
βββ README.md
my-app/
βββ src/
β βββ index.js/ts
βββ prisma/
β βββ schema.prisma
βββ package.json
βββ .env.example
βββ .gitignore
βββ README.md
my-app/
βββ src/
β βββ index.js/ts
β βββ db/
β βββ index.js/ts
β βββ schema.js/ts
β βββ create.js/ts
β βββ migrate.js/ts
β βββ migrations/
βββ drizzle.config.js
βββ package.json
βββ .env.example
βββ .gitignore
βββ README.md
my-app/
βββ app/
β βββ __init__.py
β βββ routes/
β βββ models/
βββ run.py
βββ requirements.txt
βββ .gitignore
βββ README.md
my-app/
βββ my-app/
βββ my-app/
β βββ settings.py
β βββ urls.py
β βββ wsgi.py
β βββ asgi.py
βββ app/
β βββ views.py
β βββ urls.py
βββ manage.py
βββ requirements.txt
βββ .gitignore
All templates come with:
- β Minimal Professional Design - Clean black background with gradient accents
- β Responsive Layout - Works on all screen sizes
- β Production Ready - Optimized configuration
- β Pre-configured Routes - Basic API endpoints included
- β Developer Experience - Hot reload, fast refresh, auto-restart
- β Tailwind CSS v4 - Available in Tailwind-specific templates
- β Smart File Extensions - Proper .jsx/.tsx based on language choice
- Full-width black background
- Gradient hero text with Tailwind v4 styling
- 3-column feature grid with responsive design
- Minimal footer with creator credit
- Framework-specific optimizations
- Automatic Tailwind configuration
- Ready-to-use shadcn/ui setup (no pre-installed components)
- Automatic dependency management (clsx, tailwind-merge, class-variance-authority)
- Proper TypeScript/JavaScript project structure
- shadcn CLI configuration (components.json)
- Tailwind v4 compatibility with CSS variables
- Ready for
npx shadcn@latest addcommands
- RESTful API structure
- Health check endpoint
- Environment variable support
- Development server configuration
- Organized folder structure
Prisma ORM Templates
- Complete Prisma setup with PostgreSQL
- Auto-generated Prisma Client
- Database migration support
- Prisma Studio for database visualization
- TypeScript/JavaScript support
- Commented schema examples for quick start
Drizzle ORM Templates
- Lightweight Drizzle ORM setup with PostgreSQL
- Automatic database creation (
db:createscript) - Schema generation and migration tools
- Drizzle Studio for database management
- TypeScript/JavaScript support
- Robust environment variable handling
- Zero-config Docker PostgreSQL compatibility
Located in src/config/stackCommands.js
Located in src/config/gitignoreTemplates.js
Located in src/templates/
reactVite.js- React + Vite templatetailwind.js- Tailwind CSS v4 setupshadcn.js- Vite + React + shadcn/ui template (New in v2.0)nextjs.js- Next.js template with shadcn/ui support (Enhanced in v2.0)vue.js- Vue templatemanualProjects.js- Node.js, Flask, Django templates
{
"scripts": {
"start": "node index.js",
"dev": "node index.js"
}
}chalk- Terminal stylinggradient-string- Gradient text effectschalk-animation- Animated textfiglet- ASCII art textinquirer- Interactive promptsnanospinner- Loading spinners
InitGen v2.0 includes shadcn/ui setup with:
- Ready-to-Use Configuration: Complete setup without pre-installed components
- Dependency Management: All required packages (clsx, tailwind-merge, class-variance-authority, @radix-ui/react-slot) automatically installed
- Tailwind v4 Compatibility: Custom CSS variables for seamless theming
- TypeScript/JavaScript Support: Proper project structure for both languages
- Components On-Demand: Add components with
npx shadcn@latest add [component]
- Smart File Extensions: Automatically creates .jsx files for JavaScript projects, .tsx for TypeScript
- Tailwind v4 Integration: All Next.js templates now use Tailwind CSS instead of custom CSS
- shadcn/ui Ready: Next.js + shadcn/ui option for component-based development
- Improved Structure: Better app router structure with proper layout files
InitGen v2.0 automatically handles file extensions:
- JavaScript Projects: Creates .jsx files for React components
- TypeScript Projects: Creates .tsx files for React components
- Consistent Naming: Proper extensions across all framework templates
If shadcn components aren't working:
-
Check if all dependencies are installed:
npm list clsx tailwind-merge class-variance-authority
-
Verify Tailwind configuration is correct
-
Manual fallback components are included for reliability
If you get a port error, another process is using that port. Stop the other process or change the port in your project.
Make sure you have pip installed:
python -m pip --versionMake sure you have npm installed:
npm --versionIf you get TypeScript errors, make sure you have the latest version:
npm install -g typescriptIf you're seeing .js files instead of .jsx in JavaScript projects, you're using an older version. Update to v2.1.0:
npm update -g initgenPostgreSQL "role does not exist" error:
# Make sure PostgreSQL is running and check your DATABASE_URL
# For Docker PostgreSQL without password:
DATABASE_URL="postgresql://postgres@localhost:5432/your_db_name"Environment variables not loading:
- Database templates in v2.1.0+ automatically load environment variables
- If using older templates, manually add
dotenv.config()to your database connection file
Drizzle database creation fails:
# Use the built-in database creation script:
npm run db:create
# Then proceed with schema setup:
npm run db:generate
npm run db:pushnpx initgen
# Choose: Vite + shadcn/ui
# Name: my-shadcn-app
# Language: TypeScript
# Git: Yesnpx initgen
# Choose: Next.js + shadcn/ui
# Name: my-nextjs-app
# Language: JavaScript (creates .jsx files)
# Git: Yesnpx initgen
# Choose: Vite + React + Tailwind v4
# Name: my-react-app
# Language: TypeScript
# Git: Yesnpx initgen
# Choose: Node.js + Express
# Name: my-api
# Git: Yesnpx initgen
# Choose: Python + Django
# Name: my-django-app
# Git: Yesnpx initgen
# Choose: Node.js + Express + Prisma (PostgreSQL)
# Name: my-prisma-api
# Language: TypeScript
# Git: Yes
# After creation:
cd my-prisma-api
npm run db:migrate
npm run devnpx initgen
# Choose: Node.js + Express + Drizzle (PostgreSQL)
# Name: my-drizzle-api
# Language: JavaScript
# Git: Yes
# After creation:
cd my-drizzle-api
npm run db:create # Auto-creates database
npm run db:generate # Generates schema
npm run db:push # Pushes to database
npm run devMIT License - feel free to use this for personal or commercial projects!
Pankaj Kumar
- Website: www.pankajk.tech
- GitHub: @PankajKumardev
- Built with love using Node.js
- Inspired by create-react-app, create-next-app, and create-vite
- Thanks to the open-source community
- Database ORM support (Prisma, Drizzle) with PostgreSQL
- Automatic database creation for Drizzle templates
- Database migration and schema management tools
- Database studio integration for visual database management
- Robust environment variable handling for database connections
- shadcn/ui setup for React and Next.js (configuration ready)
- Enhanced Next.js templates with proper file extensions
- Tailwind CSS v4 support in specific templates
- Smart JavaScript/TypeScript file extension handling
- Add more database options (MySQL, SQLite, MongoDB)
- Add authentication templates (NextAuth, Clerk, Supabase Auth)
- Add more UI libraries (Ant Design, Material UI, Chakra UI)
- Add more backend frameworks (FastAPI, Express with TypeScript)
- Add CI/CD configuration files
- Add Docker support and configuration
- Add testing framework setup (Jest, Vitest, Playwright)
- Add more frontend frameworks (Svelte, Solid)
- Add mobile frameworks (React Native, Flutter)
- Add API documentation generation (Swagger/OpenAPI)
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the project
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Give a βοΈ if this project helped you!
Made with β€οΈ by Pankaj Kumar
InitGen - Create projects at lightning speed!