# appendable-cli-menu

> Show a menu in the terminal were you can continuously append items

Latest version **2.0.0** (published 2016-04-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install appendable-cli-menu
pnpm add appendable-cli-menu
yarn add appendable-cli-menu
bun add appendable-cli-menu
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2016-04-16 |
| First published | 2016-01-21 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 7 |
| Author | Thomas Watson Steen |
| Maintainers | watson |
| Keywords | menu, list, cli, terminal, console, select, input, stdin |

## Links

- npm: https://www.npmjs.com/package/appendable-cli-menu
- Repository: https://github.com/watson/appendable-cli-menu
- Homepage: https://github.com/watson/appendable-cli-menu#readme
- Issues: https://github.com/watson/appendable-cli-menu/issues
- npm.io page: https://npm.io/package/appendable-cli-menu

## Dependencies (3)

- [chalk](https://npm.io/package/chalk.md) ^1.1.1
- [keypress](https://npm.io/package/keypress.md) ^0.2.1
- [single-line-log](https://npm.io/package/single-line-log.md) ^1.0.1

## 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

- 2.0.0 (latest) — 2016-04-16
- 1.1.0 — 2016-01-21
- 1.0.0 — 2016-01-21

## README

# appendable-cli-menu

A Node.js module to show a menu in the terminal. Items in the menu can
be added continuously and the user can choose any available item at any
time.

[![Build status](https://travis-ci.org/watson/appendable-cli-menu.svg?branch=master)](https://travis-ci.org/watson/appendable-cli-menu)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard)

## Installation

```
npm install appendable-cli-menu
```

## Usage

In this example we use the
[bonjour/zeroconf](http://github.com/watson/bonjour) protocol to look
for http servers on the local network. We add them to the menu as they
are discovered and let the user choose one:

```js
var bonjour = require('bonjour')()
var menu = require('appendable-cli-menu')

var servers = menu('Select an HTTP server', function (server) {
  // stop looking when the user have selected an option
  browser.stop()
  console.log('You selected %s (host: %s)', server.name, server.value)
})

var browser = bonjour.find({ type: 'http' }, function (service) {
  servers.add({ name: service.name, value: service.host })
})
```

The above call the `menu()` will show en empty menu to the user:

```
? Select an HTTP server (waiting...)

```

The subsequent calls to the `servers.add()` will add new options to the
menu as they become available:

```
? Select an HTTP server (use arrow keys)
> mafintosh
  feross
  watson

```

The user can choose an item from the menu at any time. When he does, the
callback provided to `menu()` will be called.

## License

MIT

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