The ultimate CLI for creating Next.js applications with Shadcn UI
๐ฆ Install โข ๐ Quick Start โข ๐ Features
Shadnex is a powerful, interactive CLI tool that revolutionizes the way you set up modern Next.js applications with Shadcn UI. It combines the robustness of Next.js with the elegance of Shadcn UI components, providing a seamless development experience from project initialization to production-ready deployment.
Whether you're a seasoned developer or just starting your React journey, Shadnex eliminates the tedious setup process and gets you coding faster than ever.
Get started in seconds with zero configuration:
# No installation required - use npx
npx shadnex@latest
# Or install globally for repeated use
npm install -g shadnex
shadnexThat's it! Follow the interactive prompts and you'll have a fully configured Next.js + Shadcn UI project ready to go.
- Interactive CLI with beautiful, intuitive prompts
- Zero-config defaults for the most common use cases
- Smart package manager detection and compatibility
- One-command project creation with all dependencies installed
- Next.js 14+ with App Router support
- TypeScript with strict type checking
- Tailwind CSS for utility-first styling
- Shadcn UI for beautiful, accessible components
- ESLint for code quality and consistency
- Turbopack integration for blazing-fast builds
- Custom import aliases (
@/*by default) - Flexible project structure (src/ or root directory)
- Graceful error handling with helpful recovery suggestions
- Cross-platform compatibility (macOS, Linux, Windows)
- npm - The classic package manager
- yarn - Facebook's fast, reliable package manager
- pnpm - Disk-efficient package manager
- bun - The fastest JavaScript runtime & package manager
No installation required - run directly:
npx shadnex@latestInstall once, use everywhere:
# npm
npm install -g shadnex
# yarn
yarn global add shadnex
# pnpm
pnpm add -g shadnex
# bun
bun add -g shadnexFor contributors or testing:
# Clone the repository
git clone https://github.com/vedantlavale/shadnex.git
cd shadnex
# Install dependencies
bun install
# Run the CLI
bun run dev# Using npx (recommended)
npx shadnex@latest
# Using globally installed CLI
shadnex
# Local development
cd shadnex && bun run devThe CLI guides you through a comprehensive setup process:
-
๐ฆ Package Manager Selection
- Choose between npm, yarn, pnpm, or bun
-
๐ Project Configuration
- Project name and directory
- TypeScript support
- ESLint integration
- Tailwind CSS inclusion
-
๐๏ธ Project Structure
- App Router vs Pages Router
- Source directory (
src/) preference - Custom import aliases
-
โก Performance Options
- Turbopack for faster development
- Build optimizations
-
๐จ UI Framework Setup
- Automatic Shadcn UI installation
- Component library configuration
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ ๐ What is your project named? โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
my-awesome-app
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โ Which package manager would you like to use? โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โ npm
yarn
pnpm
bun
[... interactive prompts ...]
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ ๐ Success! Your Next.js app is ready. โ
โ โ
โ ๐ Quick start: โ
โ cd my-awesome-app โ
โ npm run dev โ
โ โ
โ ๐ Resources: โ
โ Shadcn UI: https://ui.shadcn.com โ
โ Next.js Docs: https://nextjs.org/docs โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
After running Shadnex, you'll get a production-ready project:
my-awesome-app/
โโโ app/ # Next.js 13+ App Router
โ โโโ layout.tsx # Root layout component
โ โโโ page.tsx # Home page
โ โโโ globals.css # Global styles
โโโ components/ # Shadcn UI components
โ โโโ ui/ # Reusable UI components
โ โ โโโ button.tsx # Button component
โ โ โโโ ...
โ โโโ ...
โโโ lib/ # Utility functions
โ โโโ utils.ts # Helper functions
โโโ public/ # Static assets
โ โโโ ...
โโโ package.json # Project dependencies
โโโ tailwind.config.js # Tailwind CSS config
โโโ components.json # Shadcn UI config
โโโ next.config.js # Next.js configuration
โโโ tsconfig.json # TypeScript config
โโโ eslint.config.js # ESLint configuration
Once your project is set up, adding components is effortless:
# Navigate to your project
cd my-awesome-app
# Add individual components
npx shadcn@latest add button
npx shadcn@latest add input
npx shadcn@latest add card
# Add multiple components at once
npx shadcn@latest add button input card dialog
# View available components
npx shadcn@latest add --help| Option | Description | Default | Choices |
|---|---|---|---|
| Project Name | Your application name | - | Any valid directory name |
| Package Manager | Dependency management | npm | npm, yarn, pnpm, bun |
| TypeScript | Type-safe development | Yes | Yes/No |
| ESLint | Code linting | Yes | Yes/No |
| Tailwind CSS | Utility-first CSS | Yes | Yes/No |
| App Router | Next.js routing | Yes | Yes/No |
| Source Directory | src/ structure |
No | Yes/No |
| Turbopack | Fast bundler | Yes | Yes/No |
| Import Alias | Path alias | @/* |
Custom alias |
| Shadcn UI | Component library | Yes | Yes/No |
- Node.js 18.0.0 or higher
- Bun (recommended for development)
# Clone the repository
git clone https://github.com/vedantlavale/shadnex.git
cd shadnex
# Install dependencies
bun install
# Development mode
bun run dev
# Build for production
bun run build
# Test the built CLI
node dist/cli.jssrc/
โโโ cli.ts # Main CLI entry point
โโโ types/
โ โโโ index.ts # TypeScript definitions
โโโ utils/
โ โโโ commands.ts # Shell command utilities
โ โโโ ui.ts # Terminal UI helpers
โ โโโ logo.ts # ASCII logo display
โ โโโ package-manager.ts # Package manager utilities
โโโ prompts/
โโโ setup.ts # Interactive prompts
We welcome contributions from developers of all skill levels!
- Fork the repository
- Clone your fork:
git clone https://github.com/your-username/shadnex.git - Create a feature branch:
git checkout -b feature/amazing-feature - Install dependencies:
bun install - Make your changes
- Test thoroughly:
bun run dev - Commit your changes:
git commit -m 'Add amazing feature' - Push to your branch:
git push origin feature/amazing-feature - Open a Pull Request
- Follow the existing code style and patterns
- Add tests for new features
- Update documentation as needed
- Ensure all tests pass before submitting
- Use conventional commit messages
- ๐ Bug Report
- ๐ก Feature Request
- โ Questions & Discussions
This project is licensed under the MIT License - see the LICENSE file for details.
Shadnex stands on the shoulders of giants:
- Next.js - The React framework for production
- Shadcn UI - Beautiful and accessible components
- Tailwind CSS - A utility-first CSS framework
- Bun - Fast JavaScript runtime and toolkit
- TypeScript - JavaScript with syntax for types
- ๐ง Email: vedantlavale.work@gmail.com
- ๐ Issues: GitHub Issues
- ๐ฌ Discussions: GitHub Discussions
- ๐ Documentation: Next.js Docs โข Shadcn UI
Made with โค๏ธ by Vedant Lavale
โญ Star on GitHub โข ๐ฆ Install from npm โข ๐ Get Started