#terminal #input #prompt #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

#694 in Command-line interface

Download history 5362/week @ 2024-08-05 5598/week @ 2024-08-12 6148/week @ 2024-08-19 6440/week @ 2024-08-26 5743/week @ 2024-09-02 6179/week @ 2024-09-09 5420/week @ 2024-09-16 6996/week @ 2024-09-23 6872/week @ 2024-09-30 5560/week @ 2024-10-07 7027/week @ 2024-10-14 5485/week @ 2024-10-21 6274/week @ 2024-10-28 6254/week @ 2024-11-04 6010/week @ 2024-11-11 4934/week @ 2024-11-18

24,130 downloads per month
Used in 32 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