#user-input #terminal #cli #macro #function #prelude

cli_input

Various functions for gathering user input in the terminal

8 releases (5 stable)

1.0.4 Nov 18, 2023
1.0.3 Oct 28, 2023
0.1.2 Oct 15, 2023
0.1.1 Oct 15, 2023
0.1.0 Oct 15, 2023

#869 in Rust patterns

MIT license

3KB

CLI Input

A crate filled with various functions and macros for collecting user input in the terminal.

Examples:

use cli_input::prelude::*;

let name: String = input!("Name: ");
let password: String = input_hidden!("Password: ");

println!("\n==== Information ====");
println!("  Name: {}", name);
println!("  Password: {}", password);

Dependencies

~0–10MB
~54K SLoC