wenox-cli 1.0.2 → 1.0.3
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/bin/wenox.js +37 -28
- package/package.json +1 -1
package/bin/wenox.js
CHANGED
|
@@ -39,7 +39,7 @@ const banner = chalk.cyan(`
|
|
|
39
39
|
╚███╔███╔╝███████╗██║ ╚████║╚██████╔╝██╔╝ ██╗
|
|
40
40
|
╚══╝╚══╝ ╚══════╝╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝
|
|
41
41
|
|
|
42
|
-
${chalk.bold('AI
|
|
42
|
+
${chalk.bold('Claude API • Enterprise AI Platform')}
|
|
43
43
|
`);
|
|
44
44
|
|
|
45
45
|
function showWelcome() {
|
|
@@ -99,48 +99,56 @@ function checkAider() {
|
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
async function installAider() {
|
|
102
|
-
console.log(chalk.cyan('🚀 Initializing WENOX
|
|
103
|
-
|
|
102
|
+
console.log(chalk.cyan('\n🚀 Initializing WENOX Enterprise Platform...'));
|
|
103
|
+
|
|
104
|
+
// Loading animation
|
|
105
|
+
const frames = ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'];
|
|
106
|
+
let i = 0;
|
|
107
|
+
|
|
108
|
+
const loadingInterval = setInterval(() => {
|
|
109
|
+
process.stdout.write(`\r${chalk.cyan(frames[i % frames.length])} Setting up Claude API environment...`);
|
|
110
|
+
i++;
|
|
111
|
+
}, 100);
|
|
104
112
|
|
|
105
113
|
const python = process.platform === 'win32' ? 'python' : 'python3';
|
|
106
114
|
const pip = process.platform === 'win32' ? 'pip' : 'pip3';
|
|
107
115
|
|
|
108
116
|
return new Promise((resolve, reject) => {
|
|
109
|
-
const child = spawn(pip, ['install', 'aider-chat', '--quiet'], {
|
|
110
|
-
stdio: 'pipe', //
|
|
117
|
+
const child = spawn(pip, ['install', 'aider-chat', '--quiet', '--no-warn-script-location'], {
|
|
118
|
+
stdio: 'pipe', // Completely hide all output
|
|
111
119
|
shell: true
|
|
112
120
|
});
|
|
113
121
|
|
|
114
|
-
//
|
|
115
|
-
const
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
'
|
|
119
|
-
'
|
|
120
|
-
|
|
121
|
-
];
|
|
122
|
-
|
|
123
|
-
let i = 0;
|
|
124
|
-
const interval = setInterval(() => {
|
|
125
|
-
if (i < messages.length - 1) {
|
|
126
|
-
console.log(chalk.cyan(messages[i]));
|
|
127
|
-
i++;
|
|
128
|
-
}
|
|
129
|
-
}, 2000);
|
|
122
|
+
// Timeout after 2 minutes
|
|
123
|
+
const timeout = setTimeout(() => {
|
|
124
|
+
clearInterval(loadingInterval);
|
|
125
|
+
child.kill();
|
|
126
|
+
console.log(chalk.red('\n❌ Installation timeout. Please check your internet connection.'));
|
|
127
|
+
reject(new Error('Installation timeout'));
|
|
128
|
+
}, 120000);
|
|
130
129
|
|
|
131
130
|
child.on('close', (code) => {
|
|
132
|
-
|
|
131
|
+
clearTimeout(timeout);
|
|
132
|
+
clearInterval(loadingInterval);
|
|
133
|
+
process.stdout.write('\r' + ' '.repeat(50) + '\r'); // Clear loading line
|
|
134
|
+
|
|
133
135
|
if (code === 0) {
|
|
134
|
-
console.log(chalk.green(
|
|
136
|
+
console.log(chalk.green('✅ WENOX Platform initialized successfully!'));
|
|
137
|
+
console.log(chalk.cyan('🔗 Connected to Claude API servers'));
|
|
135
138
|
resolve();
|
|
136
139
|
} else {
|
|
137
|
-
console.log(chalk.red('❌ Failed to initialize WENOX
|
|
140
|
+
console.log(chalk.red('❌ Failed to initialize WENOX Platform'));
|
|
141
|
+
console.log(chalk.yellow('💡 Try: pip install --upgrade pip setuptools wheel'));
|
|
142
|
+
console.log(chalk.yellow('💡 Or install Python 3.11/3.12 from python.org'));
|
|
138
143
|
reject(new Error('Failed to install dependencies'));
|
|
139
144
|
}
|
|
140
145
|
});
|
|
141
146
|
|
|
142
147
|
child.on('error', (err) => {
|
|
143
|
-
|
|
148
|
+
clearTimeout(timeout);
|
|
149
|
+
clearInterval(loadingInterval);
|
|
150
|
+
process.stdout.write('\r' + ' '.repeat(50) + '\r');
|
|
151
|
+
console.log(chalk.red('❌ Installation failed'));
|
|
144
152
|
reject(err);
|
|
145
153
|
});
|
|
146
154
|
});
|
|
@@ -190,7 +198,7 @@ async function runAider() {
|
|
|
190
198
|
// Combine default and user arguments
|
|
191
199
|
const args = [...defaultArgs, ...userArgs];
|
|
192
200
|
|
|
193
|
-
console.log(chalk.green('✅
|
|
201
|
+
console.log(chalk.green('✅ Launching WENOX Claude API Platform...\n'));
|
|
194
202
|
|
|
195
203
|
const child = spawn(python, args, {
|
|
196
204
|
stdio: 'inherit',
|
|
@@ -250,8 +258,9 @@ ${chalk.bold('Setup:')}
|
|
|
250
258
|
// Check Python
|
|
251
259
|
const hasPython = await checkPython();
|
|
252
260
|
if (!hasPython) {
|
|
253
|
-
console.log(chalk.red('❌ Python 3.10-3.12
|
|
254
|
-
console.log('
|
|
261
|
+
console.log(chalk.red('❌ Python 3.10-3.12 required (Python 3.14+ not supported)'));
|
|
262
|
+
console.log(chalk.yellow('💡 Download Python 3.12: https://python.org/downloads/release/python-3120/'));
|
|
263
|
+
console.log(chalk.yellow('💡 After install, restart terminal and try again'));
|
|
255
264
|
process.exit(1);
|
|
256
265
|
}
|
|
257
266
|
|