#prompt #terminal #input #console #tty

terminal-prompt

Tiny library for prompting sensitive or non-sensitive data on the terminal

5 releases

0.2.3 Aug 9, 2023
0.2.2 Aug 8, 2023
0.2.1 Aug 4, 2023
0.2.0 Aug 4, 2023
0.1.0 Aug 3, 2023

#883 in Command-line interface

Download history 6928/week @ 2024-06-20 5343/week @ 2024-06-27 5741/week @ 2024-07-04 5601/week @ 2024-07-11 6242/week @ 2024-07-18 5507/week @ 2024-07-25 5100/week @ 2024-08-01 5823/week @ 2024-08-08 5373/week @ 2024-08-15 6213/week @ 2024-08-22 6169/week @ 2024-08-29 6050/week @ 2024-09-05 6156/week @ 2024-09-12 5487/week @ 2024-09-19 6937/week @ 2024-09-26 5532/week @ 2024-10-03

25,109 downloads per month
Used in 28 crates (3 directly)

BSD-2-Clause

15KB
325 lines

terminal-prompt

Tiny library for prompting sensitive or non-sensitive data on the terminal.

The only dependency is libc on Unix and winapi on Windows.

See Terminal for the API documentation.

Example

Read a username and password from the terminal:

use terminal_prompt::Terminal;
let mut terminal = Terminal::open()?;
let username = terminal.prompt("Username: ")?;
let password = terminal.prompt_sensitive("Password: ")?;

lib.rs:

Tiny library for prompting sensitive or non-sensitive data on the terminal.

The only dependency is libc on Unix and winapi on Windows.

See Terminal for the API documentation.

Example

Read a username and password from the terminal:

use terminal_prompt::Terminal;
let mut terminal = Terminal::open()?;
let username = terminal.prompt("Username: ")?;
let password = terminal.prompt_sensitive("Password: ")?;

Dependencies

~220KB