create-nyoworks 2.3.1 → 2.4.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.
@@ -0,0 +1,2 @@
1
+ export declare function checkDependencies(): Promise<void>;
2
+ export declare function showClaudeMaxWarning(): void;
package/dist/checks.js ADDED
@@ -0,0 +1,114 @@
1
+ import pc from "picocolors";
2
+ import { execa } from "execa";
3
+ const DEPENDENCIES = [
4
+ {
5
+ name: "Node.js",
6
+ cmd: "node",
7
+ args: ["-v"],
8
+ required: true,
9
+ minVersion: "20.0.0",
10
+ url: "https://nodejs.org",
11
+ },
12
+ {
13
+ name: "pnpm",
14
+ cmd: "pnpm",
15
+ args: ["-v"],
16
+ required: true,
17
+ install: "npm i -g pnpm",
18
+ },
19
+ {
20
+ name: "Docker",
21
+ cmd: "docker",
22
+ args: ["-v"],
23
+ required: true,
24
+ url: "https://docker.com/download",
25
+ },
26
+ {
27
+ name: "Claude CLI",
28
+ cmd: "claude",
29
+ args: ["-v"],
30
+ required: false,
31
+ install: "npm i -g @anthropic-ai/claude-code",
32
+ },
33
+ {
34
+ name: "VS Code",
35
+ cmd: "code",
36
+ args: ["-v"],
37
+ required: false,
38
+ url: "https://code.visualstudio.com",
39
+ },
40
+ ];
41
+ async function checkCommand(cmd, args = []) {
42
+ try {
43
+ const result = await execa(cmd, args);
44
+ return result.stdout.trim().replace(/^v/, "");
45
+ }
46
+ catch {
47
+ return null;
48
+ }
49
+ }
50
+ function compareVersions(current, minimum) {
51
+ const curr = current.split(".").map(Number);
52
+ const min = minimum.split(".").map(Number);
53
+ for (let i = 0; i < 3; i++) {
54
+ if ((curr[i] || 0) > (min[i] || 0))
55
+ return true;
56
+ if ((curr[i] || 0) < (min[i] || 0))
57
+ return false;
58
+ }
59
+ return true;
60
+ }
61
+ export async function checkDependencies() {
62
+ console.log();
63
+ console.log(pc.cyan("Checking dependencies..."));
64
+ let hasError = false;
65
+ for (const dep of DEPENDENCIES) {
66
+ const version = await checkCommand(dep.cmd, dep.args);
67
+ if (!version) {
68
+ if (dep.required) {
69
+ console.log(pc.red(` ✗ ${dep.name} is required`));
70
+ hasError = true;
71
+ }
72
+ else {
73
+ console.log(pc.yellow(` ⚠ ${dep.name} (recommended)`));
74
+ }
75
+ if (dep.install) {
76
+ console.log(pc.dim(` Install: ${dep.install}`));
77
+ }
78
+ if (dep.url) {
79
+ console.log(pc.dim(` Download: ${dep.url}`));
80
+ }
81
+ }
82
+ else {
83
+ if (dep.minVersion && !compareVersions(version, dep.minVersion)) {
84
+ console.log(pc.yellow(` ⚠ ${dep.name} ${version} (minimum: ${dep.minVersion})`));
85
+ }
86
+ else {
87
+ console.log(pc.green(` ✓ ${dep.name} ${version}`));
88
+ }
89
+ }
90
+ }
91
+ if (hasError) {
92
+ console.log();
93
+ console.log(pc.red("Please install the required dependencies before continuing."));
94
+ }
95
+ }
96
+ export function showClaudeMaxWarning() {
97
+ console.log();
98
+ console.log(pc.yellow("╔═══════════════════════════════════════════════════════════════════════╗"));
99
+ console.log(pc.yellow("║") + pc.bold(" ⚠️ MCP Server requires Claude Max subscription ") + pc.yellow("║"));
100
+ console.log(pc.yellow("╠═══════════════════════════════════════════════════════════════════════╣"));
101
+ console.log(pc.yellow("║") + " " + pc.yellow("║"));
102
+ console.log(pc.yellow("║") + " The AI agents in this framework use Model Context Protocol (MCP). " + pc.yellow("║"));
103
+ console.log(pc.yellow("║") + " MCP requires Claude Max subscription. " + pc.yellow("║"));
104
+ console.log(pc.yellow("║") + " " + pc.yellow("║"));
105
+ console.log(pc.yellow("║") + pc.bold(" Pricing: $100/month") + " (5x usage vs Pro) " + pc.yellow("║"));
106
+ console.log(pc.yellow("║") + " Subscribe: " + pc.cyan("https://claude.ai/settings/billing") + " " + pc.yellow("║"));
107
+ console.log(pc.yellow("║") + " " + pc.yellow("║"));
108
+ console.log(pc.yellow("║") + " Without Claude Max: " + pc.yellow("║"));
109
+ console.log(pc.yellow("║") + pc.green(" ✓ You can still use the codebase manually") + " " + pc.yellow("║"));
110
+ console.log(pc.yellow("║") + pc.red(" ✗ AI agents (/lead, /backend, /frontend, etc.) won't work") + " " + pc.yellow("║"));
111
+ console.log(pc.yellow("║") + pc.red(" ✗ MCP tools will not be available") + " " + pc.yellow("║"));
112
+ console.log(pc.yellow("║") + " " + pc.yellow("║"));
113
+ console.log(pc.yellow("╚═══════════════════════════════════════════════════════════════════════╝"));
114
+ }
package/dist/init.js CHANGED
@@ -5,6 +5,7 @@ import path from "path";
5
5
  import os from "os";
6
6
  import { execa } from "execa";
7
7
  import { replacePlaceholders } from "./replace.js";
8
+ import { checkDependencies, showClaudeMaxWarning } from "./checks.js";
8
9
  const REPO = "naimozcan/nyoworks-framework";
9
10
  const BRANCH = "main";
10
11
  const AVAILABLE_FEATURES = [
@@ -212,13 +213,20 @@ See \`docs/bible/data/schema.md\`
212
213
  }
213
214
  console.log();
214
215
  console.log(pc.green(pc.bold("Project created successfully!")));
216
+ await checkDependencies();
217
+ showClaudeMaxWarning();
215
218
  console.log();
216
- console.log(" Next steps:");
219
+ console.log(pc.bold(" Next steps:"));
217
220
  console.log();
218
221
  console.log(pc.cyan(` cd ${slug}`));
219
222
  console.log(pc.cyan(" pnpm install"));
223
+ console.log(pc.cyan(" docker compose up -d ") + pc.dim("# Start PostgreSQL & Redis"));
220
224
  console.log(pc.cyan(" pnpm dev"));
221
225
  console.log();
226
+ console.log(pc.dim(" Optional:"));
227
+ console.log(pc.dim(" code . # Open in VS Code"));
228
+ console.log(pc.dim(" claude # Start Claude Code CLI"));
229
+ console.log();
222
230
  console.log(pc.dim(" Configuration:"));
223
231
  console.log(pc.dim(` Name: ${name}`));
224
232
  console.log(pc.dim(` Code: ${code}`));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-nyoworks",
3
- "version": "2.3.1",
3
+ "version": "2.4.0",
4
4
  "description": "Create a new NYOWORKS project",
5
5
  "type": "module",
6
6
  "bin": {