zerostart-cli 0.0.44 → 0.0.46
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 +19 -13
- package/out/cli.js +75 -28
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -25,25 +25,30 @@ npm install -g zerostart-cli
|
|
|
25
25
|
|
|
26
26
|
---
|
|
27
27
|
|
|
28
|
+
## ✨ Features
|
|
29
|
+
|
|
30
|
+
- **🆕 AI Architect**: Build custom projects from a single sentence prompt.
|
|
31
|
+
- **🚀 One-Command Setup**: Scaffold, initialize Git, and deploy in seconds.
|
|
32
|
+
- **📦 Pre-built Templates**: React, Next.js, Express, C++, Java, Python, and more.
|
|
33
|
+
- **🐙 GitHub Integration**: Auto-create repositories and push with human-style commits.
|
|
34
|
+
- **🏆 CP Smart Practice**: Choose between an online compiler, local terminal, or both for your competitive programming practice.
|
|
35
|
+
- **🌐 Instant Deployment**: Vercel and Netlify support built-in.
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
28
39
|
## ⚡ Quick Start
|
|
29
40
|
|
|
41
|
+
### 1. The Standard Way
|
|
30
42
|
```bash
|
|
31
43
|
zerostart
|
|
32
44
|
```
|
|
45
|
+
Follow the interactive wizard to set up your project.
|
|
33
46
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
| Step | What Happens |
|
|
41
|
-
| :--- | :--- |
|
|
42
|
-
| 🎯 Pick a category | Web Dev or Competitive Programming |
|
|
43
|
-
| 🔤 Pick a language | React, TypeScript, HTML/CSS, C++, Java, Python |
|
|
44
|
-
| 📝 Name your project | Enter any project name |
|
|
45
|
-
| 🐙 GitHub integration | Optionally create a repo and push with real commits |
|
|
46
|
-
| 🚀 Deploy or run locally | Deploy to Vercel instantly, or get `cd` instructions |
|
|
47
|
+
### 2. The AI Way (New!) ✨
|
|
48
|
+
```bash
|
|
49
|
+
zerostart ai "a simple blog with react and express"
|
|
50
|
+
```
|
|
51
|
+
Tell the AI what you want, and it will architect the entire project for you.
|
|
47
52
|
|
|
48
53
|
---
|
|
49
54
|
|
|
@@ -54,6 +59,7 @@ That's it. Follow the interactive wizard to set up your project, push to GitHub,
|
|
|
54
59
|
| Command | Description |
|
|
55
60
|
| :--- | :--- |
|
|
56
61
|
| `zerostart` | Launch the full interactive wizard |
|
|
62
|
+
| `zerostart ai [prompt]` | **AI Architect**: Build a project from a description |
|
|
57
63
|
| `zerostart init [name]` | Start a new project (with optional name) |
|
|
58
64
|
| `zerostart deploy` | Deploy the current project (Vercel / Netlify) |
|
|
59
65
|
| `zerostart git` | Initialize Git + optionally push to GitHub |
|
package/out/cli.js
CHANGED
|
@@ -144,26 +144,31 @@ async function initializeProject(name, language, type, options) {
|
|
|
144
144
|
console.log(chalk_1.default.gray(' Location: ') + chalk_1.default.cyan(projectPath));
|
|
145
145
|
console.log();
|
|
146
146
|
// ── CP languages: open browser + interactive terminal ─────────────
|
|
147
|
-
if ([types_1.ProjectLanguage.Python, types_1.ProjectLanguage.Java, types_1.ProjectLanguage.CPP].includes(language)) {
|
|
148
|
-
const
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
147
|
+
if (type === types_1.ProjectType.DSAPractice && [types_1.ProjectLanguage.Python, types_1.ProjectLanguage.Java, types_1.ProjectLanguage.CPP].includes(language)) {
|
|
148
|
+
const cpChoice = options.cpInterface || 'both';
|
|
149
|
+
if (cpChoice === 'online' || cpChoice === 'both') {
|
|
150
|
+
const gdbLinks = {
|
|
151
|
+
[types_1.ProjectLanguage.Python]: 'https://www.onlinegdb.com/online_python_compiler',
|
|
152
|
+
[types_1.ProjectLanguage.Java]: 'https://www.onlinegdb.com/online_java_compiler',
|
|
153
|
+
[types_1.ProjectLanguage.CPP]: 'https://www.onlinegdb.com/online_c++_compiler'
|
|
154
|
+
};
|
|
155
|
+
const link = gdbLinks[language];
|
|
156
|
+
console.log(chalk_1.default.bold.yellow(' Practice Online:'));
|
|
157
|
+
console.log(chalk_1.default.gray(' - ') + chalk_1.default.cyan(link));
|
|
158
|
+
console.log(chalk_1.default.gray(' (Opening in your browser...)'));
|
|
159
|
+
openUrl(link);
|
|
160
|
+
}
|
|
161
|
+
if (cpChoice === 'terminal' || cpChoice === 'both') {
|
|
162
|
+
const terminalCmds = {
|
|
163
|
+
[types_1.ProjectLanguage.Python]: 'start cmd /k "python"',
|
|
164
|
+
[types_1.ProjectLanguage.Java]: `start cmd /k "cd /d ${projectPath} && javac src/main/java/com/example/Main.java && java -cp src/main/java com.example.Main"`,
|
|
165
|
+
[types_1.ProjectLanguage.CPP]: `start cmd /k "cd /d ${projectPath} && g++ main.cpp -o main && main"`,
|
|
166
|
+
};
|
|
167
|
+
const termCmd = terminalCmds[language];
|
|
168
|
+
if (termCmd) {
|
|
169
|
+
console.log(chalk_1.default.bold.yellow(' Opening interactive terminal...'));
|
|
170
|
+
(0, child_process_1.exec)(termCmd, { cwd: projectPath });
|
|
171
|
+
}
|
|
167
172
|
}
|
|
168
173
|
}
|
|
169
174
|
console.log(chalk_1.default.bold('\n Get started:'));
|
|
@@ -180,7 +185,7 @@ async function initializeProject(name, language, type, options) {
|
|
|
180
185
|
program
|
|
181
186
|
.name('zerostart')
|
|
182
187
|
.description('Create and deploy a complete project with one command')
|
|
183
|
-
.version('0.0.
|
|
188
|
+
.version('0.0.46');
|
|
184
189
|
// zerostart init [project-name]
|
|
185
190
|
program
|
|
186
191
|
.command('init [project-name]')
|
|
@@ -518,7 +523,7 @@ program
|
|
|
518
523
|
return;
|
|
519
524
|
}
|
|
520
525
|
const latestVersion = stdout.trim();
|
|
521
|
-
const currentVersion = '0.0.
|
|
526
|
+
const currentVersion = '0.0.46';
|
|
522
527
|
if (latestVersion === currentVersion) {
|
|
523
528
|
spinner.succeed(chalk_1.default.green('You are using the latest version!'));
|
|
524
529
|
}
|
|
@@ -593,9 +598,30 @@ const shortcuts = [
|
|
|
593
598
|
{ cmd: 'ml-cpp', lang: types_1.ProjectLanguage.CPP, type: types_1.ProjectType.MLProject },
|
|
594
599
|
];
|
|
595
600
|
shortcuts.forEach(s => {
|
|
596
|
-
program.command(s.cmd).argument('[name]', 'Project name', `my-${s.cmd}`).action(n => {
|
|
601
|
+
program.command(s.cmd).argument('[name]', 'Project name', `my-${s.cmd}`).action(async (n) => {
|
|
597
602
|
showBanner();
|
|
598
|
-
|
|
603
|
+
let cpInterface = 'both';
|
|
604
|
+
if (s.type === types_1.ProjectType.DSAPractice) {
|
|
605
|
+
const ans = await inquirer_1.default.prompt([{
|
|
606
|
+
type: 'list',
|
|
607
|
+
name: 'cpInterface',
|
|
608
|
+
message: 'Choose Practice Interface:',
|
|
609
|
+
choices: [
|
|
610
|
+
{ name: '🌐 Online Compiler (browser)', value: 'online' },
|
|
611
|
+
{ name: '💻 Local Terminal (cmd)', value: 'terminal' },
|
|
612
|
+
{ name: '🔥 Both', value: 'both' }
|
|
613
|
+
],
|
|
614
|
+
default: 'both'
|
|
615
|
+
}]);
|
|
616
|
+
cpInterface = ans.cpInterface;
|
|
617
|
+
}
|
|
618
|
+
await initializeProject(n, s.lang, s.type, {
|
|
619
|
+
isPublic: false,
|
|
620
|
+
createRemote: false,
|
|
621
|
+
githubToken: null,
|
|
622
|
+
authMethod: 'none',
|
|
623
|
+
cpInterface
|
|
624
|
+
});
|
|
599
625
|
});
|
|
600
626
|
});
|
|
601
627
|
async function startWizard(initialName) {
|
|
@@ -613,6 +639,7 @@ async function startWizard(initialName) {
|
|
|
613
639
|
let language;
|
|
614
640
|
let github = false;
|
|
615
641
|
let githubToken = null;
|
|
642
|
+
let cpInterface = 'both';
|
|
616
643
|
const BACK = '< Back';
|
|
617
644
|
const CAT_WEB = '🌐 Web Development (React, TS, HTML/CSS)';
|
|
618
645
|
const CAT_CP = '🏆 Competitive Programming (C++, Java, Python)';
|
|
@@ -696,9 +723,28 @@ async function startWizard(initialName) {
|
|
|
696
723
|
}
|
|
697
724
|
}
|
|
698
725
|
else {
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
726
|
+
const ans = await inquirer_1.default.prompt([{
|
|
727
|
+
type: 'list',
|
|
728
|
+
name: 'cpInterface',
|
|
729
|
+
message: 'Choose Practice Interface:',
|
|
730
|
+
choices: [
|
|
731
|
+
{ name: '🌐 Online Compiler (browser)', value: 'online' },
|
|
732
|
+
{ name: '💻 Local Terminal (cmd)', value: 'terminal' },
|
|
733
|
+
{ name: '🔥 Both', value: 'both' },
|
|
734
|
+
new inquirer_1.default.Separator(),
|
|
735
|
+
{ name: BACK, value: 'back' }
|
|
736
|
+
],
|
|
737
|
+
default: 'both'
|
|
738
|
+
}]);
|
|
739
|
+
if (ans.cpInterface === 'back') {
|
|
740
|
+
name = undefined;
|
|
741
|
+
step--;
|
|
742
|
+
}
|
|
743
|
+
else {
|
|
744
|
+
cpInterface = ans.cpInterface;
|
|
745
|
+
github = false;
|
|
746
|
+
step = 7; // CP projects skip to execution
|
|
747
|
+
}
|
|
702
748
|
}
|
|
703
749
|
// ── STEP 5: GitHub Token ────────────────────────────────────────────
|
|
704
750
|
}
|
|
@@ -778,7 +824,8 @@ async function startWizard(initialName) {
|
|
|
778
824
|
isPublic: false,
|
|
779
825
|
createRemote: !!githubToken,
|
|
780
826
|
githubToken,
|
|
781
|
-
authMethod: 'none'
|
|
827
|
+
authMethod: 'none',
|
|
828
|
+
cpInterface: cpInterface
|
|
782
829
|
});
|
|
783
830
|
// ── Post-creation: Web Dev deploy / local run ─────────────────────
|
|
784
831
|
const deployChoice = startWizard._deployChoice;
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"zerostart": "./out/cli.js"
|
|
6
6
|
},
|
|
7
7
|
"description": "Create and deploy a complete project with one command.",
|
|
8
|
-
"version": "0.0.
|
|
8
|
+
"version": "0.0.46",
|
|
9
9
|
"engines": {
|
|
10
10
|
"vscode": "^1.85.0"
|
|
11
11
|
},
|
|
@@ -49,4 +49,4 @@
|
|
|
49
49
|
"openai": "^6.25.0",
|
|
50
50
|
"ora": "^5.4.1"
|
|
51
51
|
}
|
|
52
|
-
}
|
|
52
|
+
}
|