cli-prompts
Version:
Tiny module for creating beautiful CLI prompts
52 lines (36 loc) • 1.68 kB
Markdown
# cli-prompts
[](https://npmjs.com/package/cli-prompts) [](https://npmjs.com/package/cli-prompts) [](https://circleci.com/gh/egoist/cli-prompts/tree/master) [](https://patreon.com/egoist) [](https://chat.egoist.moe)
**Please consider [donating](https://www.patreon.com/egoist) to this project's author, [EGOIST](#author), to show your ❤️ and support.**
## Features
- Light-weight, it's zero-dependecy
- Easy-to-use
- Developer friendly, written in TypeScript
## Install
```bash
yarn add cli-prompts
```
## Usage
```js
const { Prompts } = require('cli-prompts')
const prompts = new Prompts([
{
type: 'text',
name: 'username',
message: 'enter your username'
}
])
prompts.run().then(answers => {
console.log(answers)
// { username: 'input value' }
})
```
## Contributing
1. Fork it!
2. Create your feature branch: `git checkout -b my-new-feature`
3. Commit your changes: `git commit -am 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request :D
## Author
**cli-prompts** © EGOIST, Released under the [MIT](./LICENSE) License.<br>
Authored and maintained by EGOIST with help from contributors ([list](https://github.com/egoist/cli-prompts/contributors)).
> [Website](https://egoist.sh) · GitHub [@EGOIST](https://github.com/egoist) · Twitter [@\_egoistlily](https://twitter.com/_egoistlily)