Requestty

RustCI RustCI RustCI Crates.io License Documentation

requestty (request-tty) is an easy-to-use collection of interactive cli prompts inspired by Inquirer.js.

Usage

Add this to your Cargo.toml

toml [dependencies] requestty = "0.1.0"

``rust let question = requestty::Question::expand("overwrite") .message("Conflict onfile.rs`") .choices(vec![ ('y', "Overwrite"), ('a', "Overwrite this one and all next"), ('d', "Show diff"), ]) .default_separator() .choice('x', "Abort") .build();

println!("{:#?}", requestty::prompt_one(question)); ```

In-built prompts

There are 10 in-built prompts:

Optional features

Minimum Supported Rust Version (MSRV)

Minimum supported rust version (as per cargo-msrv) is 1.47