https://github.com/tueda/cli-confirm
A CLI utility to confirm yes/no.
https://github.com/tueda/cli-confirm
confirmation console python
Last synced: about 1 year ago
JSON representation
A CLI utility to confirm yes/no.
- Host: GitHub
- URL: https://github.com/tueda/cli-confirm
- Owner: tueda
- License: mit
- Created: 2021-01-29T12:25:51.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-11-01T03:05:24.000Z (over 3 years ago)
- Last Synced: 2025-02-28T01:45:55.599Z (over 1 year ago)
- Topics: confirmation, console, python
- Language: Python
- Homepage:
- Size: 27.3 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
cli-confirm
===========
[](https://github.com/tueda/cli-confirm/actions?query=branch:master)
[](https://pypi.org/project/cli-confirm/)
A CLI utility to confirm yes/no.
Installation
------------
```sh
pip install cli-confirm
```
Example
-------
```sh
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](https://github.com/illBeRoy/taskipy) as follows:
```toml
[tool.taskipy.tasks]
deploy = "confirm 'Are you sure to deploy?' && mkdocs gh-deploy"
```
License
-------
[MIT](https://github.com/tueda/cli-confirm/blob/master/LICENSE)