promptt
Lightweight interactive CLI prompts for Rust: text, confirm, number, select, toggle, list, password, invisible.
Install
Usage
Build a list of Questions and run prompt(). Answers are HashMap<String, PromptValue>.
use ;
use ;
Prompt types
| Type | Result | Options / notes |
|---|---|---|
text |
PromptValue::String |
initial_text |
password |
PromptValue::String |
Masked input |
invisible |
PromptValue::String |
No echo |
number |
PromptValue::Float |
min/max, float, round |
confirm |
PromptValue::Bool |
initial_bool |
toggle |
PromptValue::Bool |
active/inactive labels |
select |
PromptValue::String |
choices (title/value) |
list |
PromptValue::List |
separator (default ,) |
More in the documentation and docs.rs.
License
Published under the MIT license. Made by @YONGQI 💛
🛠️ auto updated with automd-rs