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

#784 in Command-line interface

Download history 6157/week @ 2024-10-08 6554/week @ 2024-10-15 5844/week @ 2024-10-22 6333/week @ 2024-10-29 5954/week @ 2024-11-05 5833/week @ 2024-11-12 5525/week @ 2024-11-19 5006/week @ 2024-11-26 5815/week @ 2024-12-03 6299/week @ 2024-12-10 4756/week @ 2024-12-17 4470/week @ 2024-12-24 3488/week @ 2024-12-31 6093/week @ 2025-01-07 5793/week @ 2025-01-14 5349/week @ 2025-01-21

21,459 downloads per month
Used in 32 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