@fungi.computer/cli-kit
Classes
Section titled “Classes”Own terminal presentation; callers retain commands, credentials and state.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Cli(
options):Cli
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”Properties
Section titled “Properties”interactive
Section titled “interactive”
readonlyinteractive:boolean
Methods
Section titled “Methods”welcome()
Section titled “welcome()”welcome(
message):void
Parameters
Section titled “Parameters”message
Section titled “message”string
Returns
Section titled “Returns”void
select()
Section titled “select()”select<
Value>>(options):Promise<symbol|Value>>
Type Parameters
Section titled “Type Parameters”Value
Parameters
Section titled “Parameters”options
Section titled “options”SelectOptions<Value>
Returns
Section titled “Returns”Promise<symbol | Value>
text()
Section titled “text()”text(
options):Promise<string|symbol>>
Parameters
Section titled “Parameters”options
Section titled “options”TextOptions
Returns
Section titled “Returns”Promise<string | symbol>
search()
Section titled “search()”search(
options):Promise<string|symbol>>
Parameters
Section titled “Parameters”options
Section titled “options”Returns
Section titled “Returns”Promise<string | symbol>
password()
Section titled “password()”password(
options):Promise<string|symbol>>
Parameters
Section titled “Parameters”options
Section titled “options”PasswordOptions
Returns
Section titled “Returns”Promise<string | symbol>
confirm()
Section titled “confirm()”confirm(
options):Promise<boolean|symbol>>
Parameters
Section titled “Parameters”options
Section titled “options”ConfirmOptions
Returns
Section titled “Returns”Promise<boolean | symbol>
info()
Section titled “info()”info(
message):void
Parameters
Section titled “Parameters”message
Section titled “message”string
Returns
Section titled “Returns”void
step()
Section titled “step()”step(
message):void
Parameters
Section titled “Parameters”message
Section titled “message”string
Returns
Section titled “Returns”void
outro()
Section titled “outro()”outro(
message):void
Parameters
Section titled “Parameters”message
Section titled “message”string
Returns
Section titled “Returns”void
cancel()
Section titled “cancel()”cancel(
message):void
Parameters
Section titled “Parameters”message
Section titled “message”string
Returns
Section titled “Returns”void
task()
Section titled “task()”task<
T>>(message,work):Promise<T>>
Stop animation on both success and failure, without exposing error payloads.
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”message
Section titled “message”string
(update) => Promise<T>
Returns
Section titled “Returns”Promise<T>
checklist()
Section titled “checklist()”checklist(): (
label,ok,detail) =>void
Shared doctor checklist; the caller owns what constitutes a pass.
Returns
Section titled “Returns”(label, ok, detail) => void
Type Aliases
Section titled “Type Aliases”CliOptions
Section titled “CliOptions”CliOptions =
object
Properties
Section titled “Properties”brand:
CliBrand
input?
Section titled “input?”
optionalinput?:Readable
output?
Section titled “output?”
optionaloutput?:Writable
interactive?
Section titled “interactive?”
optionalinteractive?:boolean
columns?
Section titled “columns?”
optionalcolumns?:number
SearchChoice
Section titled “SearchChoice”SearchChoice =
Readonly<{value:string;label:string;description?:string;group?:string; }>
Already ordered choices; the caller owns group membership and labels.
SearchOptions
Section titled “SearchOptions”SearchOptions =
Readonly<{message:string;choices: readonlySearchChoice[];collapsedGroup?:string;signal?:AbortSignal; }>
References
Section titled “References”renderBanner
Section titled “renderBanner”Re-exports renderBanner