| Crates.io | reequestty |
| lib.rs | reequestty |
| version | 0.5.1 |
| created_at | 2025-08-19 10:02:38.70506+00 |
| updated_at | 2025-08-19 10:02:38.70506+00 |
| description | An easy-to-use collection of interactive cli prompts |
| homepage | https://github.com/abenoit-reeliant/reequestty#readme |
| repository | https://github.com/abenoit-reeliant/reequestty |
| max_upload_size | |
| id | 1801667 |
| size | 424,194 |
reequestty (request-tty) is an easy-to-use collection of interactive
cli prompts inspired by Inquirer.js.
Easy-to-use - The builder API and macros allow you to easily configure and use the in-built prompts.
Extensible - Easily create and use custom prompts with a companion ui rendering library.
Flexible - All prompts can be used standalone or chained together.
Dynamic - You can dynamically decide what questions should be asked based on previous questions.
Validation - You can validate user input with any prompt.
Examples - Every prompt is accompanied with an example as well as other examples for more complex workflows
Add this to your Cargo.toml
[dependencies]
reequestty = "0.4.1"
To ask a question:
let question = reequestty::Question::expand("overwrite")
.message("Conflict on `file.rs`")
.choices(vec![
('y', "Overwrite"),
('a', "Overwrite this one and all next"),
('d', "Show diff"),
])
.default_separator()
.choice('x', "Abort")
.build();
println!("{:#?}", reequestty::prompt_one(question));
More examples are available in the documentation and the examples directory.
There are 11 in-built prompts:
Prompt that takes user input and returns a String.
Prompt that takes user input and hides it.
Prompt that takes launches the users preferred editor on a temporary file
Prompt that returns true or false.
Prompt that takes a i64 as input.
Prompt that takes a f64 as input.
Prompt that allows the user to select from a list of options by key
Prompt that allows the user to select from a list of options
Prompt that allows the user to select from a list of options with indices
Prompt that allows the user to select multiple items from a list of options
Prompt that allows the user to organize a list of options.
macros: Enabling this feature will allow you to use the questions
and prompt_module macros.
smallvec (default): Enabling this feature will use
SmallVec
instead of Vec for auto completions. This allows inlining single
completions.
crossterm (default): Enabling this feature will use the
crossterm library for terminal
interactions such as drawing and receiving events.
termion: Enabling this feature will use the
termion library for terminal
interactions such as drawing and receiving events.
Minimum supported rust version (as per
cargo-msrv) is 1.56.1