#terminal-input #tty #console-input #terminal

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

#1351 in Command-line interface

Download history 10035/week @ 2025-10-15 9193/week @ 2025-10-22 11739/week @ 2025-10-29 11123/week @ 2025-11-05 11554/week @ 2025-11-12 13598/week @ 2025-11-19 9670/week @ 2025-11-26 10834/week @ 2025-12-03 10505/week @ 2025-12-10 9758/week @ 2025-12-17 9500/week @ 2025-12-24 11283/week @ 2025-12-31 17473/week @ 2026-01-07 18577/week @ 2026-01-14 17427/week @ 2026-01-21 21186/week @ 2026-01-28

76,929 downloads per month
Used in 52 crates (3 directly)

BSD-2-Clause

15KB
325 lines

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: ")?;

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: ")?;

Dependencies

~215KB