UNPKG

cli-prompts

Version:

Tiny module for creating beautiful CLI prompts

52 lines (36 loc) 1.68 kB
# cli-prompts [![NPM version](https://badgen.net/npm/v/cli-prompts)](https://npmjs.com/package/cli-prompts) [![NPM downloads](https://badgen.net/npm/dm/cli-prompts)](https://npmjs.com/package/cli-prompts) [![CircleCI](https://badgen.net/circleci/github/egoist/cli-prompts/master)](https://circleci.com/gh/egoist/cli-prompts/tree/master) [![donate](https://badgen.net/badge/support%20me/donate/ff69b4)](https://patreon.com/egoist) [![chat](https://badgen.net/badge/chat%20on/discord/7289DA)](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)