effect-io-ai

Package: @effect/platform
Module: Terminal

Terminal.Terminal

A Terminal represents a command-line interface which can read input from a user and display messages to a user.

Signature

export interface Terminal {
  /**
   * The number of columns available on the platform's terminal interface.
   */
  readonly columns: Effect<number>
  /**
   * The number of rows available on the platform's terminal interface.
   */
  readonly rows: Effect<number>
  /**
   * Determines if the current terminal interface is interactive.
   */
  readonly isTTY: Effect<boolean>
  /**
   * Reads input events from the default standard input.
   */
  readonly readInput: Effect<ReadonlyMailbox<UserInput>, never, Scope.Scope>
  /**
   * Reads a single line from the default standard input.
   */
  readonly readLine: Effect<string, QuitException>
  /**
   * Displays text to the the default standard output.
   */
  readonly display: (text: string) => Effect<void, PlatformError>
}

Source

Since v1.0.0