Skip to content

ReplOptions interface

Home > streplts > ReplOptions

Configuration options required to instantiate a interactive terminal REPL runtime environment instance.

Signature:

export interface ReplOptions

Property

Modifiers

Type

Description

context?

Record<string, any>

(Optional) Mutational contextual execution state records shared and readable by commands.

flipBackspace?

boolean

(Optional) Flag indicating whether to apply a byte sequence flip for backspace and ctrl+backspace inputs, addressing inconsistencies in certain terminal environments. Defaults to false.

globals?

Record<string, any>

(Optional) Utilities, environmental bridges, and third-party dependency modules accessible inside tasks.

historyFile?

string

(Optional) File path string specifying where to persist command history logs across sessions. If undefined, command history will not be saved between sessions.

statusBar?

boolean | (() => string)

(Optional) Boolean toggle or dynamic evaluation function determining whether to render a status bar dock below the prompt.

stdin?

Readable & { isTTY?: boolean; setRawMode?: (mode: boolean) => void; }

(Optional) Input listener streaming interface emitting character buffers. Defaults to process.stdin.

stdout?

Writable & { columns?: number; }

(Optional) Output writing channel receiving ANSI text payloads. Defaults to process.stdout.