Skip to content

shadnex is an interactive CLI tool that streamlines the process of setting up modern Next.js applications with Shadcn UI. It combines the power of Next.js with the beauty of Shadcn UI components, providing a seamless development experience from project initialization to component installation.

License

Notifications You must be signed in to change notification settings

vedantlavale/shadnex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

41 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿš€ Shadnex

npm version npm downloads GitHub stars GitHub issues License: MIT

The ultimate CLI for creating Next.js applications with Shadcn UI

๐Ÿ“ฆ Install โ€ข ๐Ÿš€ Quick Start โ€ข ๐Ÿ“š Features


โœจ What is Shadnex?

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.

๐Ÿš€ Quick Start

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
shadnex

That's it! Follow the interactive prompts and you'll have a fully configured Next.js + Shadcn UI project ready to go.

๐ŸŽฏ Key Features

โšก Lightning Fast Setup

  • 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

๐ŸŽจ Modern Tech Stack

  • 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

๐Ÿ› ๏ธ Developer Experience

  • 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)

๐Ÿ“ฆ Package Manager Support

  • npm - The classic package manager
  • yarn - Facebook's fast, reliable package manager
  • pnpm - Disk-efficient package manager
  • bun - The fastest JavaScript runtime & package manager

๐Ÿ“ฆ Installation

Option 1: Use npx (Recommended)

No installation required - run directly:

npx shadnex@latest

Option 2: Global Installation

Install once, use everywhere:

# npm
npm install -g shadnex

# yarn
yarn global add shadnex

# pnpm
pnpm add -g shadnex

# bun
bun add -g shadnex

Option 3: Local Development

For 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

๐Ÿ› ๏ธ Usage

Basic Usage

# Using npx (recommended)
npx shadnex@latest

# Using globally installed CLI
shadnex

# Local development
cd shadnex && bun run dev

Interactive Setup Flow

The CLI guides you through a comprehensive setup process:

  1. ๐Ÿ“ฆ Package Manager Selection

    • Choose between npm, yarn, pnpm, or bun
  2. ๐Ÿ“ Project Configuration

    • Project name and directory
    • TypeScript support
    • ESLint integration
    • Tailwind CSS inclusion
  3. ๐Ÿ—๏ธ Project Structure

    • App Router vs Pages Router
    • Source directory (src/) preference
    • Custom import aliases
  4. โšก Performance Options

    • Turbopack for faster development
    • Build optimizations
  5. ๐ŸŽจ UI Framework Setup

    • Automatic Shadcn UI installation
    • Component library configuration

Example Output

โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ ๐Ÿš€ 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                  โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

๐Ÿ“ Generated Project Structure

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

๐ŸŽจ Working with Shadcn UI

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

๐Ÿ”ง Configuration Options

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

๐Ÿ—๏ธ Development

Prerequisites

  • Node.js 18.0.0 or higher
  • Bun (recommended for development)

Building from Source

# 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.js

Project Architecture

src/
โ”œโ”€โ”€ 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

๐Ÿค Contributing

We welcome contributions from developers of all skill levels!

Getting Started

  1. Fork the repository
  2. Clone your fork: git clone https://github.com/your-username/shadnex.git
  3. Create a feature branch: git checkout -b feature/amazing-feature
  4. Install dependencies: bun install
  5. Make your changes
  6. Test thoroughly: bun run dev
  7. Commit your changes: git commit -m 'Add amazing feature'
  8. Push to your branch: git push origin feature/amazing-feature
  9. Open a Pull Request

Development Guidelines

  • 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

Issue Templates

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgments

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

๐Ÿ“ž Support & Community


About

shadnex is an interactive CLI tool that streamlines the process of setting up modern Next.js applications with Shadcn UI. It combines the power of Next.js with the beauty of Shadcn UI components, providing a seamless development experience from project initialization to component installation.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •