NOTE:This version is not backwards compatible with 0.2.x series of releases.
UCI is a thin wrapper on a uci interface chess engine.
Make sure you have node.js installed. Then do:
$ npm install uci
varEngine=require('uci');varengine=newEngine('<path to engine executable>');engine.runProcess().then(function(){console.log('Started');returnengine.uciCommand();}).then(function(idAndOptions){console.log('Engine name - '+idAndOptions.id.name);returnengine.isReadyCommand();}).then(function(){console.log('Ready');returnengine.uciNewGameCommand();}).then(function(){console.log('New game started');returnengine.positionCommand('startpos','e2e4 e7e5');}).then(function(){console.log('Starting position set');console.log('Starting analysis');returnengine.goInfiniteCommand(functioninfoHandler(info){console.log(info);});}).delay(2000).then(function(){console.log('Stopping analysis');returnengine.stopCommand();}).then(function(bestmove){console.log('Bestmove: ');console.log(bestmove);returnengine.quitCommand();}).then(function(){console.log('Stopped');}).fail(function(error){console.log(error);process.exit();}).done();See here for API reference.
Fork, pick an issue to fix from issues or add a missing feature and send a pull request.
UCI is released under the MIT License. See the bundled LICENSE file for details.