# clikey

> Prompts for a single keypress in a node.js CLI app

Latest version **1.0.7** (published 2021-03-30) · BSD-2-Clause license · 0 weekly downloads

## Install

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

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.7 |
| Published | 2021-03-30 |
| First published | 2017-08-07 |
| Weekly downloads | 0 |
| License | BSD-2-Clause |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Iskren Slavov |
| Maintainers | zewish |
| Keywords | cli, keypress, stdin, stdout |

## Links

- npm: https://www.npmjs.com/package/clikey
- Repository: https://github.com/zewish/clikey
- Issues: https://github.com/zewish/clikey/issues
- npm.io page: https://npm.io/package/clikey

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 1.0.7 (latest) — 2021-03-30
- 1.0.6 — 2021-03-21
- 1.0.5 — 2021-03-21
- 1.0.4 — 2021-03-21
- 1.0.3 — 2021-03-21
- 1.0.2 — 2017-08-08
- 1.0.1 — 2017-08-07
- 1.0.0 — 2017-08-07

## README

## clikey

Prompts for a single keypress in a node.js CLI app

#### Usage
```javascript
#!/usr/bin/env node
const clikey = require('clikey');

(async () => {
  const answer = await clikey('Are you sure? [y/N]');
  // answer received when a single key is pressed

  if (answer.toLowerCase() === 'y') {
    return console.log('You said YES!!!');
  }

  console.log('You said NO');
})();
```

#### Install
```bash
$ npm install --save clikey
```

#### Test
```bash
$ npm install && npm test
```

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