wenox-cli 2.2.0 → 3.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/README.md +65 -58
- package/bin/wenox.js +69 -225
- package/package.json +3 -11
- package/requirements-wenox.txt +0 -33
- package/scripts/install-python-deps.js +0 -48
package/README.md
CHANGED
|
@@ -1,101 +1,108 @@
|
|
|
1
1
|
# WENOX CLI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Claude API • Enterprise AI Platform**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Modern AI-powered development assistant that works seamlessly with your existing Python environment.
|
|
6
|
+
|
|
7
|
+
## Quick Start
|
|
6
8
|
|
|
7
9
|
```bash
|
|
10
|
+
# Install WENOX CLI
|
|
8
11
|
npm install -g wenox-cli
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## Setup & Usage
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
# Set your API key
|
|
14
|
+
set WENOX_API_KEY=your_api_key_here
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
# Start coding with AI
|
|
17
|
+
wenox
|
|
18
|
+
```
|
|
16
19
|
|
|
17
|
-
|
|
18
|
-
```cmd
|
|
19
|
-
set WENOX_API_KEY=your_api_key_here
|
|
20
|
-
```
|
|
20
|
+
## Features
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
- 🚀 **Zero Configuration** - Works with your existing Python setup
|
|
23
|
+
- 🔧 **Auto-Installation** - Installs dependencies automatically when needed
|
|
24
|
+
- 🎯 **Enterprise Ready** - Professional Claude API integration
|
|
25
|
+
- 💻 **Cross-Platform** - Windows, macOS, Linux support
|
|
26
|
+
- 🛡️ **Secure** - Uses user-level Python packages, no system conflicts
|
|
26
27
|
|
|
27
|
-
|
|
28
|
-
```bash
|
|
29
|
-
export WENOX_API_KEY="your_api_key_here"
|
|
30
|
-
```
|
|
28
|
+
## Installation
|
|
31
29
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
### Method 1: NPM (Recommended)
|
|
31
|
+
```bash
|
|
32
|
+
npm install -g wenox-cli
|
|
33
|
+
```
|
|
36
34
|
|
|
37
|
-
|
|
35
|
+
### Method 2: NPX (No Installation)
|
|
36
|
+
```bash
|
|
37
|
+
npx wenox-cli
|
|
38
|
+
```
|
|
38
39
|
|
|
39
|
-
|
|
40
|
-
If you get `'wenox' is not recognized` error:
|
|
40
|
+
## Setup
|
|
41
41
|
|
|
42
|
-
1. **
|
|
43
|
-
```bash
|
|
44
|
-
npx wenox
|
|
45
|
-
```
|
|
42
|
+
1. **Get API Key**: Visit [wenox.ai/dashboard](https://wenox.ai/dashboard)
|
|
46
43
|
|
|
47
|
-
2. **
|
|
44
|
+
2. **Set Environment Variable**:
|
|
45
|
+
- **CMD**: `set WENOX_API_KEY=your_key_here`
|
|
46
|
+
- **PowerShell**: `$env:WENOX_API_KEY="your_key_here"`
|
|
48
47
|
|
|
49
|
-
3. **
|
|
50
|
-
```bash
|
|
51
|
-
npm config get prefix
|
|
52
|
-
```
|
|
48
|
+
3. **Run WENOX**: `wenox`
|
|
53
49
|
|
|
54
|
-
|
|
55
|
-
```bash
|
|
56
|
-
npm install -g wenox-cli
|
|
57
|
-
```
|
|
50
|
+
## System Requirements
|
|
58
51
|
|
|
59
|
-
|
|
52
|
+
- **Python 3.10+** (any version)
|
|
53
|
+
- **Node.js 16+** (for NPM installation)
|
|
60
54
|
|
|
61
|
-
|
|
62
|
-
- 💻 **Terminal Native** - Works in your existing workflow
|
|
63
|
-
- 🔄 **Real-time Collaboration** - AI pair programming
|
|
64
|
-
- 📁 **Project Aware** - Understands your entire codebase
|
|
65
|
-
- ⚡ **Lightning Fast** - Optimized for productivity
|
|
55
|
+
WENOX automatically installs Python dependencies using `pip install --user` to avoid system conflicts.
|
|
66
56
|
|
|
67
|
-
## Usage
|
|
57
|
+
## Usage
|
|
68
58
|
|
|
69
59
|
```bash
|
|
70
60
|
# Start WENOX in current directory
|
|
71
61
|
wenox
|
|
72
62
|
|
|
73
63
|
# Work with specific files
|
|
74
|
-
wenox
|
|
64
|
+
wenox file1.py file2.js
|
|
75
65
|
|
|
76
|
-
# Use different model
|
|
66
|
+
# Use different AI model
|
|
77
67
|
wenox --model gpt-4
|
|
78
68
|
|
|
79
69
|
# Get help
|
|
80
70
|
wenox --help
|
|
81
71
|
```
|
|
82
72
|
|
|
83
|
-
##
|
|
73
|
+
## Troubleshooting
|
|
74
|
+
|
|
75
|
+
### "wenox command not found"
|
|
76
|
+
- Try: `npx wenox-cli`
|
|
77
|
+
- Or restart your terminal after installation
|
|
78
|
+
- Check NPM path: `npm config get prefix`
|
|
79
|
+
|
|
80
|
+
### Python Dependencies
|
|
81
|
+
WENOX automatically installs required packages. If issues occur:
|
|
82
|
+
```bash
|
|
83
|
+
pip install --upgrade pip setuptools
|
|
84
|
+
pip install aider-chat
|
|
85
|
+
```
|
|
84
86
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
+
### API Key Issues
|
|
88
|
+
Make sure your API key is set correctly:
|
|
89
|
+
- CMD: `echo %WENOX_API_KEY%`
|
|
90
|
+
- PowerShell: `echo $env:WENOX_API_KEY`
|
|
87
91
|
|
|
88
|
-
##
|
|
92
|
+
## What's New in v3.0
|
|
89
93
|
|
|
90
|
-
-
|
|
91
|
-
-
|
|
94
|
+
- ✅ **Simplified Installation** - No more complex virtual environments
|
|
95
|
+
- ✅ **Better Compatibility** - Works with all Python versions 3.10+
|
|
96
|
+
- ✅ **Faster Startup** - Reduced dependency conflicts
|
|
97
|
+
- ✅ **Auto-Recovery** - Handles installation failures gracefully
|
|
98
|
+
- ✅ **Zero Dependencies** - NPM package has no Node.js dependencies
|
|
92
99
|
|
|
93
100
|
## Support
|
|
94
101
|
|
|
95
|
-
-
|
|
96
|
-
-
|
|
97
|
-
-
|
|
102
|
+
- 📧 Email: support@wenox.ai
|
|
103
|
+
- 🌐 Website: [wenox.ai](https://wenox.ai)
|
|
104
|
+
- 📚 Documentation: [docs.wenox.ai](https://docs.wenox.ai)
|
|
98
105
|
|
|
99
106
|
---
|
|
100
107
|
|
|
101
|
-
**WENOX** - AI
|
|
108
|
+
**WENOX CLI v3.0** - Modern AI development made simple.
|
package/bin/wenox.js
CHANGED
|
@@ -5,15 +5,6 @@ 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
|
-
|
|
17
8
|
// Simple console colors
|
|
18
9
|
const chalk = {
|
|
19
10
|
cyan: (text) => `\x1b[36m${text}\x1b[0m`,
|
|
@@ -24,21 +15,6 @@ const chalk = {
|
|
|
24
15
|
bold: (text) => `\x1b[1m${text}\x1b[0m`
|
|
25
16
|
};
|
|
26
17
|
|
|
27
|
-
// Simple boxen replacement
|
|
28
|
-
function boxen(content, options = {}) {
|
|
29
|
-
const lines = content.split('\n');
|
|
30
|
-
const maxLength = Math.max(...lines.map(line => line.length));
|
|
31
|
-
const border = '─'.repeat(maxLength + 2);
|
|
32
|
-
|
|
33
|
-
let result = `┌${border}┐\n`;
|
|
34
|
-
lines.forEach(line => {
|
|
35
|
-
result += `│ ${line.padEnd(maxLength)} │\n`;
|
|
36
|
-
});
|
|
37
|
-
result += `└${border}┘`;
|
|
38
|
-
|
|
39
|
-
return result;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
18
|
// WENOX Banner
|
|
43
19
|
const banner = chalk.cyan(`
|
|
44
20
|
██╗ ██╗███████╗███╗ ██╗ ██████╗ ██╗ ██╗
|
|
@@ -52,182 +28,7 @@ const banner = chalk.cyan(`
|
|
|
52
28
|
`);
|
|
53
29
|
|
|
54
30
|
function showWelcome() {
|
|
55
|
-
console.log(
|
|
56
|
-
padding: 1,
|
|
57
|
-
margin: 1,
|
|
58
|
-
borderStyle: 'round',
|
|
59
|
-
borderColor: 'cyan'
|
|
60
|
-
}));
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
function checkPython() {
|
|
64
|
-
return new Promise((resolve) => {
|
|
65
|
-
const python = process.platform === 'win32' ? 'python' : 'python3';
|
|
66
|
-
const child = spawn(python, ['--version'], { stdio: 'pipe' });
|
|
67
|
-
|
|
68
|
-
let versionOutput = '';
|
|
69
|
-
child.stdout.on('data', (data) => {
|
|
70
|
-
versionOutput += data.toString();
|
|
71
|
-
});
|
|
72
|
-
|
|
73
|
-
child.on('close', (code) => {
|
|
74
|
-
if (code === 0) {
|
|
75
|
-
// Extract version number
|
|
76
|
-
const versionMatch = versionOutput.match(/Python (\d+)\.(\d+)\.(\d+)/);
|
|
77
|
-
if (versionMatch) {
|
|
78
|
-
const major = parseInt(versionMatch[1]);
|
|
79
|
-
const minor = parseInt(versionMatch[2]);
|
|
80
|
-
|
|
81
|
-
console.log(chalk.cyan(`🐍 Python ${major}.${minor} detected`));
|
|
82
|
-
|
|
83
|
-
if (major === 3 && minor >= 14) {
|
|
84
|
-
console.log(chalk.green('✅ Python 3.14+ detected - using latest compatible packages'));
|
|
85
|
-
} else if (major === 3 && minor === 12) {
|
|
86
|
-
console.log(chalk.green('✅ Python 3.12 detected - excellent compatibility'));
|
|
87
|
-
} else if (major === 3 && minor >= 10) {
|
|
88
|
-
console.log(chalk.green('✅ Python 3.10-3.13 detected - good compatibility'));
|
|
89
|
-
} else {
|
|
90
|
-
console.log(chalk.red('❌ Python 3.10+ is required for WENOX'));
|
|
91
|
-
resolve(false);
|
|
92
|
-
return;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
resolve(true);
|
|
96
|
-
} else {
|
|
97
|
-
resolve(false);
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
|
|
101
|
-
child.on('error', () => {
|
|
102
|
-
resolve(false);
|
|
103
|
-
});
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
|
|
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) => {
|
|
121
|
-
const python = process.platform === 'win32' ? 'python' : 'python3';
|
|
122
|
-
|
|
123
|
-
// Create virtual environment
|
|
124
|
-
const venvChild = spawn(python, ['-m', 'venv', WENOX_ENV_PATH], {
|
|
125
|
-
stdio: 'inherit',
|
|
126
|
-
shell: true
|
|
127
|
-
});
|
|
128
|
-
|
|
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);
|
|
140
|
-
});
|
|
141
|
-
});
|
|
142
|
-
}
|
|
143
|
-
|
|
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'));
|
|
147
|
-
|
|
148
|
-
return new Promise((resolve, reject) => {
|
|
149
|
-
// First upgrade pip in the virtual environment
|
|
150
|
-
console.log(chalk.cyan('🔧 Upgrading pip in WENOX environment...'));
|
|
151
|
-
|
|
152
|
-
const upgradeChild = spawn(WENOX_PIP, [
|
|
153
|
-
'install',
|
|
154
|
-
'--upgrade',
|
|
155
|
-
'pip>=25.0',
|
|
156
|
-
'setuptools>=70.0',
|
|
157
|
-
'wheel'
|
|
158
|
-
], {
|
|
159
|
-
stdio: 'inherit',
|
|
160
|
-
shell: true
|
|
161
|
-
});
|
|
162
|
-
|
|
163
|
-
upgradeChild.on('close', (upgradeCode) => {
|
|
164
|
-
if (upgradeCode !== 0) {
|
|
165
|
-
console.log(chalk.yellow('⚠️ Pip upgrade failed, continuing anyway...'));
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
// Install core packages first without dependencies
|
|
169
|
-
console.log(chalk.cyan('📋 Installing core WENOX packages...'));
|
|
170
|
-
|
|
171
|
-
const coreChild = spawn(WENOX_PIP, [
|
|
172
|
-
'install',
|
|
173
|
-
'aider-chat==0.16.0',
|
|
174
|
-
'openai==0.27.6',
|
|
175
|
-
'anthropic==0.76.0',
|
|
176
|
-
'--no-deps'
|
|
177
|
-
], {
|
|
178
|
-
stdio: 'inherit',
|
|
179
|
-
shell: true
|
|
180
|
-
});
|
|
181
|
-
|
|
182
|
-
coreChild.on('close', (code) => {
|
|
183
|
-
if (code === 0) {
|
|
184
|
-
console.log(chalk.green('✅ Core packages installed!'));
|
|
185
|
-
|
|
186
|
-
// Now install dependencies from requirements
|
|
187
|
-
console.log(chalk.cyan('📋 Installing additional dependencies...'));
|
|
188
|
-
|
|
189
|
-
const requirementsPath = path.join(__dirname, '..', 'requirements-wenox.txt');
|
|
190
|
-
|
|
191
|
-
const depsChild = spawn(WENOX_PIP, [
|
|
192
|
-
'install',
|
|
193
|
-
'-r',
|
|
194
|
-
requirementsPath
|
|
195
|
-
], {
|
|
196
|
-
stdio: 'inherit',
|
|
197
|
-
shell: true
|
|
198
|
-
});
|
|
199
|
-
|
|
200
|
-
depsChild.on('close', (depsCode) => {
|
|
201
|
-
if (depsCode === 0) {
|
|
202
|
-
console.log(chalk.green('✅ WENOX packages installed successfully!'));
|
|
203
|
-
console.log(chalk.cyan('🎯 All packages are isolated and working perfectly'));
|
|
204
|
-
resolve();
|
|
205
|
-
} else {
|
|
206
|
-
console.log(chalk.yellow('⚠️ Some dependencies failed, but core packages are ready'));
|
|
207
|
-
console.log(chalk.green('✅ WENOX should work with basic functionality'));
|
|
208
|
-
resolve();
|
|
209
|
-
}
|
|
210
|
-
});
|
|
211
|
-
|
|
212
|
-
depsChild.on('error', (err) => {
|
|
213
|
-
console.log(chalk.yellow('⚠️ Dependencies installation failed, but core is ready'));
|
|
214
|
-
resolve();
|
|
215
|
-
});
|
|
216
|
-
} else {
|
|
217
|
-
console.log(chalk.red('❌ Core package installation failed'));
|
|
218
|
-
reject(new Error('Failed to install core WENOX packages'));
|
|
219
|
-
}
|
|
220
|
-
});
|
|
221
|
-
|
|
222
|
-
coreChild.on('error', (err) => {
|
|
223
|
-
reject(err);
|
|
224
|
-
});
|
|
225
|
-
});
|
|
226
|
-
|
|
227
|
-
upgradeChild.on('error', (err) => {
|
|
228
|
-
console.log(chalk.yellow('⚠️ Pip upgrade failed, continuing with installation...'));
|
|
229
|
-
});
|
|
230
|
-
});
|
|
31
|
+
console.log(banner);
|
|
231
32
|
}
|
|
232
33
|
|
|
233
34
|
function checkApiKey() {
|
|
@@ -262,6 +63,66 @@ function setupWenoxDefaults() {
|
|
|
262
63
|
}
|
|
263
64
|
}
|
|
264
65
|
|
|
66
|
+
async function installAiderIfNeeded() {
|
|
67
|
+
return new Promise((resolve) => {
|
|
68
|
+
// Check if aider is already installed
|
|
69
|
+
const python = process.platform === 'win32' ? 'python' : 'python3';
|
|
70
|
+
const checkChild = spawn(python, ['-c', 'import aider; print("OK")'], {
|
|
71
|
+
stdio: 'pipe',
|
|
72
|
+
shell: true
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
let output = '';
|
|
76
|
+
checkChild.stdout.on('data', (data) => {
|
|
77
|
+
output += data.toString();
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
checkChild.on('close', (code) => {
|
|
81
|
+
if (code === 0 && output.includes('OK')) {
|
|
82
|
+
console.log(chalk.green('✅ WENOX dependencies ready'));
|
|
83
|
+
resolve();
|
|
84
|
+
} else {
|
|
85
|
+
console.log(chalk.cyan('📦 Installing WENOX dependencies (one-time setup)...'));
|
|
86
|
+
console.log(chalk.yellow('⏳ This may take 1-2 minutes...'));
|
|
87
|
+
|
|
88
|
+
// Install aider-chat with minimal dependencies
|
|
89
|
+
const installChild = spawn(python, [
|
|
90
|
+
'-m', 'pip', 'install',
|
|
91
|
+
'aider-chat>=0.16.0',
|
|
92
|
+
'--user', // Install to user directory to avoid permission issues
|
|
93
|
+
'--upgrade',
|
|
94
|
+
'--quiet'
|
|
95
|
+
], {
|
|
96
|
+
stdio: 'inherit',
|
|
97
|
+
shell: true
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
installChild.on('close', (installCode) => {
|
|
101
|
+
if (installCode === 0) {
|
|
102
|
+
console.log(chalk.green('✅ WENOX dependencies installed successfully!'));
|
|
103
|
+
resolve();
|
|
104
|
+
} else {
|
|
105
|
+
console.log(chalk.yellow('⚠️ Installation had issues, but WENOX may still work'));
|
|
106
|
+
console.log(chalk.cyan('💡 If problems persist, try: pip install --upgrade pip setuptools'));
|
|
107
|
+
resolve(); // Continue anyway
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
installChild.on('error', () => {
|
|
112
|
+
console.log(chalk.yellow('⚠️ Auto-installation failed'));
|
|
113
|
+
console.log(chalk.cyan('💡 Please run manually: pip install aider-chat'));
|
|
114
|
+
resolve(); // Continue anyway
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
checkChild.on('error', () => {
|
|
120
|
+
console.log(chalk.yellow('⚠️ Could not check dependencies'));
|
|
121
|
+
resolve(); // Continue anyway
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
|
|
265
126
|
async function runAider() {
|
|
266
127
|
// Default arguments for WENOX
|
|
267
128
|
const defaultArgs = [
|
|
@@ -279,7 +140,8 @@ async function runAider() {
|
|
|
279
140
|
|
|
280
141
|
console.log(chalk.green('✅ Starting WENOX Claude API Platform...\n'));
|
|
281
142
|
|
|
282
|
-
const
|
|
143
|
+
const python = process.platform === 'win32' ? 'python' : 'python3';
|
|
144
|
+
const child = spawn(python, args, {
|
|
283
145
|
stdio: 'inherit',
|
|
284
146
|
shell: true
|
|
285
147
|
});
|
|
@@ -293,6 +155,8 @@ async function runAider() {
|
|
|
293
155
|
|
|
294
156
|
child.on('error', (err) => {
|
|
295
157
|
console.error(chalk.red('❌ Error starting WENOX:'), err.message);
|
|
158
|
+
console.log(chalk.cyan('💡 Make sure Python is installed and in your PATH'));
|
|
159
|
+
console.log(chalk.cyan('💡 Try: pip install aider-chat'));
|
|
296
160
|
process.exit(1);
|
|
297
161
|
});
|
|
298
162
|
}
|
|
@@ -337,7 +201,7 @@ ${chalk.bold('Troubleshooting:')}
|
|
|
337
201
|
• Check PATH: ${chalk.cyan('npm config get prefix')}
|
|
338
202
|
|
|
339
203
|
${chalk.bold('System Requirements:')}
|
|
340
|
-
• Python 3.10+ (
|
|
204
|
+
• Python 3.10+ (automatically installs dependencies)
|
|
341
205
|
• Node.js 16+ for NPM installation
|
|
342
206
|
`);
|
|
343
207
|
return;
|
|
@@ -345,35 +209,15 @@ ${chalk.bold('System Requirements:')}
|
|
|
345
209
|
|
|
346
210
|
showWelcome();
|
|
347
211
|
|
|
348
|
-
// Check Python
|
|
349
|
-
const hasPython = await checkPython();
|
|
350
|
-
if (!hasPython) {
|
|
351
|
-
console.log(chalk.red('❌ Python 3.10+ is required'));
|
|
352
|
-
console.log('Please install Python from: https://python.org');
|
|
353
|
-
process.exit(1);
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
// Check if WENOX environment exists
|
|
357
|
-
const hasWenoxEnv = checkWenoxEnvironment();
|
|
358
|
-
if (!hasWenoxEnv) {
|
|
359
|
-
console.log(chalk.cyan('🔧 First time setup - creating WENOX environment...'));
|
|
360
|
-
try {
|
|
361
|
-
await createWenoxEnvironment();
|
|
362
|
-
await installWenoxPackages();
|
|
363
|
-
} catch (err) {
|
|
364
|
-
console.error(chalk.red('❌ Failed to setup WENOX environment:'), err.message);
|
|
365
|
-
process.exit(1);
|
|
366
|
-
}
|
|
367
|
-
} else {
|
|
368
|
-
console.log(chalk.green('✅ WENOX environment ready'));
|
|
369
|
-
}
|
|
370
|
-
|
|
371
212
|
// Setup WENOX defaults
|
|
372
213
|
setupWenoxDefaults();
|
|
373
214
|
|
|
374
215
|
// Check API key
|
|
375
216
|
checkApiKey();
|
|
376
217
|
|
|
218
|
+
// Install aider if needed (simplified approach)
|
|
219
|
+
await installAiderIfNeeded();
|
|
220
|
+
|
|
377
221
|
// Run aider with WENOX branding
|
|
378
222
|
await runAider();
|
|
379
223
|
}
|
package/package.json
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wenox-cli",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "WENOX AI - Advanced AI-powered development assistant",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"wenox": "bin/wenox.js"
|
|
8
8
|
},
|
|
9
9
|
"scripts": {
|
|
10
|
-
"postinstall": "node scripts/install-python-deps.js",
|
|
11
10
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
12
11
|
},
|
|
13
12
|
"keywords": [
|
|
@@ -25,17 +24,10 @@
|
|
|
25
24
|
"type": "git",
|
|
26
25
|
"url": "git+https://github.com/wenox/wenox-cli.git"
|
|
27
26
|
},
|
|
28
|
-
"dependencies": {
|
|
29
|
-
"inquirer": "^9.2.12",
|
|
30
|
-
"ora": "^7.0.1",
|
|
31
|
-
"boxen": "^7.1.1",
|
|
32
|
-
"node-fetch": "^3.3.2"
|
|
33
|
-
},
|
|
27
|
+
"dependencies": {},
|
|
34
28
|
"files": [
|
|
35
29
|
"bin/",
|
|
36
|
-
"
|
|
37
|
-
"README.md",
|
|
38
|
-
"requirements-wenox.txt"
|
|
30
|
+
"README.md"
|
|
39
31
|
],
|
|
40
32
|
"engines": {
|
|
41
33
|
"node": ">=16.0.0"
|
package/requirements-wenox.txt
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
# WENOX Enterprise Environment - Minimal Working Configuration
|
|
2
|
-
# Core WENOX dependencies only - no version conflicts
|
|
3
|
-
aider-chat==0.16.0
|
|
4
|
-
openai==0.27.6
|
|
5
|
-
anthropic==0.76.0
|
|
6
|
-
|
|
7
|
-
# Essential dependencies - let pip resolve versions automatically
|
|
8
|
-
requests
|
|
9
|
-
tqdm
|
|
10
|
-
colorama
|
|
11
|
-
click
|
|
12
|
-
pydantic
|
|
13
|
-
tiktoken
|
|
14
|
-
PyYAML
|
|
15
|
-
tree-sitter
|
|
16
|
-
diskcache
|
|
17
|
-
GitPython
|
|
18
|
-
rich
|
|
19
|
-
prompt-toolkit
|
|
20
|
-
Pygments
|
|
21
|
-
pathspec
|
|
22
|
-
networkx
|
|
23
|
-
numpy
|
|
24
|
-
scipy
|
|
25
|
-
sounddevice
|
|
26
|
-
soundfile
|
|
27
|
-
grep-ast
|
|
28
|
-
backoff
|
|
29
|
-
ConfigArgParse
|
|
30
|
-
markdown-it-py
|
|
31
|
-
|
|
32
|
-
# Note: Minimal package list to avoid dependency conflicts
|
|
33
|
-
# Additional packages will be installed as dependencies automatically
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
const { spawn } = require('child_process');
|
|
4
|
-
|
|
5
|
-
// Simple console colors without chalk
|
|
6
|
-
const colors = {
|
|
7
|
-
cyan: (text) => `\x1b[36m${text}\x1b[0m`,
|
|
8
|
-
green: (text) => `\x1b[32m${text}\x1b[0m`,
|
|
9
|
-
yellow: (text) => `\x1b[33m${text}\x1b[0m`,
|
|
10
|
-
blue: (text) => `\x1b[34m${text}\x1b[0m`
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
console.log(colors.cyan('🚀 Setting up WENOX CLI...'));
|
|
14
|
-
|
|
15
|
-
function checkPython() {
|
|
16
|
-
return new Promise((resolve) => {
|
|
17
|
-
const python = process.platform === 'win32' ? 'python' : 'python3';
|
|
18
|
-
const child = spawn(python, ['--version'], { stdio: 'pipe' });
|
|
19
|
-
|
|
20
|
-
child.on('close', (code) => {
|
|
21
|
-
resolve(code === 0);
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
child.on('error', () => {
|
|
25
|
-
resolve(false);
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
async function main() {
|
|
31
|
-
const hasPython = await checkPython();
|
|
32
|
-
|
|
33
|
-
if (!hasPython) {
|
|
34
|
-
console.log(colors.yellow('⚠️ Python 3.10+ is required for WENOX CLI'));
|
|
35
|
-
console.log('Please install Python from: https://python.org');
|
|
36
|
-
console.log('After installing Python, run: ' + colors.cyan('npm install -g wenox-cli'));
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
console.log(colors.green('✅ Python detected'));
|
|
41
|
-
console.log(colors.green('✅ WENOX CLI is ready!'));
|
|
42
|
-
console.log('\nNext steps:');
|
|
43
|
-
console.log('1. Get your API key: ' + colors.blue('https://wenox.ai/dashboard'));
|
|
44
|
-
console.log('2. Set environment: ' + colors.yellow('export WENOX_API_KEY=your_key'));
|
|
45
|
-
console.log('3. Run: ' + colors.cyan('wenox'));
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
main();
|