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

#1288 in Command-line interface

Download history 8720/week @ 2025-07-26 8425/week @ 2025-08-02 8598/week @ 2025-08-09 8140/week @ 2025-08-16 8186/week @ 2025-08-23 10616/week @ 2025-08-30 9142/week @ 2025-09-06 8523/week @ 2025-09-13 9147/week @ 2025-09-20 9931/week @ 2025-09-27 9188/week @ 2025-10-04 8771/week @ 2025-10-11 9511/week @ 2025-10-18 10936/week @ 2025-10-25 11287/week @ 2025-11-01 9523/week @ 2025-11-08

42,670 downloads per month
Used in 48 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