A production-ready Node.js CLI tool to bootstrap Next.js projects with shadcn/ui components.
📦 NPM: create-next-orbit
🐙 GitHub: aamirorbit/create-next-orbit
- 🚀 Quick Setup: Bootstrap Next.js projects with TypeScript and Tailwind CSS
- 🎨 Component Selection: Interactive or flag-driven shadcn/ui component installation
- ⚙️ Configuration: Generate and reuse project configurations
- 🔍 Dry Run: Preview commands without execution
- 🎯 Error Handling: Robust error handling with clear messaging
- 📦 Production Ready: TypeScript, ESLint, Prettier, and comprehensive testing
npx create-next-orbit <project-name> [options]# Create a new Next.js project with interactive component selection
npx create-next-orbit my-app
# Create with specific components
npx create-next-orbit my-app --components="button,card,input,form"
# Install ALL components (full UI library)
npx create-next-orbit my-app --all
# Dry run to preview commands
npx create-next-orbit my-app --dry-run
# Skip dependency installation
npx create-next-orbit my-app --no-install# Navigate to your existing Next.js project
cd my-existing-project
# Install ALL shadcn/ui components
npx create-next-orbit add-all
# Dry run to see what would be installed
npx create-next-orbit add-all --dry-run| Flag | Description |
|---|---|
--components="list" |
Comma-separated list of shadcn/ui components to install |
--all |
Install ALL available shadcn/ui components |
--dry-run |
Print commands without executing them |
--no-install |
Skip npm install after project creation |
--use-config |
Use existing orbit.config.json for component selection |
The CLI supports all officially available shadcn/ui components from the official documentation:
- Layout & Navigation: Accordion, Breadcrumb, Collapsible, Navigation Menu, Pagination, Resizable, Sidebar, Tabs
- Forms & Inputs: Button, Calendar, Checkbox, Form, Input, Input OTP, Label, Radio Group, Select, Slider, Switch, Textarea, Toggle, Toggle Group
- Data Display: Avatar, Badge, Card, Chart, Progress, Skeleton, Table
- Feedback & Notifications: Alert, Alert Dialog, Dialog, Drawer, Hover Card, Popover, Sheet, Sonner, Tooltip
- Media & Content: Aspect Ratio, Carousel, Command, Context Menu, Dropdown Menu, Menubar, Separator
The CLI generates an orbit.config.json file in your project root:
{
"components": ["button", "card", "input"],
"tailwind": true,
"shadcnVersion": "latest"
}You can reuse this configuration with the --use-config flag:
npx create-next-orbit my-new-app --use-configThe CLI follows the official shadcn/ui installation process:
- Creates Next.js project with TypeScript and Tailwind CSS
- Initializes shadcn/ui using
npx shadcn@latest init - Installs selected components using
npx shadcn@latest add <component> - Generates configuration for future use
- Node.js 18+
- npm or yarn
# Clone the repository
git clone https://github.com/aamirorbit/create-next-orbit.git
cd create-next-orbit
# Install dependencies
npm install
# Build the project
npm run build
# Run tests
npm test
# Lint code
npm run lint
# Format code
npm run formatcreate-next-orbit/
├── src/
│ ├── index.ts # Main CLI entry point
│ ├── types.ts # TypeScript type definitions
│ ├── constants.ts # Constants and component list
│ ├── utils.ts # Utility functions
│ ├── executor.ts # Command execution logic
│ ├── prompts.ts # Interactive prompts
│ └── tests/ # Test files
├── bin/ # Compiled binary
├── dist/ # Compiled distribution
└── package.json
npm run build- Build TypeScript to JavaScriptnpm run build:bin- Build executable binarynpm run dev- Watch mode for developmentnpm test- Run tests with Vitestnpm run lint- Lint with ESLintnpm run format- Format with Prettier
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Run the test suite
- Submit a pull request
MIT License - see LICENSE file for details.
For issues and questions, please open an issue on GitHub.