wenox-cli 1.3.1 → 2.0.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/bin/wenox.js CHANGED
@@ -5,6 +5,15 @@ const path = require('path');
5
5
  const fs = require('fs');
6
6
  const os = require('os');
7
7
 
8
+ // WENOX environment path
9
+ const WENOX_ENV_PATH = path.join(os.homedir(), '.wenox', 'env');
10
+ const WENOX_PYTHON = process.platform === 'win32'
11
+ ? path.join(WENOX_ENV_PATH, 'Scripts', 'python.exe')
12
+ : path.join(WENOX_ENV_PATH, 'bin', 'python');
13
+ const WENOX_PIP = process.platform === 'win32'
14
+ ? path.join(WENOX_ENV_PATH, 'Scripts', 'pip.exe')
15
+ : path.join(WENOX_ENV_PATH, 'bin', 'pip');
16
+
8
17
  // Simple console colors
9
18
  const chalk = {
10
19
  cyan: (text) => `\x1b[36m${text}\x1b[0m`,
@@ -95,33 +104,52 @@ function checkPython() {
95
104
  });
96
105
  }
97
106
 
98
- function checkAider() {
99
- return new Promise((resolve) => {
107
+ function checkWenoxEnvironment() {
108
+ return fs.existsSync(WENOX_PYTHON) && fs.existsSync(WENOX_PIP);
109
+ }
110
+
111
+ async function createWenoxEnvironment() {
112
+ console.log(chalk.cyan('🔧 Creating WENOX isolated environment...'));
113
+
114
+ // Create .wenox directory
115
+ const wenoxDir = path.join(os.homedir(), '.wenox');
116
+ if (!fs.existsSync(wenoxDir)) {
117
+ fs.mkdirSync(wenoxDir, { recursive: true });
118
+ }
119
+
120
+ return new Promise((resolve, reject) => {
100
121
  const python = process.platform === 'win32' ? 'python' : 'python3';
101
- const child = spawn(python, ['-c', 'import aider'], { stdio: 'pipe' });
102
122
 
103
- child.on('close', (code) => {
104
- resolve(code === 0);
123
+ // Create virtual environment
124
+ const venvChild = spawn(python, ['-m', 'venv', WENOX_ENV_PATH], {
125
+ stdio: 'inherit',
126
+ shell: true
105
127
  });
106
128
 
107
- child.on('error', () => {
108
- resolve(false);
129
+ venvChild.on('close', (code) => {
130
+ if (code === 0) {
131
+ console.log(chalk.green('✅ WENOX environment created successfully!'));
132
+ resolve();
133
+ } else {
134
+ reject(new Error('Failed to create WENOX environment'));
135
+ }
136
+ });
137
+
138
+ venvChild.on('error', (err) => {
139
+ reject(err);
109
140
  });
110
141
  });
111
142
  }
112
143
 
113
- async function installAider() {
114
- console.log(chalk.cyan('đŸ“Ļ Installing WENOX Enterprise Environment...'));
115
- console.log(chalk.yellow('🔧 Installing packages compatible with Python 3.14'));
116
-
117
- const python = process.platform === 'win32' ? 'python' : 'python3';
118
- const pip = process.platform === 'win32' ? 'pip' : 'pip3';
144
+ async function installWenoxPackages() {
145
+ console.log(chalk.cyan('đŸ“Ļ Installing WENOX packages in isolated environment...'));
146
+ console.log(chalk.yellow('🔧 This ensures no conflicts with your system Python'));
119
147
 
120
148
  return new Promise((resolve, reject) => {
121
- // First, upgrade pip and setuptools for Python 3.14 compatibility
122
- console.log(chalk.cyan('🔧 Upgrading pip and setuptools for Python 3.14...'));
149
+ // First upgrade pip in the virtual environment
150
+ console.log(chalk.cyan('🔧 Upgrading pip in WENOX environment...'));
123
151
 
124
- const upgradeChild = spawn(pip, [
152
+ const upgradeChild = spawn(WENOX_PIP, [
125
153
  'install',
126
154
  '--upgrade',
127
155
  'pip',
@@ -137,16 +165,15 @@ async function installAider() {
137
165
  console.log(chalk.yellow('âš ī¸ Pip upgrade failed, continuing anyway...'));
138
166
  }
139
167
 
140
- // Install from our requirements file compatible with Python 3.14
141
- console.log(chalk.cyan('📋 Installing WENOX packages (Python 3.14 compatible)...'));
168
+ // Install exact working packages from requirements
169
+ console.log(chalk.cyan('📋 Installing WENOX packages (exact working versions)...'));
142
170
 
143
171
  const requirementsPath = path.join(__dirname, '..', 'requirements-wenox.txt');
144
172
 
145
- const child = spawn(pip, [
173
+ const child = spawn(WENOX_PIP, [
146
174
  'install',
147
175
  '-r',
148
176
  requirementsPath,
149
- '--upgrade',
150
177
  '--force-reinstall'
151
178
  ], {
152
179
  stdio: 'inherit',
@@ -155,20 +182,20 @@ async function installAider() {
155
182
 
156
183
  child.on('close', (code) => {
157
184
  if (code === 0) {
158
- console.log(chalk.green('✅ WENOX Enterprise Environment installed successfully!'));
159
- console.log(chalk.cyan('đŸŽ¯ All packages compatible with Python 3.14'));
185
+ console.log(chalk.green('✅ WENOX packages installed successfully!'));
186
+ console.log(chalk.cyan('đŸŽ¯ All packages are isolated and working perfectly'));
160
187
  resolve();
161
188
  } else {
162
189
  console.log(chalk.yellow('âš ī¸ Some packages failed, trying core installation...'));
163
190
 
164
- // Fallback: install core packages only (avoid problematic dependencies)
165
- const fallbackChild = spawn(pip, [
191
+ // Fallback: install core packages only
192
+ const fallbackChild = spawn(WENOX_PIP, [
166
193
  'install',
167
194
  'aider-chat==0.16.0',
168
- 'openai==1.109.1',
195
+ 'openai==0.27.6',
169
196
  'anthropic==0.76.0',
170
- 'pydantic>=2.0.0',
171
- '--upgrade'
197
+ 'litellm==0.14.1',
198
+ '--force-reinstall'
172
199
  ], {
173
200
  stdio: 'inherit',
174
201
  shell: true
@@ -178,13 +205,13 @@ async function installAider() {
178
205
  if (fallbackCode === 0) {
179
206
  console.log(chalk.green('✅ WENOX core packages installed successfully!'));
180
207
  console.log(chalk.cyan('đŸŽ¯ Ready to use WENOX CLI'));
181
- console.log(chalk.yellow('â„šī¸ Note: Replicate and Cohere providers excluded for Python 3.14 compatibility'));
208
+ console.log(chalk.yellow('â„šī¸ Note: Using minimal installation due to package compatibility'));
182
209
  resolve();
183
210
  } else {
184
211
  console.log(chalk.red('❌ Installation failed. Trying minimal installation...'));
185
212
 
186
213
  // Last resort: just aider-chat
187
- const minimalChild = spawn(pip, [
214
+ const minimalChild = spawn(WENOX_PIP, [
188
215
  'install',
189
216
  'aider-chat==0.16.0',
190
217
  '--upgrade'
@@ -222,7 +249,6 @@ async function installAider() {
222
249
 
223
250
  upgradeChild.on('error', (err) => {
224
251
  console.log(chalk.yellow('âš ī¸ Pip upgrade failed, continuing with installation...'));
225
- // Continue with main installation even if upgrade fails
226
252
  });
227
253
  });
228
254
  }
@@ -235,10 +261,10 @@ function checkApiKey() {
235
261
  console.log('\nTo get started with WENOX:');
236
262
  console.log('1. Get your API key from: ' + chalk.blue('https://wenox.ai/dashboard'));
237
263
  console.log('2. Set your API key:');
238
- console.log(' ' + chalk.bold('$env:WENOX_API_KEY="your_api_key_here"'));
239
- console.log(' or');
240
- console.log(' ' + chalk.bold('$env:OPENAI_API_KEY="your_wenox_api_key"'));
264
+ console.log(' ' + chalk.bold('CMD:') + ' set WENOX_API_KEY=your_api_key_here');
265
+ console.log(' ' + chalk.bold('PowerShell:') + ' $env:WENOX_API_KEY="your_api_key_here"');
241
266
  console.log('\n3. Run ' + chalk.cyan('wenox') + ' again');
267
+ console.log('\n' + chalk.yellow('💡 Tip: If "wenox" command not found, try: npx wenox'));
242
268
  process.exit(1);
243
269
  }
244
270
 
@@ -260,8 +286,6 @@ function setupWenoxDefaults() {
260
286
  }
261
287
 
262
288
  async function runAider() {
263
- const python = process.platform === 'win32' ? 'python' : 'python3';
264
-
265
289
  // Default arguments for WENOX
266
290
  const defaultArgs = [
267
291
  '-m', 'aider.main',
@@ -278,7 +302,7 @@ async function runAider() {
278
302
 
279
303
  console.log(chalk.green('✅ Starting WENOX Claude API Platform...\n'));
280
304
 
281
- const child = spawn(python, args, {
305
+ const child = spawn(WENOX_PYTHON, args, {
282
306
  stdio: 'inherit',
283
307
  shell: true
284
308
  });
@@ -352,15 +376,19 @@ ${chalk.bold('System Requirements:')}
352
376
  process.exit(1);
353
377
  }
354
378
 
355
- // Check and install aider if needed
356
- const hasAider = await checkAider();
357
- if (!hasAider) {
379
+ // Check if WENOX environment exists
380
+ const hasWenoxEnv = checkWenoxEnvironment();
381
+ if (!hasWenoxEnv) {
382
+ console.log(chalk.cyan('🔧 First time setup - creating WENOX environment...'));
358
383
  try {
359
- await installAider();
384
+ await createWenoxEnvironment();
385
+ await installWenoxPackages();
360
386
  } catch (err) {
361
- console.error(chalk.red('❌ Failed to install dependencies:'), err.message);
387
+ console.error(chalk.red('❌ Failed to setup WENOX environment:'), err.message);
362
388
  process.exit(1);
363
389
  }
390
+ } else {
391
+ console.log(chalk.green('✅ WENOX environment ready'));
364
392
  }
365
393
 
366
394
  // Setup WENOX defaults
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wenox-cli",
3
- "version": "1.3.1",
3
+ "version": "2.0.0",
4
4
  "description": "WENOX AI - Advanced AI-powered development assistant",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -1,15 +1,15 @@
1
- # WENOX Enterprise Environment - Working Configuration for Python 3.14
1
+ # WENOX Enterprise Environment - Working Configuration
2
2
  # Core WENOX dependencies
3
3
  aider-chat==0.16.0
4
- openai==2.16.0
4
+ openai==0.27.6
5
5
  anthropic==0.76.0
6
- litellm==1.81.5
6
+ litellm==0.14.1
7
7
 
8
- # Essential dependencies - compatible versions
8
+ # Essential dependencies - exact working versions
9
9
  aiohttp==3.13.3
10
10
  aiosignal==1.4.0
11
11
  attrs==25.4.0
12
- certifi==2023.11.17
12
+ certifi==2026.1.4
13
13
  charset-normalizer==3.4.4
14
14
  diskcache==5.6.3
15
15
  frozenlist==1.8.0
@@ -43,7 +43,7 @@ PyYAML==6.0.3
43
43
  tree-sitter==0.25.2
44
44
  tree-sitter-language-pack==0.13.0
45
45
 
46
- # Python 3.14 compatible versions
46
+ # Python compatibility packages
47
47
  pydantic==2.12.5
48
48
  pydantic_core==2.41.5
49
49
  typing_extensions==4.15.0
@@ -55,12 +55,27 @@ httpx==0.28.1
55
55
  distro==1.9.0
56
56
  fastuuid==0.14.0
57
57
  jinja2==3.1.6
58
- jsonschema-specifications==2025.9.1
59
- referencing==0.37.0
60
- rpds-py==0.30.0
61
- annotated-types==0.7.0
62
- typing-inspection==0.4.2
58
+ MarkupSafe==3.0.3
59
+ importlib-metadata==8.7.1
60
+ zipp==3.23.0
61
+ appdirs==1.4.4
62
+ click==8.3.1
63
+ colorama==0.4.6
64
+ python-dotenv==1.2.1
65
+ regex==2026.1.15
63
66
  h11==0.16.0
64
67
  jiter==0.12.0
68
+ annotated-types==0.7.0
69
+ typing-inspection==0.4.2
70
+ huggingface-hub==1.3.5
71
+ tokenizers==0.22.2
72
+ filelock==3.20.3
73
+ fsspec==2026.1.0
74
+ hf-xet==1.2.0
75
+ shellingham==1.5.4
76
+ typer-slim==0.21.1
77
+ propcache==0.4.1
78
+ aiohappyeyeballs==2.6.1
65
79
 
66
- # Note: replicate and cohere excluded due to Pydantic v1 compatibility issues
80
+ # Note: This configuration works with Python 3.14
81
+ # Some packages may show dependency warnings but WENOX will function correctly