{"repo":"terkelg/prompts","free":true,"listed":false,"github":"https://github.com/terkelg/prompts","clone":"git clone https://github.com/terkelg/prompts.git","description":"❯ Lightweight, beautiful and user-friendly interactive prompts","language":"JavaScript","stars":9308,"topics":["prompt","prompts","cli","command-line","nodejs","interface","choice","prompter"],"license":"MIT","category":"cli-tools","readme_excerpt":"❯ Prompts Lightweight, beautiful and user-friendly interactive prompts Easy to use CLI prompts to enquire users for information▌ Simple : prompts has no big dependencies nor is it broken into a dozen tiny modules that only work well together. User friendly : prompt uses layout and colors to create beautiful cli interfaces. Promised : uses promises and async / await . No callback hell. Flexible : all prompts are independent and can be used on their own. Testable : provides a way to submit answers programmatically. Unified : consistent experience across all prompts. ❯ Install This package supports Node 14 and above ❯ Usage See example.js for more options. ❯ Examples Single Prompt Prompt with a single prompt object. Returns an object with the response. Prompt Chain Prompt with a list of prompt objects. Returns an object with the responses. Make sure to give each prompt a unique name property to prevent overwriting values. Dynamic Prompts Prompt properties can be functions too. Prompt Objects with type set to falsy values are skipped. ❯ API prompts(prompts, options) Type: Function Returns: Object Prompter function which takes your prompt objects and returns an object with responses. prompts Type: Array Object Array of prompt objects. These are the questions the user will be prompted. You can see the list of supported prompt types here. Prompts can be submitted ( return , enter ) or canceled ( esc , abort , ctrl + c , ctrl + d ). No property is being defined on the returned respon","default_branch":null,"files":null,"tree":[],"storefront":"/r/terkelg","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/terkelg/prompts/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}