Skip to content

@fungi.computer/cli-kit

Own terminal presentation; callers retain commands, credentials and state.

new Cli(options): Cli

CliOptions

Cli

readonly interactive: boolean

welcome(message): void

string

void

select<Value>>(options): Promise<symbol | Value>>

Value

SelectOptions<Value>

Promise<symbol | Value>

text(options): Promise<string | symbol>>

TextOptions

Promise<string | symbol>

search(options): Promise<string | symbol>>

SearchOptions

Promise<string | symbol>

password(options): Promise<string | symbol>>

PasswordOptions

Promise<string | symbol>

confirm(options): Promise<boolean | symbol>>

ConfirmOptions

Promise<boolean | symbol>

info(message): void

string

void

step(message): void

string

void

outro(message): void

string

void

cancel(message): void

string

void

task<T>>(message, work): Promise<T>>

Stop animation on both success and failure, without exposing error payloads.

T

string

(update) => Promise<T>

Promise<T>

checklist(): (label, ok, detail) => void

Shared doctor checklist; the caller owns what constitutes a pass.

(label, ok, detail) => void

CliOptions = object

brand: CliBrand

optional input?: Readable

optional output?: Writable

optional interactive?: boolean

optional columns?: number


SearchChoice = Readonly<{ value: string; label: string; description?: string; group?: string; }>

Already ordered choices; the caller owns group membership and labels.


SearchOptions = Readonly<{ message: string; choices: readonly SearchChoice[]; collapsedGroup?: string; signal?: AbortSignal; }>

Re-exports renderBanner