@dev.aldrindc/zirr-cli 1.0.0 → 1.0.2

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.
package/README.md CHANGED
@@ -1,16 +1,33 @@
1
1
  # ⚡ Zirr - Modern React Starter CLI
2
2
 
3
+ **The perfect launchpad for vibe coders and AI-generated code** • Seamlessly run Google Gemini Canvas creations
4
+
3
5
  [![GitHub stars](https://img.shields.io/github/stars/dev-adelacruz/zirr?style=social)](https://github.com/dev-adelacruz/zirr)
4
6
  [![npm version](https://img.shields.io/npm/v/@dev.aldrindc/zirr-cli)](https://www.npmjs.com/package/@dev.aldrindc/zirr-cli)
5
7
  [![License: ISC](https://img.shields.io/badge/License-ISC-blue.svg)](https://opensource.org/licenses/ISC)
6
8
  [![Node.js Version](https://img.shields.io/badge/node-%3E%3D12.0.0-brightgreen)](https://nodejs.org/)
7
9
  [![Downloads](https://img.shields.io/npm/dt/@dev.aldrindc/zirr-cli)](https://www.npmjs.com/package/@dev.aldrindc/zirr-cli)
8
10
 
9
- A professional command-line tool to scaffold modern React applications with production-ready configurations. Based on the elegant template from the `wifi_qr` project, Zirr provides a beautiful foundation for any React application with zero configuration overhead.
11
+ A professional command-line tool to scaffold modern React applications with production-ready configurations. Built for **vibe coders** who value aesthetics, speed, and modern workflows—whether you're crafting code by hand or leveraging AI tools like **Google Gemini Canvas**. Zirr provides the perfect production environment for AI-generated code with zero configuration overhead.
10
12
 
11
13
  ## ✨ Why Zirr?
12
14
 
13
- Zirr eliminates the tedious setup process for modern React projects. Instead of spending hours configuring build tools, styling frameworks, and code quality tools, Zirr gives you a complete, polished starting point in seconds.
15
+ ### For Vibe Coders & AI-Powered Development
16
+ Zirr is built for developers who value aesthetics, speed, and modern workflows—whether you're crafting code by hand or leveraging AI tools like **Google Gemini Canvas**.
17
+
18
+ ### The Missing Piece for AI-Generated Code
19
+ When Gemini Canvas gives you beautiful React components, you need a production-ready environment to run them. Zirr provides:
20
+ - **Zero-config setup** for AI-generated JSX code
21
+ - **Perfect styling match** with Tailwind CSS (commonly used in AI outputs)
22
+ - **Instant execution** - paste Gemini code and run immediately
23
+ - **No dependency hell** - everything works together out of the box
24
+
25
+ ### Rapid Prototyping Workflow
26
+ 1. 🎨 Design your UI in Google Gemini Canvas
27
+ 2. 📋 Copy the generated React/JSX code
28
+ 3. ⚡ Run `zirr my-ai-project --yes`
29
+ 4. 🖊️ Replace `src/App.jsx` with your Gemini code
30
+ 5. 🚀 Run `npm run dev` - see your AI-designed app live in seconds
14
31
 
15
32
  ### Key Advantages
16
33
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dev.aldrindc/zirr-cli",
3
- "version": "1.0.0",
4
- "description": "CLI tool to generate modern React + Vite + Tailwind CSS projects",
3
+ "version": "1.0.2",
4
+ "description": "CLI tool to generate modern React + Vite + Tailwind CSS projects. Perfect for vibe coders and Google Gemini Canvas users—instantly run AI-generated code with zero configuration.",
5
5
  "main": "src/index.js",
6
6
  "bin": {
7
7
  "zirr": "bin/zirr.js"
@@ -16,7 +16,13 @@
16
16
  "vite",
17
17
  "tailwind",
18
18
  "template",
19
- "starter"
19
+ "starter",
20
+ "vibe-coders",
21
+ "google-gemini",
22
+ "canvas",
23
+ "ai-generated-code",
24
+ "rapid-prototyping",
25
+ "zero-config"
20
26
  ],
21
27
  "author": "dev-adelacruz",
22
28
  "license": "ISC",
package/src/index.js CHANGED
@@ -62,19 +62,40 @@ async function createProject(projectName, options) {
62
62
  // Create project directory
63
63
  fs.ensureDirSync(projectDir);
64
64
 
65
- // Read template files
65
+ // Read template files recursively (compatible with older Node versions)
66
66
  const templateDir = path.join(__dirname, 'templates');
67
- const templateFiles = fs.readdirSync(templateDir, { recursive: true });
67
+
68
+ // Helper function to get all files recursively
69
+ function getAllFiles(dir) {
70
+ const files = [];
71
+ const items = fs.readdirSync(dir);
72
+
73
+ for (const item of items) {
74
+ const itemPath = path.join(dir, item);
75
+ const stat = fs.statSync(itemPath);
76
+
77
+ if (stat.isDirectory()) {
78
+ const subFiles = getAllFiles(itemPath);
79
+ for (const subFile of subFiles) {
80
+ files.push(path.join(item, subFile));
81
+ }
82
+ } else {
83
+ files.push(item);
84
+ }
85
+ }
86
+
87
+ return files;
88
+ }
89
+
90
+ const templateFiles = getAllFiles(templateDir);
68
91
 
69
92
  // Process and copy each template file
70
93
  for (const templateFile of templateFiles) {
71
94
  const sourcePath = path.join(templateDir, templateFile);
72
95
  const targetPath = path.join(projectDir, templateFile);
73
96
 
74
- if (fs.statSync(sourcePath).isDirectory()) {
75
- fs.ensureDirSync(targetPath);
76
- continue;
77
- }
97
+ // Ensure target directory exists
98
+ fs.ensureDirSync(path.dirname(targetPath));
78
99
 
79
100
  // Read template content
80
101
  let content = fs.readFileSync(sourcePath, 'utf-8');
@@ -84,7 +105,6 @@ async function createProject(projectName, options) {
84
105
  content = content.replace(/{{PROJECT_TITLE}}/g, projectDetails.title);
85
106
 
86
107
  // Write to target
87
- fs.ensureDirSync(path.dirname(targetPath));
88
108
  fs.writeFileSync(targetPath, content);
89
109
 
90
110
  console.log(chalk.gray(` ✓ ${templateFile}`));
File without changes