Command line tool for questionary.
Project description
questionary-cli
Command line tool for questionary.
Features
- Command line utility for questionary
- All question types and prompts supported
- Output as JSON or plain text
- Chain multiple questions
Installation
$ pip install questionary-cli
Usage
To be documented.
CLI Reference
$ que --help
Usage: que [OPTIONS] COMMAND1 [ARGS]... [COMMAND2 [ARGS]...]...
Command line utility for questionary.
╭─ Options ────────────────────────────────────────────────────────────────────────╮
│ --json -j Output results in JSON format. │
│ --plain -p Output results in plain text, one value per line. │
│ --file -f FILE Output results to file instead of stdout. │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ───────────────────────────────────────────────────────────────────────╮
│ autocomplete Autocomplete text prompt. │
│ checkbox Multi-select checkbox prompt. │
│ confirm Confirmation prompt. │
│ password Password prompt. │
│ path Filesystem path prompt. │
│ print Print formatted text. │
│ rawselect Raw select option prompt. │
│ select Select option prompt. │
│ text Text prompt. │
│ wait Wait until any key is pressed. │
╰──────────────────────────────────────────────────────────────────────────────────╯
Text
$ que text --help
Usage: que text [OPTIONS]
Text prompt.
╭─ Options ────────────────────────────────────────────────────────────────────────╮
│ * --prompt -p TEXT Prompt text to be displayed. [required] │
│ * --key,--as -k TEXT Question key to be used in output. [required] │
│ --default -d TEXT Default value if no text is entered. [default: ""] │
│ --instruction -i TEXT Instruction displayed to the user. [default: ""] │
│ --multiline -m Allow multiline text to be entered. │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────────╯
Password
$ que password --help
Usage: que password [OPTIONS]
Password prompt.
╭─ Options ────────────────────────────────────────────────────────────────────────╮
│ * --prompt -p TEXT Prompt text to be displayed. [required] │
│ * --key,--as -k TEXT Question key to be used in output. [required] │
│ --default -d TEXT Default value if no text is entered. [default: ""] │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────────╯
Path
$ que path --help
Usage: que path [OPTIONS]
Filesystem path prompt.
╭─ Options ────────────────────────────────────────────────────────────────────────╮
│ * --prompt -p TEXT Prompt text to be displayed. [required] │
│ * --key,--as -k TEXT Question key to be used in output. [required] │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────────╯
Confirm
$ que confirm --help
Usage: que confirm [OPTIONS]
Confirmation prompt.
╭─ Options ────────────────────────────────────────────────────────────────────────╮
│ * --prompt -p TEXT Prompt text to be displayed. [required] │
│ --key,--as -k TEXT Question key to be used in output. │
│ --default -d Default value if no text is entered. │
│ [default: False] │
│ --instruction -i TEXT Instruction displayed to the user. [default: ""] │
│ --auto-enter -a No need to press Enter after "y" or "n" is pressed. │
│ --exit-code -e Exit with code 1 if "n" is entered. │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────────╯
Select
$ que select --help
Usage: que select [OPTIONS]
Select option prompt.
╭─ Options ────────────────────────────────────────────────────────────────────────╮
│ * --prompt -p TEXT Prompt text to be displayed. [required] │
│ * --key,--as -k TEXT Question key to be used in output. [required] │
│ * --choices -c TEXT Choices as JSON encoded list of strings. [required] │
│ --default -d TEXT Default value if no text is entered. │
│ --instruction -i TEXT Instruction displayed to the user. [default: ""] │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────────╯
Raw Select
$ que rawselect --help
Usage: que rawselect [OPTIONS]
Raw select option prompt.
╭─ Options ────────────────────────────────────────────────────────────────────────╮
│ * --prompt -p TEXT Prompt text to be displayed. [required] │
│ * --key,--as -k TEXT Question key to be used in output. [required] │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────────╯
Checkbox
$ que checkbox --help
Usage: que checkbox [OPTIONS]
Multi-select checkbox prompt.
╭─ Options ────────────────────────────────────────────────────────────────────────╮
│ * --prompt -p TEXT Prompt text to be displayed. [required] │
│ * --key,--as -k TEXT Question key to be used in output. [required] │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────────╯
Autocomplete
$ que autocomplete --help
Usage: que autocomplete [OPTIONS]
Autocomplete text prompt.
╭─ Options ────────────────────────────────────────────────────────────────────────╮
│ * --prompt -p TEXT Prompt text to be displayed. [required] │
│ * --key,--as -k TEXT Question key to be used in output. [required] │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────────╯
Press Any Key To Continue...
$ que wait --help
Usage: que wait [OPTIONS]
Wait until any key is pressed.
╭─ Options ────────────────────────────────────────────────────────────────────────╮
│ * --prompt -p TEXT Prompt text to be displayed. │
│ [default: Press any key to continue...] │
│ [required] │
│ --append -a When option is set, append " press any key to │
│ continue..." to the prompt. │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────────╯
$ que print --help
Usage: que print [OPTIONS]
Print formatted text.
╭─ Options ────────────────────────────────────────────────────────────────────────╮
│ * --text -t TEXT Text to be printed. [required] │
│ --help Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────────╯
Contributing
Pull requests, feature requests, and bug reports are welcome!
Authors
- Michael Makukha
See also
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
questionary_cli-0.1.2.tar.gz
(7.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file questionary_cli-0.1.2.tar.gz.
File metadata
- Download URL: questionary_cli-0.1.2.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.28.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
70809707b8f98dc629b30308851be2d1452d3b70b5925ade3207f2b4b79db151
|
|
| MD5 |
04a9a03c7497f55951cf341bca9f61de
|
|
| BLAKE2b-256 |
8260dacab075f837a391a3e4750b05ca72cba3e69ccc9c36c50db3f634b9e5f8
|
File details
Details for the file questionary_cli-0.1.2-py3-none-any.whl.
File metadata
- Download URL: questionary_cli-0.1.2-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.28.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6aa6c2e714e936b0c4bde1786482e3bd7d41ea9f8c24720f011c74306390654e
|
|
| MD5 |
34a1d64c634d8a78b8134e53ee0cadf7
|
|
| BLAKE2b-256 |
76ea3693cc8157d9ddfc7f2c5c71b88403c5a3f133d8a2285674b887f34b8ab1
|