#terminal #prompt #input #tty #console

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

#324 in Command-line interface

Download history 5700/week @ 2023-12-17 3092/week @ 2023-12-24 4481/week @ 2023-12-31 6663/week @ 2024-01-07 7188/week @ 2024-01-14 5915/week @ 2024-01-21 6203/week @ 2024-01-28 6215/week @ 2024-02-04 6182/week @ 2024-02-11 6271/week @ 2024-02-18 6135/week @ 2024-02-25 5988/week @ 2024-03-03 5712/week @ 2024-03-10 6045/week @ 2024-03-17 7755/week @ 2024-03-24 7500/week @ 2024-03-31

27,548 downloads per month
Used in 16 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

~215KB