@nikkory/vibe-cli 2.4.3 → 2.4.4

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/dist/index.js CHANGED
@@ -25,7 +25,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
25
25
 
26
26
  // src/index.ts
27
27
  var import_commander6 = require("commander");
28
- var import_chalk5 = __toESM(require("chalk"));
28
+ var import_chalk6 = __toESM(require("chalk"));
29
29
 
30
30
  // src/commands/init.ts
31
31
  var fs = __toESM(require("fs/promises"));
@@ -7528,12 +7528,64 @@ var pageGenerateCommand = new import_commander5.Command("add:page").alias("page"
7528
7528
  }
7529
7529
  });
7530
7530
 
7531
+ // src/utils/first-run.ts
7532
+ var import_fs = require("fs");
7533
+ var import_path3 = require("path");
7534
+ var import_os = require("os");
7535
+ var import_chalk5 = __toESM(require("chalk"));
7536
+ var CONFIG_DIR = (0, import_path3.join)((0, import_os.homedir)(), ".nikkory-vibe");
7537
+ var FIRST_RUN_FILE = (0, import_path3.join)(CONFIG_DIR, ".first-run");
7538
+ function isFirstRun() {
7539
+ return !(0, import_fs.existsSync)(FIRST_RUN_FILE);
7540
+ }
7541
+ function markAsRun() {
7542
+ if (!(0, import_fs.existsSync)(CONFIG_DIR)) {
7543
+ (0, import_fs.mkdirSync)(CONFIG_DIR, { recursive: true });
7544
+ }
7545
+ (0, import_fs.writeFileSync)(FIRST_RUN_FILE, (/* @__PURE__ */ new Date()).toISOString(), "utf-8");
7546
+ }
7547
+ function showWelcomeIfFirstRun() {
7548
+ if (!isFirstRun()) return;
7549
+ const y2 = import_chalk5.default.hex("#fcb800");
7550
+ const banner2 = `
7551
+ ${y2.bold("\u2588\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2557\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2557")}
7552
+ ${y2.bold("\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2551\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2554\u255D\u2588\u2588\u2551 \u2588\u2588\u2554\u255D\u2588\u2588\u2554\u2550\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u255A\u2588\u2588\u2557 \u2588\u2588\u2554\u255D")}
7553
+ ${y2.bold("\u2588\u2588\u2554\u2588\u2588\u2557 \u2588\u2588\u2551\u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2554\u255D \u2588\u2588\u2588\u2588\u2588\u2554\u255D \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D \u255A\u2588\u2588\u2588\u2588\u2554\u255D ")}
7554
+ ${y2.bold("\u2588\u2588\u2551\u255A\u2588\u2588\u2557\u2588\u2588\u2551\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2588\u2588\u2557 \u2588\u2588\u2554\u2550\u2588\u2588\u2557 \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557 \u255A\u2588\u2588\u2554\u255D ")}
7555
+ ${y2.bold("\u2588\u2588\u2551 \u255A\u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2557\u2588\u2588\u2551 \u2588\u2588\u2557\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 ")}
7556
+ ${y2.bold("\u255A\u2550\u255D \u255A\u2550\u2550\u2550\u255D\u255A\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D ")}
7557
+
7558
+ ${y2.bold(" \u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557 ")}
7559
+ ${y2.bold(" \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D ")}
7560
+ ${y2.bold(" \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2557 ")}
7561
+ ${y2.bold(" \u255A\u2588\u2588\u2557 \u2588\u2588\u2554\u255D\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u255D ")}
7562
+ ${y2.bold(" \u255A\u2588\u2588\u2588\u2588\u2554\u255D \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557 ")}
7563
+ ${y2.bold(" \u255A\u2550\u2550\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D ")}
7564
+
7565
+ ${y2(" happy together")} ${import_chalk5.default.white("\u2022 v2.4.4")}
7566
+
7567
+ ${import_chalk5.default.gray(" Production-ready code in seconds")}
7568
+ ${import_chalk5.default.gray(" https://nikkory.com")}
7569
+
7570
+ ${import_chalk5.default.green("\u2713 Thanks for installing Nikkory Vibe CLI!")}
7571
+
7572
+ ${import_chalk5.default.cyan("Quick Start:")}
7573
+ ${import_chalk5.default.white("nikkory-vibe add button")} ${import_chalk5.default.gray("# Generate button component")}
7574
+ ${import_chalk5.default.white("nikkory-vibe add:section hero")} ${import_chalk5.default.gray("# Generate hero section")}
7575
+ ${import_chalk5.default.white("nikkory-vibe list")} ${import_chalk5.default.gray("# Browse available templates")}
7576
+
7577
+ ${y2(" 169 Components")} ${import_chalk5.default.gray("+")} ${y2("50 Sections")} ${import_chalk5.default.gray("\xD7")} ${y2("12 Systems")} ${import_chalk5.default.gray("\xD7")} ${y2("3 Tiers")}
7578
+ `;
7579
+ console.log(banner2);
7580
+ markAsRun();
7581
+ }
7582
+
7531
7583
  // src/index.ts
