christophemarois / yncli

CLI utility that asks y/n and exists accordingly

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

yncli npm

CLI utility that asks a y/n prompt and exits with the corresponding status code. Uses prompts.

Useful for preventing destructive actions from happening unintentionally.

Install

npm install --save @christophemarois/yncli ## for use in a project
npm install --global @christophemarois/yncli ## for use globally

Usage

yn && echo 1 # echos 1 if user answered positively
yn 'This will launch the rocket. Confirm?' && ./launch

About

CLI utility that asks y/n and exists accordingly

License:MIT License


Languages

Language:JavaScript 100.0%