Skip to content

Commit f789db9

Browse files
committed
init create-vorsteh-queue
1 parent 98b98fe commit f789db9

File tree

6 files changed

+859
-0
lines changed

6 files changed

+859
-0
lines changed
Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
# create-vorsteh-queue
2+
3+
Create Vorsteh Queue applications with one command.
4+
5+
## Usage
6+
7+
### Interactive Mode
8+
9+
```bash
10+
# Full interactive experience
11+
npx create-vorsteh-queue
12+
```
13+
14+
### Direct Mode
15+
16+
```bash
17+
# With project name
18+
npx create-vorsteh-queue my-queue-app
19+
20+
# With template selection
21+
npx create-vorsteh-queue my-app --template=drizzle-pglite
22+
npx create-vorsteh-queue my-app -t=progress-tracking
23+
24+
# With package manager
25+
npx create-vorsteh-queue my-app --package-manager=pnpm
26+
npx create-vorsteh-queue my-app -pm=yarn
27+
28+
# Quiet mode (minimal output)
29+
npx create-vorsteh-queue my-app --quiet
30+
npx create-vorsteh-queue my-app -q
31+
32+
# Fully automated
33+
npx create-vorsteh-queue my-app -t=drizzle-pglite -pm=pnpm --quiet
34+
```
35+
36+
## CLI Options
37+
38+
| Option | Short | Description | Example |
39+
| ------------------------ | ----------- | --------------- | ------------------- |
40+
| `--template=<name>` | `-t=<name>` | Choose template | `-t=drizzle-pglite` |
41+
| `--package-manager=<pm>` | `-pm=<pm>` | Package manager | `-pm=pnpm` |
42+
| `--quiet` | `-q` | Minimal output | `--quiet` |
43+
44+
### Package Managers
45+
46+
- **npm** - Default Node.js package manager
47+
- **pnpm** - Fast, disk space efficient
48+
- **yarn** - Popular alternative
49+
- **bun** - Ultra-fast (experimental)
50+
51+
## Available Templates
52+
53+
Templates are **dynamically discovered** from the GitHub repository:
54+
55+
- **drizzle-postgres** - Drizzle ORM + postgres.js (Production ready)
56+
- **drizzle-pg** - Drizzle ORM + node-postgres (Simple setup)
57+
- **drizzle-pglite** - Drizzle ORM + PGlite (Embedded, zero setup)
58+
- **progress-tracking** - Advanced progress tracking with real-time updates
59+
- **event-system** - Comprehensive event monitoring and statistics
60+
61+
> Templates are automatically fetched from the examples directory, so new examples are immediately available!
62+
63+
## Features
64+
65+
- 🚀 **Interactive CLI** - Beautiful prompts with @clack/prompts
66+
- 📦 **Dynamic templates** - Auto-discovered from GitHub repository
67+
- 🔄 **Latest versions** - Fetches current versions from npm registry
68+
- 🎨 **Colorful output** - Enhanced terminal experience with picocolors
69+
- 🔗 **Helpful links** - Direct links to documentation
70+
-**Fast downloads** - Efficient template downloading with giget
71+
- 🤫 **Quiet mode** - Silent operation for automation
72+
- 🛠️ **Multiple package managers** - npm, pnpm, yarn, bun support
73+
- 🎯 **CLI flags** - Full automation support
74+
75+
## What it does
76+
77+
1. **Discovers templates** - Dynamically fetches available templates from GitHub
78+
2. **Prompts for details** - Name, template, package manager (if not provided via CLI)
79+
3. **Downloads template** - Uses giget to efficiently download from GitHub
80+
4. **Updates package.json** - Replaces workspace dependencies with latest npm versions
81+
5. **Installs dependencies** - Uses selected package manager
82+
6. **Provides guidance** - Shows next steps with correct commands
83+
84+
## Examples
85+
86+
### Interactive Usage
87+
88+
```bash
89+
┌ create-vorsteh-queue
90+
91+
◇ What is your project name?
92+
│ my-queue-app
93+
94+
◇ Choose a template:
95+
│ ● drizzle-pglite-example (Embedded PostgreSQL with zero setup)
96+
97+
◇ Install dependencies?
98+
│ Yes
99+
100+
◇ Which package manager?
101+
│ ● pnpm
102+
103+
└ 🎉 Project created successfully!
104+
105+
Next steps:
106+
cd my-queue-app
107+
pnpm run dev
108+
```
109+
110+
### Automated Usage
111+
112+
```bash
113+
# Perfect for scripts and CI/CD
114+
npx create-vorsteh-queue worker-service \
115+
--template=drizzle-postgres \
116+
--package-manager=pnpm \
117+
--quiet
118+
```
119+
120+
## Development
121+
122+
```bash
123+
# Install dependencies
124+
pnpm install
125+
126+
# Run in development
127+
pnpm dev
128+
129+
# Build for production
130+
pnpm build
131+
132+
# Test locally
133+
npx tsx src/index.ts my-test-app
134+
```
135+
136+
## Architecture
137+
138+
- **Dynamic Discovery** - Templates fetched from GitHub API
139+
- **Smart Caching** - giget handles efficient downloads
140+
- **Version Management** - npm registry API for latest versions
141+
- **Graceful Fallbacks** - Works offline with cached templates
142+
- **Cross-platform** - Works on Windows, macOS, Linux
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import baseConfig from "@vorsteh-queue/eslint-config/base"
2+
3+
export default [...baseConfig]
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
{
2+
"name": "create-vorsteh-queue",
3+
"version": "0.0.0",
4+
"description": "Create Vorsteh Queue applications with one command",
5+
"keywords": [
6+
"vorsteh-queue",
7+
"queue",
8+
"jobs",
9+
"cli",
10+
"create"
11+
],
12+
"homepage": "https://vorsteh-queue.dev",
13+
"bugs": "https://github.com/noxify/vorsteh-queue/issues",
14+
"repository": {
15+
"type": "git",
16+
"url": "https://github.com/noxify/vorsteh-queue",
17+
"directory": "packages/create-vorsteh-queue"
18+
},
19+
"license": "MIT",
20+
"type": "module",
21+
"bin": {
22+
"create-vorsteh-queue": "./dist/index.js"
23+
},
24+
"files": [
25+
"dist"
26+
],
27+
"scripts": {
28+
"build": "tsc",
29+
"clean": "git clean -xdf .cache .turbo dist node_modules",
30+
"clean:cache": "git clean -xdf .cache",
31+
"dev": "tsx src/index.ts",
32+
"format": "prettier --check . --ignore-path ../../.gitignore",
33+
"lint": "eslint .",
34+
"typecheck": "tsc --noEmit"
35+
},
36+
"prettier": "@vorsteh-queue/prettier-config",
37+
"dependencies": {
38+
"@antfu/install-pkg": "1.1.0",
39+
"@clack/prompts": "0.11.0",
40+
"giget": "2.0.0",
41+
"picocolors": "1.1.1",
42+
"read-pkg": "9.0.1",
43+
"terminal-link": "4.0.0"
44+
},
45+
"devDependencies": {
46+
"@types/node": "22.16.5",
47+
"@vorsteh-queue/eslint-config": "workspace:*",
48+
"@vorsteh-queue/prettier-config": "workspace:*",
49+
"@vorsteh-queue/tsconfig": "workspace:*",
50+
"eslint": "9.31.0",
51+
"prettier": "3.6.2",
52+
"tsx": "4.20.3",
53+
"typescript": "5.8.3"
54+
},
55+
"engines": {
56+
"node": ">=18"
57+
}
58+
}

0 commit comments

Comments
 (0)