7532
7584
  var componentCount = 169;
7533
7585
  var sectionCount = 50;
7534
7586
  var designSystemCount = 12;
7535
7587
  var tierCount = 3;
7536
- var y = import_chalk5.default.hex("#fcb800");
7588
+ var y = import_chalk6.default.hex("#fcb800");
7537
7589
  var banner = `
7538
7590
  ${y.bold("\u2588\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2557\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2557")}
7539
7591
  ${y.bold("\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2551\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2554\u255D\u2588\u2588\u2551 \u2588\u2588\u2554\u255D\u2588\u2588\u2554\u2550\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u255A\u2588\u2588\u2557 \u2588\u2588\u2554\u255D")}
@@ -7549,15 +7601,16 @@ ${y.bold(" \u255A\u2588\u2588\u2557 \u2588\u2588\u2554\u255D\u2588\u
7549
7601
  ${y.bold(" \u255A\u2588\u2588\u2588\u2588\u2554\u255D \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557 ")}
7550
7602
  ${y.bold(" \u255A\u2550\u2550\u2550\u255D \u255A\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D ")}
7551
7603
 
7552
- ${y(" happy together")} ${import_chalk5.default.white("\u2022 v2.4.3")}
7604
+ ${y(" happy together")} ${import_chalk6.default.white("\u2022 v2.4.4")}
7553
7605
 
7554
- ${import_chalk5.default.gray(" Production-ready code in seconds")}
7555
- ${import_chalk5.default.gray(" https://nikkory.com")}
7606
+ ${import_chalk6.default.gray(" Production-ready code in seconds")}
7607
+ ${import_chalk6.default.gray(" https://nikkory.com")}
7556
7608
 
7557
- ${y(` ${componentCount} Components`)} ${import_chalk5.default.gray("+")} ${y(`${sectionCount} Sections`)} ${import_chalk5.default.gray("\xD7")} ${y(`${designSystemCount} Systems`)} ${import_chalk5.default.gray("\xD7")} ${y(`${tierCount} Tiers`)}
7609
+ ${y(` ${componentCount} Components`)} ${import_chalk6.default.gray("+")} ${y(`${sectionCount} Sections`)} ${import_chalk6.default.gray("\xD7")} ${y(`${designSystemCount} Systems`)} ${import_chalk6.default.gray("\xD7")} ${y(`${tierCount} Tiers`)}
7558
7610
  `;
7611
+ showWelcomeIfFirstRun();
7559
7612
  var program = new import_commander6.Command();
7560
- program.name("nikkory-vibe").description("Nikkory Vibe - Production-ready code in seconds").version("2.4.3").addHelpText("before", banner);
7613
+ program.name("nikkory-vibe").description("Nikkory Vibe - Production-ready code in seconds").version("2.4.4").addHelpText("before", banner);
7561
7614
  program.addCommand(matrixGenerateCommand);
7562
7615
  program.addCommand(sectionGenerateCommand);
7563
7616
  program.addCommand(pageGenerateCommand);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nikkory/vibe-cli",
3
- "version": "2.4.3",
3
+ "version": "2.4.4",
4
4
  "description": "CLI tool for Nikkory Vibe - Generate production-ready code in seconds",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -10,7 +10,6 @@
10
10
  },
11
11
  "files": [
12
12
  "dist",
13
- "scripts",
14
13
  "README.md"
15
14
  ],
16
15
  "scripts": {
@@ -19,8 +18,7 @@
19
18
  "lint": "eslint src --ext .ts",
20
19
  "type-check": "tsc --noEmit",
21
20
  "test": "vitest run",
22
- "test:watch": "vitest",
23
- "postinstall": "node scripts/postinstall.js"
21
+ "test:watch": "vitest"
24
22
  },
