@voltx/cli 0.1.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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Promptly AI Team
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.
@@ -0,0 +1,98 @@
1
+ import {
2
+ __require,
3
+ printWelcomeBanner
4
+ } from "./chunk-RH5Q7I3S.mjs";
5
+
6
+ // src/create.ts
7
+ import * as fs from "fs";
8
+ import * as path from "path";
9
+ async function createProject(options) {
10
+ const { name, template = "blank" } = options;
11
+ const targetDir = path.resolve(process.cwd(), name);
12
+ if (fs.existsSync(targetDir)) {
13
+ console.error(`[voltx] Directory "${name}" already exists.`);
14
+ process.exit(1);
15
+ }
16
+ fs.mkdirSync(targetDir, { recursive: true });
17
+ const templateDeps = {
18
+ blank: { "@voltx/core": "^0.1.0" },
19
+ chatbot: {
20
+ "@voltx/core": "^0.1.0",
21
+ "@voltx/agents": "^0.1.0",
22
+ "@voltx/memory": "^0.1.0",
23
+ "@voltx/ui": "^0.1.0"
24
+ },
25
+ "rag-app": {
26
+ "@voltx/core": "^0.1.0",
27
+ "@voltx/rag": "^0.1.0",
28
+ "@voltx/db": "^0.1.0",
29
+ "@voltx/ui": "^0.1.0"
30
+ },
31
+ "agent-app": {
32
+ "@voltx/core": "^0.1.0",
33
+ "@voltx/agents": "^0.1.0",
34
+ "@voltx/memory": "^0.1.0",
35
+ "@voltx/rag": "^0.1.0",
36
+ "@voltx/db": "^0.1.0",
37
+ "@voltx/ui": "^0.1.0"
38
+ }
39
+ };
40
+ const packageJson = {
41
+ name,
42
+ version: "0.1.0",
43
+ private: true,
44
+ scripts: {
45
+ dev: "voltx dev",
46
+ build: "voltx build",
47
+ start: "voltx start"
48
+ },
49
+ dependencies: templateDeps[template] ?? templateDeps["blank"]
50
+ };
51
+ fs.writeFileSync(
52
+ path.join(targetDir, "package.json"),
53
+ JSON.stringify(packageJson, null, 2)
54
+ );
55
+ const configContent = `import { defineConfig } from "@voltx/core";
56
+
57
+ export default defineConfig({
58
+ name: "${name}",
59
+ port: 3000,
60
+ ai: {
61
+ provider: "openai",
62
+ model: "gpt-4o",
63
+ },
64
+ });
65
+ `;
66
+ fs.writeFileSync(path.join(targetDir, "voltx.config.ts"), configContent);
67
+ fs.mkdirSync(path.join(targetDir, "src", "routes"), { recursive: true });
68
+ fs.mkdirSync(path.join(targetDir, "src", "agents"), { recursive: true });
69
+ const indexContent = `import { createApp } from "@voltx/core";
70
+ import config from "../voltx.config";
71
+
72
+ const app = createApp(config);
73
+ app.start();
74
+ `;
75
+ fs.writeFileSync(path.join(targetDir, "src", "index.ts"), indexContent);
76
+ fs.writeFileSync(
77
+ path.join(targetDir, ".env.example"),
78
+ "OPENAI_API_KEY=your-key-here\nDATABASE_URL=\n"
79
+ );
80
+ printWelcomeBanner(name);
81
+ }
82
+ if (__require.main === module) {
83
+ const projectName = process.argv[2];
84
+ if (!projectName) {
85
+ console.log("Usage: create-voltx-app <project-name> [--template chatbot]");
86
+ process.exit(1);
87
+ }
88
+ const templateFlag = process.argv.indexOf("--template");
89
+ const template = templateFlag !== -1 ? process.argv[templateFlag + 1] : "blank";
90
+ createProject({ name: projectName, template }).catch((err) => {
91
+ console.error("[voltx] Error:", err);
92
+ process.exit(1);
93
+ });
94
+ }
95
+
96
+ export {
97
+ createProject
98
+ };
@@ -0,0 +1,82 @@
1
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
2
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
3
+ }) : x)(function(x) {
4
+ if (typeof require !== "undefined") return require.apply(this, arguments);
5
+ throw Error('Dynamic require of "' + x + '" is not supported');
6
+ });
7
+
8
+ // src/create.ts
9
+ import * as fs from "fs";
10
+ import * as path from "path";
11
+ async function createProject(options) {
12
+ const { name, template = "blank" } = options;
13
+ const targetDir = path.resolve(process.cwd(), name);
14
+ if (fs.existsSync(targetDir)) {
15
+ console.error(`[aix] Directory "${name}" already exists.`);
16
+ process.exit(1);
17
+ }
18
+ console.log(`[aix] Creating new AIX app: ${name}`);
19
+ console.log(`[aix] Template: ${template}`);
20
+ fs.mkdirSync(targetDir, { recursive: true });
21
+ const packageJson = {
22
+ name,
23
+ version: "0.1.0",
24
+ private: true,
25
+ scripts: {
26
+ dev: "aix dev",
27
+ build: "aix build",
28
+ start: "aix start"
29
+ },
30
+ dependencies: {
31
+ "@aix/core": "^0.1.0"
32
+ }
33
+ };
34
+ fs.writeFileSync(
35
+ path.join(targetDir, "package.json"),
36
+ JSON.stringify(packageJson, null, 2)
37
+ );
38
+ const configContent = `import { defineConfig } from "@aix/core";
39
+
40
+ export default defineConfig({
41
+ name: "${name}",
42
+ port: 3000,
43
+ ai: {
44
+ provider: "openai",
45
+ model: "gpt-4o",
46
+ },
47
+ });
48
+ `;
49
+ fs.writeFileSync(path.join(targetDir, "aix.config.ts"), configContent);
50
+ fs.mkdirSync(path.join(targetDir, "src", "routes"), { recursive: true });
51
+ fs.mkdirSync(path.join(targetDir, "src", "agents"), { recursive: true });
52
+ const indexContent = `import { createApp } from "@aix/core";
53
+ import config from "../aix.config";
54
+
55
+ const app = createApp(config);
56
+ app.start();
57
+ `;
58
+ fs.writeFileSync(path.join(targetDir, "src", "index.ts"), indexContent);
59
+ fs.writeFileSync(
60
+ path.join(targetDir, ".env.example"),
61
+ "OPENAI_API_KEY=your-key-here\nDATABASE_URL=\n"
62
+ );
63
+ console.log(`[aix] \u2713 Project created at ./${name}`);
64
+ console.log(`[aix] Next steps:`);
65
+ console.log(` cd ${name}`);
66
+ console.log(` pnpm install`);
67
+ console.log(` pnpm dev`);
68
+ }
69
+ if (__require.main === module) {
70
+ const projectName = process.argv[2];
71
+ if (!projectName) {
72
+ console.log("Usage: create-aix-app <project-name> [--template chatbot]");
73
+ process.exit(1);
74
+ }
75
+ const templateFlag = process.argv.indexOf("--template");
76
+ const template = templateFlag !== -1 ? process.argv[templateFlag + 1] : "blank";
77
+ createProject({ name: projectName, template });
78
+ }
79
+
80
+ export {
81
+ createProject
82
+ };
@@ -0,0 +1,74 @@
1
+ import {
2
+ __require,
3
+ printWelcomeBanner
4
+ } from "./chunk-NWDPHY2E.mjs";
5
+
6
+ // src/create.ts
7
+ import * as fs from "fs";
8
+ import * as path from "path";
9
+ async function createProject(options) {
10
+ const { name, template = "blank" } = options;
11
+ const targetDir = path.resolve(process.cwd(), name);
12
+ if (fs.existsSync(targetDir)) {
13
+ console.error(`[voltx] Directory "${name}" already exists.`);
14
+ process.exit(1);
15
+ }
16
+ fs.mkdirSync(targetDir, { recursive: true });
17
+ const packageJson = {
18
+ name,
19
+ version: "0.1.0",
20
+ private: true,
21
+ scripts: {
22
+ dev: "voltx dev",
23
+ build: "voltx build",
24
+ start: "voltx start"
25
+ },
26
+ dependencies: {
27
+ "@voltx/core": "^0.1.0"
28
+ }
29
+ };
30
+ fs.writeFileSync(
31
+ path.join(targetDir, "package.json"),
32
+ JSON.stringify(packageJson, null, 2)
33
+ );
34
+ const configContent = `import { defineConfig } from "@voltx/core";
35
+
36
+ export default defineConfig({
37
+ name: "${name}",
38
+ port: 3000,
39
+ ai: {
40
+ provider: "openai",
41
+ model: "gpt-4o",
42
+ },
43
+ });
44
+ `;
45
+ fs.writeFileSync(path.join(targetDir, "voltx.config.ts"), configContent);
46
+ fs.mkdirSync(path.join(targetDir, "src", "routes"), { recursive: true });
47
+ fs.mkdirSync(path.join(targetDir, "src", "agents"), { recursive: true });
48
+ const indexContent = `import { createApp } from "@voltx/core";
49
+ import config from "../voltx.config";
50
+
51
+ const app = createApp(config);
52
+ app.start();
53
+ `;
54
+ fs.writeFileSync(path.join(targetDir, "src", "index.ts"), indexContent);
55
+ fs.writeFileSync(
56
+ path.join(targetDir, ".env.example"),
57
+ "OPENAI_API_KEY=your-key-here\nDATABASE_URL=\n"
58
+ );
59
+ printWelcomeBanner(name);
60
+ }
61
+ if (__require.main === module) {
62
+ const projectName = process.argv[2];
63
+ if (!projectName) {
64
+ console.log("Usage: create-voltx-app <project-name> [--template chatbot]");
65
+ process.exit(1);
66
+ }
67
+ const templateFlag = process.argv.indexOf("--template");
68
+ const template = templateFlag !== -1 ? process.argv[templateFlag + 1] : "blank";
69
+ createProject({ name: projectName, template });
70
+ }
71
+
72
+ export {
73
+ createProject
74
+ };
@@ -0,0 +1,107 @@
1
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
2
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
3
+ }) : x)(function(x) {
4
+ if (typeof require !== "undefined") return require.apply(this, arguments);
5
+ throw Error('Dynamic require of "' + x + '" is not supported');
6
+ });
7
+
8
+ // src/welcome.ts
9
+ var ESC = "\x1B[";
10
+ var RESET = `${ESC}0m`;
11
+ var ITALIC = `${ESC}3m`;
12
+ var BOLD = `${ESC}1m`;
13
+ function rgb(r, g, b, text) {
14
+ return `${ESC}38;2;${r};${g};${b}m${text}${RESET}`;
15
+ }
16
+ function lerp(a, b, t) {
17
+ return Math.round(a + (b - a) * t);
18
+ }
19
+ function gradientLine(text, from, to) {
20
+ const len = text.length;
21
+ if (len === 0) return "";
22
+ return text.split("").map((char, i) => {
23
+ const t = len === 1 ? 0 : i / (len - 1);
24
+ const r = lerp(from.r, to.r, t);
25
+ const g = lerp(from.g, to.g, t);
26
+ const b = lerp(from.b, to.b, t);
27
+ return rgb(r, g, b, char);
28
+ }).join("");
29
+ }
30
+ function gradientBlock(lines, colors) {
31
+ return lines.map((line, i) => {
32
+ const t = lines.length === 1 ? 0 : i / (lines.length - 1);
33
+ const segIndex = t * (colors.length - 1);
34
+ const fromIdx = Math.floor(segIndex);
35
+ const toIdx = Math.min(fromIdx + 1, colors.length - 1);
36
+ const localT = segIndex - fromIdx;
37
+ const from = {
38
+ r: lerp(colors[fromIdx].r, colors[toIdx].r, localT),
39
+ g: lerp(colors[fromIdx].g, colors[toIdx].g, localT),
40
+ b: lerp(colors[fromIdx].b, colors[toIdx].b, localT)
41
+ };
42
+ const to = {
43
+ r: lerp(colors[Math.min(fromIdx + 1, colors.length - 1)].r, colors[Math.min(toIdx + 1, colors.length - 1)].r, localT),
44
+ g: lerp(colors[Math.min(fromIdx + 1, colors.length - 1)].g, colors[Math.min(toIdx + 1, colors.length - 1)].g, localT),
45
+ b: lerp(colors[Math.min(fromIdx + 1, colors.length - 1)].b, colors[Math.min(toIdx + 1, colors.length - 1)].b, localT)
46
+ };
47
+ return gradientLine(line, from, to);
48
+ }).join("\n");
49
+ }
50
+ var VOLTX_BANNER = [
51
+ " \u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2557 \u2588\u2588\u2557",
52
+ " \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2551 \u255A\u2550\u2550\u2588\u2588\u2554\u2550\u2550\u255D\u255A\u2588\u2588\u2557\u2588\u2588\u2554\u255D",
53
+ " \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551 \u255A\u2588\u2588\u2588\u2554\u255D ",
54
+ " \u255A\u2588\u2588\u2557 \u2588\u2588\u2554\u255D\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2554\u2588\u2588\u2557 ",
55
+ " \u255A\u2588\u2588\u2588\u2588\u2554\u255D \u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2551 \u2588\u2588\u2554\u255D \u2588\u2588\u2557",
56
+ " \u255A\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D"
57
+ ];
58
+ var VOLTX_COLORS = [
59
+ { r: 0, g: 180, b: 255 },
60
+ // electric blue
61
+ { r: 120, g: 80, b: 255 },
62
+ // purple
63
+ { r: 255, g: 50, b: 180 },
64
+ // hot pink
65
+ { r: 255, g: 120, b: 50 }
66
+ // orange
67
+ ];
68
+ function printWelcomeBanner(projectName) {
69
+ console.log("");
70
+ console.log(gradientBlock(VOLTX_BANNER, VOLTX_COLORS));
71
+ console.log("");
72
+ console.log(
73
+ ` ${ITALIC}${rgb(180, 180, 220, "The AI-first full-stack framework")}${RESET}`
74
+ );
75
+ console.log("");
76
+ if (projectName) {
77
+ console.log(
78
+ ` ${ITALIC}${rgb(120, 220, 180, `Thank you for choosing VoltX! \u26A1`)}${RESET}`
79
+ );
80
+ console.log(
81
+ ` ${ITALIC}${rgb(160, 160, 200, `Your project "${projectName}" is ready to go.`)}${RESET}`
82
+ );
83
+ console.log("");
84
+ console.log(
85
+ ` ${rgb(100, 180, 255, "Next steps:")}`
86
+ );
87
+ console.log(
88
+ ` ${rgb(200, 200, 220, ` cd ${projectName}`)}`
89
+ );
90
+ console.log(
91
+ ` ${rgb(200, 200, 220, " pnpm install")}`
92
+ );
93
+ console.log(
94
+ ` ${rgb(200, 200, 220, " pnpm dev")}`
95
+ );
96
+ console.log("");
97
+ console.log(
98
+ ` ${ITALIC}${rgb(140, 140, 170, "Docs: https://voltx.dev \u2022 GitHub: github.com/voltx")}${RESET}`
99
+ );
100
+ console.log("");
101
+ }
102
+ }
103
+
104
+ export {
105
+ __require,
106
+ printWelcomeBanner
107
+ };
@@ -0,0 +1,98 @@
1
+ import {
2
+ __require,
3
+ printWelcomeBanner
4
+ } from "./chunk-XG76SXPJ.mjs";
5
+
6
+ // src/create.ts
7
+ import * as fs from "fs";
8
+ import * as path from "path";
9
+ async function createProject(options) {
10
+ const { name, template = "blank" } = options;
11
+ const targetDir = path.resolve(process.cwd(), name);
12
+ if (fs.existsSync(targetDir)) {
13
+ console.error(`[voltx] Directory "${name}" already exists.`);
14
+ process.exit(1);
15
+ }
16
+ fs.mkdirSync(targetDir, { recursive: true });
17
+ const templateDeps = {
18
+ blank: { "@voltx/core": "^0.1.0" },
19
+ chatbot: {
20
+ "@voltx/core": "^0.1.0",
21
+ "@voltx/agents": "^0.1.0",
22
+ "@voltx/memory": "^0.1.0",
23
+ "@voltx/ui": "^0.1.0"
24
+ },
25
+ "rag-app": {
26
+ "@voltx/core": "^0.1.0",
27
+ "@voltx/rag": "^0.1.0",
28
+ "@voltx/db": "^0.1.0",
29
+ "@voltx/ui": "^0.1.0"
30
+ },
31
+ "agent-app": {
32
+ "@voltx/core": "^0.1.0",
33
+ "@voltx/agents": "^0.1.0",
34
+ "@voltx/memory": "^0.1.0",
35
+ "@voltx/rag": "^0.1.0",
36
+ "@voltx/db": "^0.1.0",
37
+ "@voltx/ui": "^0.1.0"
38
+ }
39
+ };
40
+ const packageJson = {
41
+ name,
42
+ version: "0.1.0",
43
+ private: true,
44
+ scripts: {
45
+ dev: "voltx dev",
46
+ build: "voltx build",
47
+ start: "voltx start"
48
+ },
49
+ dependencies: templateDeps[template] ?? templateDeps["blank"]
50
+ };
51
+ fs.writeFileSync(
52
+ path.join(targetDir, "package.json"),
53
+ JSON.stringify(packageJson, null, 2)
54
+ );
55
+ const configContent = `import { defineConfig } from "@voltx/core";
56
+
57
+ export default defineConfig({
58
+ name: "${name}",
59
+ port: 3000,
60
+ ai: {
61
+ provider: "openai",
62
+ model: "gpt-4o",
63
+ },
64
+ });
65
+ `;
66
+ fs.writeFileSync(path.join(targetDir, "voltx.config.ts"), configContent);
67
+ fs.mkdirSync(path.join(targetDir, "src", "routes"), { recursive: true });
68
+ fs.mkdirSync(path.join(targetDir, "src", "agents"), { recursive: true });
69
+ const indexContent = `import { createApp } from "@voltx/core";
70
+ import config from "../voltx.config";
71
+
72
+ const app = createApp(config);
73
+ app.start();
74
+ `;
75
+ fs.writeFileSync(path.join(targetDir, "src", "index.ts"), indexContent);
76
+ fs.writeFileSync(
77
+ path.join(targetDir, ".env.example"),
78
+ "OPENAI_API_KEY=your-key-here\nDATABASE_URL=\n"
79
+ );
80
+ printWelcomeBanner(name);
81
+ }
82
+ if (__require.main === module) {
83
+ const projectName = process.argv[2];
84
+ if (!projectName) {
85
+ console.log("Usage: create-voltx-app <project-name> [--template chatbot]");
86
+ process.exit(1);
87
+ }
88
+ const templateFlag = process.argv.indexOf("--template");
89
+ const template = templateFlag !== -1 ? process.argv[templateFlag + 1] : "blank";
90
+ createProject({ name: projectName, template }).catch((err) => {
91
+ console.error("[voltx] Error:", err);
92
+ process.exit(1);
93
+ });
94
+ }
95
+
96
+ export {
97
+ createProject
98
+ };
@@ -0,0 +1,74 @@
1
+ import {
2
+ __require,
3
+ printWelcomeBanner
4
+ } from "./chunk-YY7HMJGT.mjs";
5
+
6
+ // src/create.ts
7
+ import * as fs from "fs";
8
+ import * as path from "path";
9
+ async function createProject(options) {
10
+ const { name, template = "blank" } = options;
11
+ const targetDir = path.resolve(process.cwd(), name);
12
+ if (fs.existsSync(targetDir)) {
13
+ console.error(`[voltx] Directory "${name}" already exists.`);
14
+ process.exit(1);
15
+ }
16
+ fs.mkdirSync(targetDir, { recursive: true });
17
+ const packageJson = {
18
+ name,
19
+ version: "0.1.0",
20
+ private: true,
21
+ scripts: {
22
+ dev: "voltx dev",
23
+ build: "voltx build",
24
+ start: "voltx start"
25
+ },
26
+ dependencies: {
27
+ "@voltx/core": "^0.1.0"
28
+ }
29
+ };
30
+ fs.writeFileSync(
31
+ path.join(targetDir, "package.json"),
32
+ JSON.stringify(packageJson, null, 2)
33
+ );
34
+ const configContent = `import { defineConfig } from "@voltx/core";
35
+
36
+ export default defineConfig({
37
+ name: "${name}",
38
+ port: 3000,
39
+ ai: {
40
+ provider: "openai",
41
+ model: "gpt-4o",
42
+ },
43
+ });
44
+ `;
45
+ fs.writeFileSync(path.join(targetDir, "voltx.config.ts"), configContent);
46
+ fs.mkdirSync(path.join(targetDir, "src", "routes"), { recursive: true });
47
+ fs.mkdirSync(path.join(targetDir, "src", "agents"), { recursive: true });
48
+ const indexContent = `import { createApp } from "@voltx/core";
49
+ import config from "../voltx.config";
50
+
51
+ const app = createApp(config);
52
+ app.start();
53
+ `;
54
+ fs.writeFileSync(path.join(targetDir, "src", "index.ts"), indexContent);
55
+ fs.writeFileSync(
56
+ path.join(targetDir, ".env.example"),
57
+ "OPENAI_API_KEY=your-key-here\nDATABASE_URL=\n"
58
+ );
59
+ printWelcomeBanner(name);
60
+ }
61
+ if (__require.main === module) {
62
+ const projectName = process.argv[2];
63
+ if (!projectName) {
64
+ console.log("Usage: create-voltx-app <project-name> [--template chatbot]");
65
+ process.exit(1);
66
+ }
67
+ const templateFlag = process.argv.indexOf("--template");
68
+ const template = templateFlag !== -1 ? process.argv[templateFlag + 1] : "blank";
69
+ createProject({ name: projectName, template });
70
+ }
71
+
72
+ export {
73
+ createProject
74
+ };
@@ -0,0 +1,115 @@
1
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
2
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
3
+ }) : x)(function(x) {
4
+ if (typeof require !== "undefined") return require.apply(this, arguments);
5
+ throw Error('Dynamic require of "' + x + '" is not supported');
6
+ });
7
+
8
+ // src/welcome.ts
9
+ var ESC = "\x1B[";
10
+ var RESET = `${ESC}0m`;
11
+ var ITALIC = `${ESC}3m`;
12
+ function rgb(r, g, b, text) {
13
+ return `${ESC}38;2;${r};${g};${b}m${text}${RESET}`;
14
+ }
15
+ function lerp(a, b, t) {
16
+ return Math.round(a + (b - a) * t);
17
+ }
18
+ function gradientLine(text, from, to) {
19
+ const len = text.length;
20
+ if (len === 0) return "";
21
+ return text.split("").map((char, i) => {
22
+ const t = len === 1 ? 0 : i / (len - 1);
23
+ const r = lerp(from.r, to.r, t);
24
+ const g = lerp(from.g, to.g, t);
25
+ const b = lerp(from.b, to.b, t);
26
+ return rgb(r, g, b, char);
27
+ }).join("");
28
+ }
29
+ function gradientBlock(lines, colors) {
30
+ return lines.map((line, i) => {
31
+ const t = lines.length === 1 ? 0 : i / (lines.length - 1);
32
+ const segIndex = t * (colors.length - 1);
33
+ const fromIdx = Math.floor(segIndex);
34
+ const toIdx = Math.min(fromIdx + 1, colors.length - 1);
35
+ const localT = segIndex - fromIdx;
36
+ const from = {
37
+ r: lerp(colors[fromIdx].r, colors[toIdx].r, localT),
38
+ g: lerp(colors[fromIdx].g, colors[toIdx].g, localT),
39
+ b: lerp(colors[fromIdx].b, colors[toIdx].b, localT)
40
+ };
41
+ const to = {
42
+ r: lerp(colors[Math.min(fromIdx + 1, colors.length - 1)].r, colors[Math.min(toIdx + 1, colors.length - 1)].r, localT),
43
+ g: lerp(colors[Math.min(fromIdx + 1, colors.length - 1)].g, colors[Math.min(toIdx + 1, colors.length - 1)].g, localT),
44
+ b: lerp(colors[Math.min(fromIdx + 1, colors.length - 1)].b, colors[Math.min(toIdx + 1, colors.length - 1)].b, localT)
45
+ };
46
+ return gradientLine(line, from, to);
47
+ }).join("\n");
48
+ }
49
+ var VOLTX_BANNER = [
50
+ " \u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2557 \u2588\u2588\u2557",
51
+ " \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2551 \u255A\u2550\u2550\u2588\u2588\u2554\u2550\u2550\u255D\u255A\u2588\u2588\u2557\u2588\u2588\u2554\u255D",
52
+ " \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551 \u255A\u2588\u2588\u2588\u2554\u255D ",
53
+ " \u255A\u2588\u2588\u2557 \u2588\u2588\u2554\u255D\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2554\u2588\u2588\u2557 ",
54
+ " \u255A\u2588\u2588\u2588\u2588\u2554\u255D \u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2551 \u2588\u2588\u2554\u255D \u2588\u2588\u2557",
55
+ " \u255A\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D"
56
+ ];
57
+ var VOLTX_COLORS = [
58
+ { r: 0, g: 180, b: 255 },
59
+ // electric blue
60
+ { r: 120, g: 80, b: 255 },
61
+ // purple
62
+ { r: 255, g: 50, b: 180 },
63
+ // hot pink
64
+ { r: 255, g: 120, b: 50 }
65
+ // orange
66
+ ];
67
+ function dimRule(width = 48) {
68
+ return ` ${rgb(60, 60, 80, "\u2500".repeat(width))}`;
69
+ }
70
+ function printWelcomeBanner(projectName) {
71
+ console.log("");
72
+ console.log(gradientBlock(VOLTX_BANNER, VOLTX_COLORS));
73
+ console.log("");
74
+ console.log(
75
+ ` ${ITALIC}${rgb(180, 180, 220, "The AI-first full-stack framework")}${RESET}`
76
+ );
77
+ console.log("");
78
+ if (projectName) {
79
+ console.log(
80
+ ` ${ITALIC}${rgb(120, 220, 180, `Thank you for choosing VoltX! \u26A1`)}${RESET}`
81
+ );
82
+ console.log(
83
+ ` ${ITALIC}${rgb(160, 160, 200, `Your project "${projectName}" is ready to go.`)}${RESET}`
84
+ );
85
+ console.log("");
86
+ console.log(` ${rgb(100, 180, 255, "Next steps:")}`);
87
+ console.log(` ${rgb(200, 200, 220, ` cd ${projectName}`)}`);
88
+ console.log(` ${rgb(200, 200, 220, " pnpm install")}`);
89
+ console.log(` ${rgb(200, 200, 220, " pnpm dev")}`);
90
+ console.log("");
91
+ console.log(dimRule());
92
+ console.log("");
93
+ console.log(
94
+ ` ${rgb(255, 200, 80, "\u2615")} ${ITALIC}${rgb(200, 180, 140, "Love VoltX? Support us and fuel the next update:")}${RESET}`
95
+ );
96
+ console.log(
97
+ ` ${rgb(255, 180, 100, "https://buymeacoffee.com/promptlyai")}`
98
+ );
99
+ console.log("");
100
+ console.log(dimRule());
101
+ console.log("");
102
+ console.log(
103
+ ` ${ITALIC}${rgb(140, 140, 170, "Docs: https://voltx.co.in \u2022 GitHub: github.com/codewithshail/voltx")}${RESET}`
104
+ );
105
+ console.log(
106
+ ` ${ITALIC}${rgb(100, 100, 130, "Made with \u2665 by the Promptly AI Team")}${RESET}`
107
+ );
108
+ console.log("");
109
+ }
110
+ }
111
+
112
+ export {
113
+ __require,
114
+ printWelcomeBanner
115
+ };