API Reference

blessed

Low-level terminal interface library that provides widgets such as boxes, lists, and forms for full-screen TUIs.

Official Documentation ↗
CompatibilityThis documentation covers version v0.1.81. Check the official docs for the latest API surface.

Installation

npmnpm install blessed
pnpmpnpm add blessed

Methods

Overview

blessed is a low-level terminal interface library providing widgets such as boxes, lists, and forms for full-screen applications. This reference lists the most frequently used APIs with accurate signatures and runnable snippets.

Core APIs

  • blessed.screen — Creates the full-screen terminal surface that hosts widgets.
  • blessed.box — Creates a rectangular widget with optional border and positioning.
  • screen.key — Binds key handlers so users can navigate and quit the interface.

Example

const blessed = require('blessed');

const screen = blessed.screen({ smartCSR: true, title: 'dashboard' });

Notes

Widgets are buffered, so nothing appears until screen.render() is called. The package is largely unmaintained; evaluate maintained forks for new work.

Verification

Create a box, append it to the screen, call render, and confirm the content is visible in the terminal.

Errors

The following points are quoted verbatim from the official documentation. 来源:https://cdn.jsdelivr.net/gh/chjj/blessed@latest/README.md · 取证方式:HTTP GET 官方 README/文档页(HTML 去标签) · 抓取时间:2026-11-07T13:48:30.757Z. Any error type, throw condition or recovery step not stated there is left unspecified; this page does not infer exception classes or return values.

Security notes

Quoted verbatim from the official documentation; this is not a complete threat model. 来源:https://cdn.jsdelivr.net/gh/chjj/blessed@latest/README.md · 取证方式:HTTP GET 官方 README/文档页(HTML 去标签) · 抓取时间:2026-11-07T13:48:30.757Z.

FAQ

Why is the screen blank until I call render?
blessed buffers widget changes; you must call screen.render() after building or updating the tree to paint it.
How do I make a scrollable list?
Use blessed.list with items and keys, and enable mouse and vi-style movement through list options.
Is blessed still maintained?
The original package is largely unmaintained; consider neo-blessed or alternatives such as Ink for new projects.