Skip to content

Commit 1d73e86

Browse files
added postinstall
1 parent 66d221e commit 1d73e86

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed

cli/bin/postinstall.js

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
1-
console.log(`
2-
[VisionixAI] 🧠 Installation complete!
3-
4-
🚀 To enable ML features, run:
5-
npx visionix setup-ml
6-
7-
🛠 This will install Python dependencies inside a virtual environment.
8-
`);
1+
2+
const { execSync } = require('child_process');
3+
const path = require('path');
4+
5+
console.log('[VisionixAI] 🧠 Installing Python dependencies...');
6+
7+
try {
8+
// Find the path to requirements.txt relative to this script
9+
const reqPath = path.resolve(__dirname, '../ml-core/requirements.txt');
10+
execSync(`pip install -r "${reqPath}"`, { stdio: 'inherit' });
11+
console.log('\n[VisionixAI] Python dependencies installed!');
12+
} catch (err) {
13+
console.error('\n[VisionixAI] Failed to install Python dependencies. Please ensure Python and pip are installed.');
14+
}
15+
16+
console.log(`\n[VisionixAI] Installation complete!\n`);

cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@visionix/cli",
3-
"version": "1.0.5",
3+
"version": "1.0.6",
44
"description": "Zone-based computer vision CLI for smart automation",
55
"main": "bin/visionix.js",
66
"bin": {

0 commit comments

Comments
 (0)