Skip to content
masterclass Buddy

Node.js · Module

node:readline

Node.js readline reads a Readable stream one line at a time. It supports interactive prompts, line events, command history, completion, and promise-based or callback APIs.

Last updated

Since
v0.10.0

Syntax

readline.createInterface(options)
readlinePromises.createInterface(options)

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • readline.Interface
  • readlinePromises.Interface
  • readline.createInterface()
  • readlinePromises.createInterface()
  • rl.question()
  • 'line' event
  • 'close' event
  • readline.emitKeypressEvents()

Source: Readline | Node.js v26.13.0 Documentation. Checked 2026-11-03.