Skip to content

tyrus:cli ​

tyrus:cli contains native prompt helpers for interactive terminal programs. Prompt UI is terminal chrome and should stay on stderr so stdout remains clean for data output.

Imports ​

Importsimport { confirm, input, integer, isTTY, multiselect, number, password, select } from "tyrus:cli";

Exported Items ​

ItemSignaturePurpose
input(options: InputOptions) => stringReads a text value.
password(options: PasswordOptions) => stringReads a hidden secret value, optionally with confirmation.
confirm(options: ConfirmOptions) => booleanReads a yes/no answer.
select(options: SelectOptions) => stringLets the user choose one option.
multiselect(options: MultiSelectOptions) => string[]Lets the user choose multiple options.
number(options: NumberOptions) => f64Reads a floating-point number.
integer(options: IntegerOptions) => i64Reads an integer.
isTTY() => booleanReports whether stdout is an interactive terminal.

Text styling lives in tyrus:utils

Use styleText and figlet from tyrus:utils for banners and ANSI styling.