cli-confirm

CLI utility to confirm yes/no.


Keywords
console, confirmation, python
License
MIT
Install
pip install cli-confirm==1.0.0

Documentation

cli-confirm

Test PyPI version

A CLI utility to confirm yes/no.

Installation

pip install cli-confirm

Example

confirm 'Are you sure?'

which shows a prompt to ask yes/no:

Are you sure? [y/N]:

If the user answers "yes", then it returns a zero exit status. It returns a non-zero exit status otherwise.

Motivation

This utility can be used in a combination with taskipy as follows:

[tool.taskipy.tasks]
deploy = "confirm 'Are you sure to deploy?' && mkdocs gh-deploy"

License

MIT