# terminal-input

> terminal-input

Latest version **1.0.1** (published 2020-09-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install terminal-input
pnpm add terminal-input
yarn add terminal-input
bun add terminal-input
```

## 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 | 1.0.1 |
| Published | 2020-09-16 |
| First published | 2020-09-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=10 |
| Dependencies | 3 |
| Unpacked size | 8.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | hubiqing |
| Maintainers | g120hbq |
| Keywords | typescript, module-polierplate, terminal-input |

## Links

- npm: https://www.npmjs.com/package/terminal-input
- Repository: https://github.com/githbq/terminal-input
- Homepage: https://github.com/githbq/terminal-input#readme
- Issues: https://github.com/githbq/terminal-input/issues
- npm.io page: https://npm.io/package/terminal-input

## Dependencies (3)

- [chalk](https://npm.io/package/chalk.md) ^4.1.0
- [tslib](https://npm.io/package/tslib.md) ^2.0.1
- [inquirer](https://npm.io/package/inquirer.md) ^7.3.3

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2020-09-16
- 1.0.0 — 2020-09-16

## README

# terminal-input

更好用的从终端读取用户输入

## 功能介绍

1. 更便捷的从终端读取用户输入
2. 提供颜色选择
3. 基于 inquirer 与 chalk  

## 安装

``` 
yarn add terminal-input
//or 
npm install terminal-input
```

## 使用   

``` ts
import { confirm,input } from 'terminal-input'

async function(){
    // 参数1 问题
    // 参数2 默认答案
    // 参数3 问题的颜色
    const answer = await confirm('how are you?','y',color?='yellow')
    // answer: true
     const answer2 = await input('how are you?','ok',color?='yellow')
    // answer: 'ok'
}

```

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