25
23
  "keywords": [
26
24
  "cli",
@@ -1,75 +0,0 @@
1
- #!/usr/bin/env python3
2
- """
3
- Convert Nikkory logo to ASCII art based on pixel brightness
4
- """
5
-
6
- from PIL import Image
7
- import sys
8
-
9
- # ASCII characters from darkest to brightest
10
- ASCII_CHARS = ['@', '#', 'S', '%', '?', '*', '+', ';', ':', ',', '.', ' ']
11
- # For yellow/gold logo, use simpler set
12
- ASCII_CHARS_SIMPLE = ['█', '▓', '▒', '░', ' ']
13
-
14
- def resize_image(image, new_width=80):
15
- """Resize image maintaining aspect ratio"""
16
- width, height = image.size
17
- aspect_ratio = height / width
18
- new_height = int(new_width * aspect_ratio * 0.55) # 0.55 for terminal char aspect
19
- return image.resize((new_width, new_height))
20
-
21
- def grayscale(image):
22
- """Convert to grayscale"""
23
- return image.convert('L')
24
-
25
- def pixels_to_ascii(image, ascii_chars=ASCII_CHARS_SIMPLE, invert=False):
26
- """Convert pixels to ASCII characters"""
27
- pixels = image.getdata()
28
- ascii_str = ''
29
- for pixel in pixels:
30
- if invert:
31
- # Invert: bright pixels = dark chars (for yellow on white background)
32
- ascii_str += ascii_chars[min(pixel * len(ascii_chars) // 256, len(ascii_chars) - 1)]
33
- else:
34
- # Normal: dark pixels = dark chars (for yellow logo on transparent/dark background)
35
- ascii_str += ascii_chars[len(ascii_chars) - 1 - min(pixel * len(ascii_chars) // 256, len(ascii_chars) - 1)]
36
- return ascii_str
37
-
38
- def main(image_path, width=80):
39
- """Main conversion function"""
40
- try:
41
- # Load image
42
- image = Image.open(image_path)
43
-
44
- # Process image
45
- image = resize_image(image, width)
46
- image = grayscale(image)
47
-
48
- # Convert to ASCII
49
- ascii_str = pixels_to_ascii(image)
50
-
51
- # Format into lines
52
- img_width = image.width
53
- ascii_lines = [ascii_str[i:i+img_width] for i in range(0, len(ascii_str), img_width)]
54
-
55
- # Save to file first
56
- output_file = image_path.replace('.png', '-ascii.txt')
57
- with open(output_file, 'w', encoding='utf-8') as f:
58
- f.write('\n'.join(ascii_lines))
59
-
60
- # Print success message
61
- print(f"Saved to: {output_file}")
62
-
63
- except Exception as e:
64
- print(f"Error: {e}", file=sys.stderr)
65
- sys.exit(1)
66
-
67
- if __name__ == '__main__':
68
- if len(sys.argv) < 2:
69
- print("Usage: python logo-to-ascii.py <image_path> [width]")
70
- sys.exit(1)
71
-
72
- image_path = sys.argv[1]
73
- width = int(sys.argv[2]) if len(sys.argv) > 2 else 80
74
-
75
- main(image_path, width)
@@ -1,51 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * Post-install script
4
- * Displays welcome message after CLI installation
5
- *
6
- * Powered by Nikkory
7
- */
8
-
9
- // Simple version without chalk dependency for postinstall
10
- const yellow = '\x1b[33m';
11
- const gray = '\x1b[90m';
12
- const green = '\x1b[32m';
13
- const cyan = '\x1b[36m';
14
- const white = '\x1b[37m';
15
- const bold = '\x1b[1m';
16
- const reset = '\x1b[0m';
17
-
18
- const banner = `
19
- ${yellow}${bold}███╗ ██╗██╗██╗ ██╗██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗${reset}
20
- ${yellow}${bold}████╗ ██║██║██║ ██╔╝██║ ██╔╝██╔═══██╗██╔══██╗╚██╗ ██╔╝${reset}
21
- ${yellow}${bold}██╔██╗ ██║██║█████╔╝ █████╔╝ ██║ ██║██████╔╝ ╚████╔╝ ${reset}
22
- ${yellow}${bold}██║╚██╗██║██║██╔═██╗ ██╔═██╗ ██║ ██║██╔══██╗ ╚██╔╝ ${reset}
23
- ${yellow}${bold}██║ ╚████║██║██║ ██╗██║ ██╗╚██████╔╝██║ ██║ ██║ ${reset}
24
- ${yellow}${bold}╚═╝ ╚═══╝╚═╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝ ${reset}
25
-
26
- ${yellow}${bold} ██╗ ██╗██╗██████╗ ███████╗ ${reset}
27
- ${yellow}${bold} ██║ ██║██║██╔══██╗██╔════╝ ${reset}
28
- ${yellow}${bold} ██║ ██║██║██████╔╝█████╗ ${reset}
29
- ${yellow}${bold} ╚██╗ ██╔╝██║██╔══██╗██╔══╝ ${reset}
30
- ${yellow}${bold} ╚████╔╝ ██║██████╔╝███████╗ ${reset}
31
- ${yellow}${bold} ╚═══╝ ╚═╝╚═════╝ ╚══════╝ ${reset}
32
-
33
- ${yellow} happy together${reset} ${white}• v2.4.3${reset}
34
-
35
- ${gray} Production-ready code in seconds${reset}
36
- ${gray} https://nikkory.com${reset}
37
-
38
- ${green}✓ Installation successful!${reset}
39
-
40
- ${cyan}Quick Start:${reset}
41
- ${white}nikkory-vibe add button${reset} ${gray}# Generate button component${reset}
42
- ${white}nikkory-vibe add:section hero${reset} ${gray}# Generate hero section${reset}
43
- ${white}nikkory-vibe list${reset} ${gray}# Browse available templates${reset}
44
-
45
- ${cyan}Need help?${reset}
46
- ${white}nikkory-vibe --help${reset}
47
-
48
- ${yellow} 169 Components${reset} ${gray}+${reset} ${yellow}50 Sections${reset} ${gray}×${reset} ${yellow}12 Systems${reset} ${gray}×${reset} ${yellow}3 Tiers${reset}
49
- `;
50
-
51
- console.log(banner);