A CLI tool for creating pnpm monorepos with apps and packages structure.
- 🚀 Quick Setup: Generate monorepos with a single command
- 📦 pnpm Workspaces: Built-in support for pnpm workspaces
- ⚛️ React Support: Create React apps with Vite
- 🔧 TypeScript First: TypeScript by default with JavaScript option
- 📱 Multiple Templates: Basic, React, Full-stack, and Electron templates
- 🔧 Shared Configuration: ESLint, TypeScript configs across packages
- 🎯 Utilities: Reusable utility packages
# Using npm
npm create pnpm-monorepo my-project
# Using pnpm
pnpm dlx create-pnpm-monorepo my-project
# Using yarn
yarn create pnpm-monorepo my-project- Basic: Just workspace structure with shared packages
- React: React app with Vite and shared UI components
- Full Stack: React + API + shared packages
- Electron: Desktop app with React
my-project/
├── pnpm-workspace.yaml
├── package.json
├── apps/
│ ├── web/ # React app (if selected)
│ ├── api/ # Backend API (if selected)
│ └── desktop/ # Electron app (if selected)
├── packages/
│ ├── ui/ # Shared UI components
│ ├── config/ # Shared configurations
│ └── utils/ # Shared utilities
└── .gitignore
This project is itself a pnpm monorepo:
# Install dependencies
pnpm install
# Build the CLI
pnpm build
# Test the CLI locally
cd apps/cli
npm link
# Use the CLI
create-pnpm-monorepo test-project- apps/cli/: The main CLI tool package
- packages/templates/: Template files for different project types
- packages/config/: Shared configuration files (ESLint, TypeScript)
- packages/utils/: Utilities for file manipulation and template processing
The CLI tool is published as create-pnpm-monorepo and can be used with npm create, pnpm dlx, or yarn create.
MIT