projxo 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/LICENSE +21 -0
  2. package/Readme.md +600 -0
  3. package/index.js +20 -0
  4. package/package.json +59 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Sasanga Chathumal
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/Readme.md ADDED
@@ -0,0 +1,600 @@
1
+ # ProjXO
2
+
3
+ > **Quick project setup CLI for modern web frameworks**
4
+ > Stop wasting time with repetitive project scaffolding. Create production-ready projects in seconds.
5
+
6
+ [![npm version](https://img.shields.io/npm/v/projxo.svg)](https://www.npmjs.com/package/projxo)
7
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
8
+
9
+ ---
10
+
11
+ ## πŸš€ Why ProjXO?
12
+
13
+ As developers, we create new projects constantlyβ€”prototypes, client work, side projects, experiments. But every time, we go through the same tedious process:
14
+
15
+ ```bash
16
+ # The old way (too many steps!)
17
+ npx create-vite my-app
18
+ cd my-app
19
+ npm install
20
+ code .
21
+ ```
22
+
23
+ **ProjXO does it all in one interactive command:**
24
+
25
+ ```bash
26
+ pxo
27
+ ```
28
+
29
+ That's it. Pick your framework, name your project, choose where it goes, and you're coding in seconds.
30
+
31
+ ---
32
+
33
+ ## ✨ Features
34
+
35
+ - **🎯 One Command Setup** - Interactive CLI guides you through everything
36
+ - **⚑ Latest Tools** - Uses current best practices (Vite, not deprecated CRA)
37
+ - **🎨 Multiple Frameworks** - React, Next.js, Angular, React Native
38
+ - **πŸ”§ IDE Integration** - Auto-opens in VS Code, Cursor, WebStorm, etc.
39
+ - **🌍 Cross-Platform** - Works on macOS, Windows, and Linux
40
+ - **πŸ’¨ Zero Config** - No setup files, no configuration needed
41
+
42
+ ---
43
+
44
+ ## πŸ“¦ Installation
45
+
46
+ ### Global Installation (Recommended)
47
+
48
+ ```bash
49
+ npm install -g projxo
50
+ ```
51
+
52
+ Now use from anywhere:
53
+
54
+ ```bash
55
+ pxo
56
+ ```
57
+
58
+ ### npx (No Install)
59
+
60
+ ```bash
61
+ npx projxo
62
+ ```
63
+
64
+ ---
65
+
66
+ ## 🎯 Quick Start
67
+
68
+ ### Create Your First Project
69
+
70
+ ```bash
71
+ pxo
72
+ ```
73
+
74
+ That's it! The CLI will:
75
+
76
+ 1. Ask what framework you want (React, Next.js, Angular, or React Native)
77
+ 2. Ask for your project name
78
+ 3. Ask where to create it
79
+ 4. Ask which IDE to open it in
80
+ 5. Create the project and open it
81
+
82
+ **Total time: ~30 seconds** ⚑
83
+
84
+ ---
85
+
86
+ ## πŸ› οΈ Supported Project Types
87
+
88
+ ### React + Vite (JavaScript)
89
+
90
+ Modern React development with Vite's lightning-fast HMR
91
+
92
+ ```bash
93
+ pxo
94
+ # Select: React + Vite
95
+ ```
96
+
97
+ **Includes:**
98
+
99
+ - React 18+
100
+ - Vite 5+
101
+ - ESLint configuration
102
+ - Fast Refresh
103
+
104
+ ### React + Vite (TypeScript)
105
+
106
+ Type-safe React with Vite
107
+
108
+ ```bash
109
+ pxo
110
+ # Select: React + Vite (TypeScript)
111
+ ```
112
+
113
+ **Includes:**
114
+
115
+ - Everything from React + Vite
116
+ - TypeScript 5+
117
+ - Type definitions
118
+
119
+ ### Next.js
120
+
121
+ Production-ready React framework
122
+
123
+ ```bash
124
+ pxo
125
+ # Select: Next.js
126
+ ```
127
+
128
+ **Includes:**
129
+
130
+ - Next.js 14+ (App Router)
131
+ - TypeScript support
132
+ - ESLint + Prettier
133
+ - Optimized build setup
134
+
135
+ ### Angular
136
+
137
+ Enterprise-grade framework
138
+
139
+ ```bash
140
+ pxo
141
+ # Select: Angular
142
+ ```
143
+
144
+ **Includes:**
145
+
146
+ - Angular 17+
147
+ - TypeScript
148
+ - Angular CLI tools
149
+ - Testing setup
150
+
151
+ ### React Native (Expo)
152
+
153
+ Mobile apps with React
154
+
155
+ ```bash
156
+ pxo
157
+ # Select: React Native (Expo)
158
+ ```
159
+
160
+ **Includes:**
161
+
162
+ - Expo SDK
163
+ - TypeScript support
164
+ - Development tools
165
+ - Platform-specific configurations
166
+
167
+ ---
168
+
169
+ ## 🎨 IDE Integration
170
+
171
+ ProjXO can automatically open your project in your preferred IDE:
172
+
173
+ ### Supported IDEs
174
+
175
+ - **VS Code** - `code` command
176
+ - **Cursor** - `cursor` command
177
+ - **WebStorm** - `webstorm` command
178
+ - **IntelliJ IDEA** - `idea` command
179
+ - **Sublime Text** - `subl` command
180
+ - **Atom** - `atom` command
181
+
182
+ ### Setup IDE Command-Line Tools
183
+
184
+ **VS Code:**
185
+
186
+ 1. Open VS Code
187
+ 2. Press `Cmd/Ctrl + Shift + P`
188
+ 3. Type "Shell Command: Install 'code' command in PATH"
189
+ 4. Done!
190
+
191
+ **Cursor:**
192
+ Usually available after installation
193
+
194
+ **WebStorm/IntelliJ:**
195
+ Tools β†’ Create Command-line Launcher
196
+
197
+ **Others:**
198
+ Refer to your IDE's documentation
199
+
200
+ ---
201
+
202
+ ## πŸ“– Usage Examples
203
+
204
+ ### Example 1: Enterprise Web App
205
+
206
+ ```bash
207
+ pxo
208
+
209
+ # Select: Angular
210
+ # Name: my-ent-app
211
+ # Directory: ~/projects
212
+ # IDE: VS Code
213
+
214
+ # Project created and opened in VS Code!
215
+ # Start: npm run dev
216
+ ```
217
+
218
+ ### Example 2: Landing Page
219
+
220
+ ```bash
221
+ pxo
222
+
223
+ # Select: React + Vite
224
+ # Name: my-landing-page
225
+ # Directory: ~/projects
226
+ # IDE: VS Code
227
+
228
+ # Project created and opened in VS Code!
229
+ # Start: npm run dev
230
+ ```
231
+
232
+ ### Example 3: Full-Stack App
233
+
234
+ ```bash
235
+ pxo
236
+
237
+ # Select: Next.js
238
+ # Name: my-saas-app
239
+ # Directory: ~/work
240
+ # IDE: Cursor
241
+
242
+ # Next.js project with TypeScript ready!
243
+ # Start: npm run dev
244
+ ```
245
+
246
+ ### Example 4: Mobile App
247
+
248
+ ```bash
249
+ pxo
250
+
251
+ # Select: React Native (Expo)
252
+ # Name: my-mobile-app
253
+ # Directory: ~/apps
254
+ # IDE: VS Code
255
+
256
+ # Expo project ready!
257
+ # Start: npx expo start
258
+ ```
259
+
260
+ ---
261
+
262
+ ## βš™οΈ Configuration
263
+
264
+ ProjXO works out of the box with zero configuration. However, you can customize some behaviors:
265
+
266
+ ### Default Directory
267
+
268
+ ProjXO uses your current directory by default. Change it during the prompt or `cd` to your preferred location first:
269
+
270
+ ```bash
271
+ cd ~/projects
272
+ pxo
273
+ ```
274
+
275
+ ### Skip IDE Opening
276
+
277
+ If you prefer to open projects manually:
278
+
279
+ ```bash
280
+ pxo
281
+ # Select: Skip (open manually)
282
+ ```
283
+
284
+ ---
285
+
286
+ ## πŸŽ“ Tips & Best Practices
287
+
288
+ ### Tip 1: Use Consistent Naming
289
+
290
+ ```bash
291
+ # Good naming conventions
292
+ my-project-name βœ“
293
+ my_project_name βœ“
294
+ MyProjectName βœ“
295
+
296
+ # Avoid
297
+ my project name βœ— (spaces)
298
+ my-project-name! βœ— (special chars)
299
+ ```
300
+
301
+ ### Tip 2: Organize Projects
302
+
303
+ ```bash
304
+ # Keep projects organized by type
305
+ ~/projects/clients/
306
+ ~/projects/personal/
307
+ ~/projects/experiments/
308
+
309
+ # Use ProjXO in each folder
310
+ cd ~/projects/clients
311
+ pxo
312
+ ```
313
+
314
+ ### Tip 3: Learn the Frameworks
315
+
316
+ ProjXO uses official tools:
317
+
318
+ - **React + Vite**: [vitejs.dev/guide](https://vitejs.dev/guide/)
319
+ - **Next.js**: [nextjs.org/docs](https://nextjs.org/docs)
320
+ - **Angular**: [angular.io/docs](https://angular.io/docs)
321
+ - **Expo**: [docs.expo.dev](https://docs.expo.dev)
322
+
323
+ ### Tip 4: Post-Setup Tasks
324
+
325
+ After project creation:
326
+
327
+ **For all projects:**
328
+
329
+ ```bash
330
+ cd your-project
331
+ git init
332
+ git add .
333
+ git commit -m "Initial commit"
334
+ ```
335
+
336
+ **Add common packages:**
337
+
338
+ ```bash
339
+ # For React projects
340
+ npm install axios react-query zustand
341
+
342
+ # For styling
343
+ npm install tailwindcss @shadcn/ui
344
+
345
+ # For forms
346
+ npm install react-hook-form zod
347
+ ```
348
+
349
+ ---
350
+
351
+ ## 🚨 Troubleshooting
352
+
353
+ ### Issue: Command not found
354
+
355
+ **Problem:** `pxo: command not found`
356
+
357
+ **Solution:**
358
+
359
+ ```bash
360
+ # Reinstall globally
361
+ npm install -g projxo
362
+
363
+ # Or use full path
364
+ npx projxo
365
+ ```
366
+
367
+ ### Issue: Permission denied
368
+
369
+ **Problem:** `EACCES: permission denied`
370
+
371
+ **Solution (macOS/Linux):**
372
+
373
+ ```bash
374
+ # Fix npm permissions
375
+ sudo chown -R $(whoami) ~/.npm
376
+ sudo chown -R $(whoami) /usr/local/lib/node_modules
377
+
378
+ # Then reinstall
379
+ npm install -g projxo
380
+ ```
381
+
382
+ **Solution (Windows):**
383
+ Run terminal as Administrator
384
+
385
+ ### Issue: IDE doesn't open
386
+
387
+ **Problem:** IDE selected but doesn't open
388
+
389
+ **Solution:**
390
+
391
+ 1. Ensure IDE is installed
392
+ 2. Set up command-line tools (see IDE Integration section)
393
+ 3. Test command manually:
394
+
395
+ ```bash
396
+ code . # for VS Code
397
+ cursor . # for Cursor
398
+ ```
399
+
400
+ ### Issue: Project creation fails
401
+
402
+ **Problem:** Error during project creation
403
+
404
+ **Solutions:**
405
+
406
+ - **Check internet connection** - npm needs to download packages
407
+ - **Clear npm cache** - `npm cache clean --force`
408
+ - **Update Node.js** - Ensure Node.js >= 14.0.0
409
+ - **Check disk space** - Ensure enough space for node_modules
410
+
411
+ ---
412
+
413
+ ## πŸ”§ Requirements
414
+
415
+ - **Node.js** >= 14.0.0
416
+ - **npm** >= 6.0.0 (comes with Node.js)
417
+ - **Internet connection** (for downloading packages)
418
+
419
+ ### Check Your Versions
420
+
421
+ ```bash
422
+ node --version # Should be >= 14.0.0
423
+ npm --version # Should be >= 6.0.0
424
+ ```
425
+
426
+ ### Update Node.js
427
+
428
+ **Using nvm (recommended):**
429
+ ```bash
430
+ nvm install 20
431
+ nvm use 20
432
+ ```
433
+
434
+ **Direct download:**
435
+ [nodejs.org/download](https://nodejs.org/download)
436
+
437
+ ---
438
+
439
+ ## 🀝 Contributing
440
+
441
+ ProjXO is open source and contributions are welcome!
442
+ To make thing easy and manageable use PR (pull requests) as much as possible.
443
+
444
+ ### Ways to Contribute
445
+
446
+ - πŸ› Report bugs
447
+ - πŸ’‘ Suggest features
448
+ - πŸ“– Improve documentation
449
+ - πŸ”§ Submit pull requests
450
+
451
+ ### Development Setup
452
+
453
+ ```bash
454
+ # Clone the repository
455
+ git clone https://github.com/sasangachathumal/ProjXO.git
456
+ cd ProjXO
457
+
458
+ # Install dependencies
459
+ npm install
460
+
461
+ # Test locally
462
+ node index.js
463
+
464
+ # Test globally
465
+ npm link
466
+ pxo
467
+ ```
468
+
469
+ ### Project Structure
470
+
471
+ ```
472
+ ProjXO/
473
+ β”œβ”€β”€ index.js # Entry point
474
+ β”œβ”€β”€ package.json
475
+ └── src/
476
+ β”œβ”€β”€ cli.js # Main CLI logic
477
+ β”œβ”€β”€ config/ # Framework & IDE configs
478
+ β”œβ”€β”€ utils/ # Helper functions
479
+ β”œβ”€β”€ prompts/ # User prompts
480
+ └── handlers/ # Business logic
481
+ ```
482
+
483
+ ---
484
+
485
+ ## πŸ“ License
486
+
487
+ MIT Β© Sasanga Chathumal
488
+
489
+ See [LICENSE](LICENSE) file for details.
490
+
491
+ ---
492
+
493
+ ## πŸ™ Credits
494
+
495
+ ProjXO uses these amazing tools:
496
+
497
+ - [Vite](https://vitejs.dev/) - Next generation frontend tooling
498
+ - [Next.js](https://nextjs.org/) - React framework
499
+ - [Angular CLI](https://angular.io/cli) - Angular development tools
500
+ - [Expo](https://expo.dev/) - React Native framework
501
+ - [Inquirer.js](https://github.com/SBoudrias/Inquirer.js) - Interactive CLI prompts
502
+
503
+ ---
504
+
505
+ ## πŸ—ΊοΈ Roadmap
506
+
507
+ ### Current Version (v1.0.0)
508
+
509
+ - βœ… Interactive project creation
510
+ - βœ… 5 framework templates
511
+ - βœ… IDE integration
512
+ - βœ… Cross-platform support
513
+
514
+ ### Planned Features
515
+
516
+ - πŸ”„ Project tracking and quick access
517
+ - πŸ”„ Bookmarking favorite projects
518
+ - πŸ”„ Custom project templates
519
+ - πŸ”„ Post-setup automation (install common packages)
520
+ - πŸ”„ Git options
521
+ - πŸ”„ Team templates sharing
522
+
523
+ ---
524
+
525
+ ## πŸ’¬ Support
526
+
527
+ ### Get Help
528
+
529
+ - πŸ“– [Documentation](https://github.com/sasangachathumal/ProjXO#readme)
530
+ - πŸ› [Issue Tracker](https://github.com/sasangachathumal/ProjXO/issues)
531
+ - πŸ’¬ [Discussions](https://github.com/sasangachathumal/ProjXO/discussions)
532
+
533
+ ### Stay Updated
534
+
535
+ - ⭐ [Star on GitHub](https://github.com/sasangachathumal/ProjXO)
536
+ - 🐦 [Follow on X](https://x.com/SasangaChathum1)
537
+ - πŸ’Ό [Follow on linkedIn](https://www.linkedin.com/in/sasanga-chathumal/)
538
+ - πŸ“‹ [Follow on facebook](https://www.facebook.com/profile.php?id=61582131982373)
539
+ - πŸ“§ [Email](mailto:devbysasanga@gmail.com)
540
+
541
+ ---
542
+
543
+ ## ⚑ Quick Reference
544
+
545
+ ```bash
546
+ # Create new project
547
+ pxo
548
+
549
+ # Check version
550
+ pxo --version
551
+
552
+ # Get help
553
+ pxo --help
554
+
555
+ # Use without installing
556
+ npx projxo
557
+ ```
558
+
559
+ ---
560
+
561
+ ## πŸ“Š Comparison
562
+
563
+ ### ProjXO vs Manual Setup
564
+
565
+ | Task | Manual | ProjXO |
566
+ |------|--------|--------|
567
+ | Choose framework | Research docs | Interactive selection |
568
+ | Run create command | Remember exact command | Handled automatically |
569
+ | Navigate to project | `cd` manually | Automatic |
570
+ | Open in IDE | `code .` manually | Automatic |
571
+ | **Total time** | **3-5 minutes** | **30 seconds** |
572
+
573
+ ### ProjXO vs Other Tools
574
+
575
+ | Feature | ProjXO | create-* tools | Yeoman |
576
+ |---------|--------|----------------|---------|
577
+ | Interactive | βœ… | ⚠️ Varies | βœ… |
578
+ | Multi-framework | βœ… | ❌ Single | ⚠️ Depends |
579
+ | IDE Integration | βœ… | ❌ | ❌ |
580
+ | Zero config | βœ… | βœ… | ❌ |
581
+ | Modern tools | βœ… | ⚠️ Some outdated | ⚠️ Many outdated |
582
+
583
+ ---
584
+
585
+ ## πŸ”— Links
586
+
587
+ - **npm**: [npmjs.com/package/ProjXO](https://www.npmjs.com/package/ProjXO)
588
+ - **GitHub**: [github.com/sasangachathumal/ProjXO](https://github.com/sasangachathumal/ProjXO)
589
+ - **Issues**: [github.com/sasangachathumal/ProjXO/issues](https://github.com/sasangachathumal/ProjXO/issues)
590
+ - **Changelog**: [CHANGELOG.md](CHANGELOG.md)
591
+
592
+ ---
593
+
594
+ <div align="center">
595
+
596
+ **Made with ❀️ by developers, for developers**
597
+
598
+ [⭐ Star on GitHub](https://github.com/sasangachathumal/ProjXO) β€’ [πŸ“¦ npm Package](https://www.npmjs.com/package/ProjXO) β€’ [πŸ› Report Bug](https://github.com/sasangachathumal/ProjXO/issues)
599
+
600
+ </div>
package/index.js ADDED
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * ProjXO - Quick Project Setup CLI
5
+ *
6
+ * Entry point for the CLI application
7
+ * This file should remain minimal, with all logic in src/cli.js
8
+ *
9
+ * @author Your Name
10
+ * @version 1.0.0
11
+ */
12
+
13
+ // Import the main CLI function
14
+ const { run } = require('./src/cli');
15
+
16
+ // Run the CLI
17
+ run().catch((error) => {
18
+ console.error('Fatal error:', error.message);
19
+ process.exit(1);
20
+ });
package/package.json ADDED
@@ -0,0 +1,59 @@
1
+ {
2
+ "name": "projxo",
3
+ "version": "1.0.0",
4
+ "description": "Cross-platform CLI tool to quickly create React, Next.js, Angular, and React Native projects with automatic IDE integration",
5
+ "main": "index.js",
6
+ "bin": {
7
+ "projxo": "index.js",
8
+ "pxo": "index.js"
9
+ },
10
+ "scripts": {
11
+ "start": "node index.js",
12
+ "test": "echo \"No tests yet\" && exit 0",
13
+ "prepublishOnly": "echo \"βœ“ Ready to publish to npm\""
14
+ },
15
+ "keywords": [
16
+ "cli",
17
+ "project-starter",
18
+ "scaffold",
19
+ "boilerplate",
20
+ "react",
21
+ "nextjs",
22
+ "angular",
23
+ "react-native",
24
+ "vite",
25
+ "expo",
26
+ "developer-tools",
27
+ "ide",
28
+ "vscode",
29
+ "cursor",
30
+ "webstorm"
31
+ ],
32
+ "author": "Sasanga Chathumal <devbysasanga@gmail.com>",
33
+ "license": "MIT",
34
+ "engines": {
35
+ "node": ">=14.0.0"
36
+ },
37
+ "repository": {
38
+ "type": "git",
39
+ "url": "git+https://github.com/sasangachathumal/ProjXO.git"
40
+ },
41
+ "bugs": {
42
+ "url": "https://github.com/sasangachathumal/ProjXO/issues"
43
+ },
44
+ "homepage": "https://github.com/sasangachathumal/ProjXO#readme",
45
+ "files": [
46
+ "index.js",
47
+ "README.md",
48
+ "LICENSE"
49
+ ],
50
+ "preferGlobal": true,
51
+ "os": [
52
+ "darwin",
53
+ "linux",
54
+ "win32"
55
+ ],
56
+ "dependencies": {
57
+ "inquirer": "^8.2.6"
58
+ }
59
+ }