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. │
│ --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.0.tar.gz
(7.6 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.0.tar.gz.
File metadata
- Download URL: questionary_cli-0.1.0.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.28.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cdb820cff7d38dd636b4bf23f71cba45af515fdbbf96adfe22867de64544a21a
|
|
| MD5 |
73ff5ec2f6c6f67efef5c7055c3caba7
|
|
| BLAKE2b-256 |
2fa13a1d87eda64ea969fc5b2ba98f944fd093f04d73f12e84b3aeb8d4fb2fd1
|
File details
Details for the file questionary_cli-0.1.0-py3-none-any.whl.
File metadata
- Download URL: questionary_cli-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.28.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d0e395c4adb2b1f51a7cd717fcf87099bd5665921c819160a10dc79d2b21ca9
|
|
| MD5 |
bc129acf18e625993cf5d8fe84a63e84
|
|
| BLAKE2b-256 |
23f1469a4a5aeca30637eac7883176a94c6fa16538490181faeeec85640e4032
|