# uci

> A thin wrapper on a UCI chess engine

Latest version **0.3.4** (published 2018-03-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install uci
pnpm add uci
yarn add uci
bun add uci
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.4 |
| Published | 2018-03-05 |
| First published | 2013-07-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10 |
| Dependencies | 3 |
| Unpacked size | 198.7 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 33 |
| Author | Raminder Singh |
| Maintainers | imor |
| Keywords | chess, uci |

## Links

- npm: https://www.npmjs.com/package/uci
- Repository: https://github.com/imor/uci
- Homepage: http://imor.github.io/uci/docs/src/main.html
- Issues: https://github.com/imor/uci/issues
- npm.io page: https://npm.io/package/uci

## Dependencies (3)

- [q](https://npm.io/package/q.md) 0.9.x
- [string](https://npm.io/package/string.md) 1.7.x
- [is-running](https://npm.io/package/is-running.md) 1.0.x

## Alternatives

- [@fortawesome/react-fontawesome](https://npm.io/package/@fortawesome/react-fontawesome.md) — 2.2M weekly downloads
- [roboto-fontface](https://npm.io/package/roboto-fontface.md) — 196.0K weekly downloads
- [@react-native-vector-icons/common](https://npm.io/package/@react-native-vector-icons/common.md) — 150.4K weekly downloads
- [@procore/core-icons](https://npm.io/package/@procore/core-icons.md) — 4.6K weekly downloads
- [@react-md/material-icons](https://npm.io/package/@react-md/material-icons.md) — 1.6K weekly downloads

## Recent versions

- 0.3.4 (latest) — 2018-03-05
- 0.3.3 — 2014-09-23
- 0.3.2 — 2014-06-06
- 0.3.1 — 2014-06-06
- 0.3.0 — 2014-06-06
- 0.2.16 — 2014-01-07
- 0.2.15 — 2014-01-06
- 0.2.14 — 2014-01-03
- 0.2.13 — 2014-01-03
- 0.2.12 — 2014-01-02
- 0.2.11 — 2013-12-30
- 0.2.10 — 2013-12-30
- 0.2.9 — 2013-12-30
- 0.2.8 — 2013-12-30
- 0.2.7 — 2013-12-30
- … 25 more at https://npm.io/package/uci/versions

## README

UCI
===

NOTE:This version is not backwards compatible with 0.2.x series of releases.

UCI is a thin wrapper on a [uci
interface](http://en.wikipedia.org/wiki/Universal_Chess_Interface) chess engine.


## Installation
Make sure you have [node.js](http://nodejs.org/) installed. Then do:

    $ npm install uci

## Example
```js
var Engine = require('uci');
var engine = new Engine('<path to engine executable>');
engine.runProcess().then(function () {
    console.log('Started');
    return engine.uciCommand();
}).then(function (idAndOptions) {
    console.log('Engine name - ' + idAndOptions.id.name);
    return engine.isReadyCommand();
}).then(function () {
    console.log('Ready');
    return engine.uciNewGameCommand();
}).then(function () {
    console.log('New game started');
    return engine.positionCommand('startpos', 'e2e4 e7e5');
}).then(function () {
    console.log('Starting position set');
	console.log('Starting analysis');
    return engine.goInfiniteCommand(function infoHandler(info) {
        console.log(info);
    });
}).delay(2000).then(function () {
    console.log('Stopping analysis');
    return engine.stopCommand();
}).then(function (bestmove) {
    console.log('Bestmove: ');
    console.log(bestmove);
    return engine.quitCommand();
}).then(function () {
    console.log('Stopped');
}).fail(function (error) {
    console.log(error);
    process.exit();
}).done();
```
## API

See [here](http://imor.github.io/uci/docs/src/main.html) for API reference.

## Contributing
Fork, pick an issue to fix from [issues](https://github.com/imor/uci/issues) or
add a missing feature and send a pull request.

## License
UCI is released under the MIT License. See the bundled LICENSE file for details.

---
_Source: https://npm.io/package/uci · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
