create-pikku
v0.11.1
Published
Scaffold a new Pikku project
Readme
@pikku/create
A CLI tool for generating new Pikku projects from templates.
Installation
# Using npm create (recommended)
npm create pikku@latest
# Using npx
npx @pikku/create
# Install globally
npm install -g @pikku/createUsage
Interactive Mode
Simply run the command without arguments to be prompted for options:
npm create pikku@latestCLI Mode
Specify all options upfront to skip interactive prompts:
npm create pikku@latest -- --template express --name my-app --install --package-manager npmCLI Options
| Option | Short | Description | Example |
| ----------------------------- | ----- | ---------------------------------- | ------------------------ |
| --template <template> | -t | Template to use | --template express |
| --name <name> | -n | Project name | --name my-app |
| --install | -i | Install dependencies automatically | --install |
| --package-manager <manager> | -p | Package manager to use | --package-manager yarn |
| --version <version> | -v | Template version/branch | --version main |
| --yarn-link <path> | | Link to local Pikku development | --yarn-link ../pikku |
| --stackblitz | | Add StackBlitz configuration | --stackblitz |
| --help | -h | Display help information | --help |
Available Templates
Server Templates
| Template | Description | Features |
| ---------------------- | ----------------------------- | ------------------------------- |
| aws-lambda | AWS Lambda template | HTTP, Scheduled tasks |
| aws-lambda-websocket | Serverless WebSocket template | Channels (WebSockets) |
| cloudflare-workers | Cloudflare Workers template | HTTP, Scheduled tasks |
| cloudflare-websocket | Cloudflare WebSocket template | Channels (WebSockets) |
| express | Express.js server template | HTTP, Scheduled tasks, SSE |
| express-middleware | Express middleware template | HTTP, Scheduled tasks, SSE |
| fastify | Fastify server template | HTTP, SSE |
| fastify-plugin | Fastify plugin template | HTTP, SSE |
| uws | uWebSockets.js template | HTTP, Channels, Scheduled tasks |
| ws | WebSocket server template | HTTP, Channels, Scheduled tasks |
Queue Templates
| Template | Description | Features |
| --------- | --------------------------- | ---------------- |
| bullmq | BullMQ Redis queue template | Queue processing |
| pg-boss | PostgreSQL queue template | Queue processing |
Full-Stack Templates
| Template | Description | Features |
| ---------------- | ---------------------------- | ------------------------------------------- |
| nextjs | Next.js hello world template | HTTP, Full-stack |
| nextjs-full | Next.js book application | HTTP, Full-stack |
| yarn-workspace | Complete workspace example | HTTP, Channels, Scheduled tasks, Full-stack |
Specialized Templates
| Template | Description | Features |
| ------------ | ----------------------------- | -------- |
| mcp-server | Model Context Protocol server | MCP |
Package Managers
Supported package managers:
npm- Most popular package manageryarn- What Pikku usually usesbun- Experimental supportpnpm- Not currently available
Examples
Basic Express App
npm create pikku@latest -- --template express --name my-express-app --package-manager npm --installAWS Lambda with Scheduled Tasks
npm create pikku@latest -- --template aws-lambda --name my-lambda-app --package-manager yarn --installDevelopment with Local Pikku
npm create pikku@latest -- --template express-middleware --name test-app --package-manager yarn --yarn-link /path/to/pikku --installStackBlitz Ready Project
npm create pikku@latest -- --template nextjs --name stackblitz-app --stackblitz --package-manager npmFull Workspace
npm create pikku@latest -- --template yarn-workspace --name my-workspace --package-manager yarn --installFeatures
The CLI automatically filters files based on the template's supported features:
- HTTP: REST API endpoints and HTTP handlers
- Scheduled: Cron-like scheduled task execution
- Channels: WebSocket-like real-time communication
- SSE: Server-Sent Events for streaming
- Queue: Background job processing
- MCP: Model Context Protocol endpoints
- Full-stack: Complete web applications
Only files relevant to the selected template's features will be included in your project.
Development
For local development and testing:
# Build the package
yarn build
# Test with a specific template
node ./dist/index.js --template express-middleware --name test-app --install