Skip to content
Effect 4.0 is here. One ecosystem. Zero dependencies.

NodeTerminal unstable

Node.js implementation of the Effect Terminal service.

This module reuses the shared Node terminal implementation. make creates a scoped process-backed Terminal service, and layer provides the default service with the standard quit behavior for key input.

2 exports Since v4.0.0 Source

Constructors

make

unstable
Since v4.0.0

Creates a scoped Terminal service backed by process stdin/stdout. By default, Esc, Ctrl+C, and Ctrl+D end key input. Supply shouldQuit to override these quit keys.

Signature

declare const make: (shouldQuit?: (input: UserInput) => boolean) => Effect<Terminal, never, Scope>

Layers

layer

unstable
Since v4.0.0

Provides the default process-backed Terminal service, ending key input on bare Esc, Ctrl+C, or Ctrl+D.

Signature

declare const layer: Layer<Terminal>