#!/usr/bin/env node
/**
* MCP Index Kit CLI - Node.js wrapper
* Delegates to Python CLI for actual functionality
*/
const { spawn } = require('child_process');
const path = require('path');
// Find the Python CLI script
const cliPath = path.join(__dirname, '..', 'scripts', 'cli.py');
// Pass all arguments to Python CLI
const args = process.argv.slice(2);
const python = spawn('python3', [cliPath, ...args], {
stdio: 'inherit',
env: process.env
});
python.on('error', (err) => {
if (err.code === 'ENOENT') {
console.error('Error: Python 3 is required but not found in PATH');
console.error('Please install Python 3.8 or later');
process.exit(1);
}
console.error('Error:', err.message);
process.exit(1);
});
python.on('close', (code) => {
process.exit(code || 0);
});