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

#421 in Command-line interface

Download history 4475/week @ 2024-12-15 4669/week @ 2024-12-22 3774/week @ 2024-12-29 5519/week @ 2025-01-05 5931/week @ 2025-01-12 6326/week @ 2025-01-19 6614/week @ 2025-01-26 10981/week @ 2025-02-02 11450/week @ 2025-02-09 13747/week @ 2025-02-16 16751/week @ 2025-02-23 16334/week @ 2025-03-02 16954/week @ 2025-03-09 13483/week @ 2025-03-16 15018/week @ 2025-03-23 16478/week @ 2025-03-30

63,079 downloads per month
Used in 35 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