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

#324 in Command-line interface

Download history 19/week @ 2023-08-15 282/week @ 2023-08-22 207/week @ 2023-08-29 408/week @ 2023-09-05 341/week @ 2023-09-12 255/week @ 2023-09-19 291/week @ 2023-09-26 280/week @ 2023-10-03 163/week @ 2023-10-10 294/week @ 2023-10-17 270/week @ 2023-10-24 363/week @ 2023-10-31 3075/week @ 2023-11-07 5972/week @ 2023-11-14 4974/week @ 2023-11-21 5277/week @ 2023-11-28

19,358 downloads per month
Used in 13 crates (via auth-git2)

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

~185KB