# text-prompt

> A CLI prompt for text.

Latest version **0.1.3** (published 2019-10-16) · ISC license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install text-prompt
pnpm add text-prompt
yarn add text-prompt
bun add text-prompt
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.1.3 |
| Published | 2019-10-16 |
| First published | 2016-04-07 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4 |
| Dependencies | 4 |
| Unpacked size | 5.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Jannis R |
| Maintainers | derhuerst |
| Keywords | text, interactive, prompt, command line, cli, terminal, readline |

## Links

- npm: https://www.npmjs.com/package/text-prompt
- Repository: https://github.com/derhuerst/text-prompt
- Issues: https://github.com/derhuerst/text-prompt/issues
- npm.io page: https://npm.io/package/text-prompt

## Dependencies (4)

- [chalk](https://npm.io/package/chalk.md) ^1.1.3
- [cli-styles](https://npm.io/package/cli-styles.md) ^0.6.0
- [ansi-escapes](https://npm.io/package/ansi-escapes.md) ^1.4
- [prompt-skeleton](https://npm.io/package/prompt-skeleton.md) ^0.3

## Alternatives

- [localforage](https://npm.io/package/localforage.md) — 6.2M weekly downloads
- [localforage-observable](https://npm.io/package/localforage-observable.md) — 30.8K weekly downloads
- [@y/y](https://npm.io/package/@y/y.md) — 30.1K weekly downloads
- [@metaobjectsdev/render](https://npm.io/package/@metaobjectsdev/render.md) — 3.5K weekly downloads
- [@ledgerhq/coin-algorand](https://npm.io/package/@ledgerhq/coin-algorand.md) — 1.1K weekly downloads

## Recent versions

- 0.1.3 (latest) — 2019-10-16
- 0.1.2 — 2017-04-05
- 0.1.1 — 2017-02-14
- 0.1.0 — 2016-04-07

## README

# text-prompt ⌨

**Deprecated. Use the [input prompt](https://github.com/enquirer/enquirer#input-prompt) or [password prompt](https://github.com/enquirer/enquirer#password-prompt) from [`enquirer`](https://github.com/enquirer/enquirer).**

---

A CLI prompt for text.

[![asciicast](https://asciinema.org/a/41554.png)](https://asciinema.org/a/41554)

[![npm version](https://img.shields.io/npm/v/text-prompt.svg)](https://www.npmjs.com/package/text-prompt)
[![dependency status](https://img.shields.io/david/derhuerst/text-prompt.svg)](https://david-dm.org/derhuerst/text-prompt)
![ISC-licensed](https://img.shields.io/github/license/derhuerst/text-prompt.svg)
[![chat on gitter](https://badges.gitter.im/derhuerst.svg)](https://gitter.im/derhuerst)

*text-prompt* uses [*cli-styles*](https://github.com/derhuerst/cli-styles) and [*prompt-skeleton*](https://github.com/derhuerst/prompt-skeleton) to have a look & feel consistent with [other prompts](https://github.com/derhuerst/prompt-skeleton#prompts-using-prompt-skeleton).


## Installing

```shell
npm install text-prompt
```


## Usage

```javascript
const textPrompt = require('text-prompt')
textPrompt('What is your name?')
.on('data', (e) => console.log('Interim value', e.value))
.on('submit', (v) => console.log('Submitted with', v))
.on('abort', (v) => console.log('Aborted with', v))
```


## Related

- [`date-prompt`](https://github.com/derhuerst/date-prompt)
- [`mail-prompt`](https://github.com/derhuerst/mail-prompt)
- [`multiselect-prompt`](https://github.com/derhuerst/multiselect-prompt)
- [`number-prompt`](https://github.com/derhuerst/number-prompt)
- [`range-prompt`](https://github.com/derhuerst/range-prompt)
- [`select-prompt`](https://github.com/derhuerst/select-prompt)
- [`tree-select-prompt`](https://github.com/derhuerst/tree-select-prompt)
- [`cli-autocomplete`](https://github.com/derhuerst/cli-autocomplete)
- [`switch-prompt`](https://github.com/derhuerst/switch-prompt)


## Contributing

If you **have a question**, **found a bug** or want to **propose a feature**, have a look at [the issues page](https://github.com/derhuerst/text-prompt/issues).

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