blessed
Low-level terminal interface library that provides widgets such as boxes, lists, and forms for full-screen TUIs.
Official Documentation ↗v0.1.81. Check the official docs for the latest API surface.Installation
npm install blessedpnpm add blessedMethods
No methods match this filter.
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.
- If a corrupt PNG or a non-PNG is passed in, blessed will display error text in the element. (https://cdn.jsdelivr.net/gh/chjj/blessed@latest/README.md)
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.
- Reimplement ncurses entirely by parsing and compiling terminfo and termcap, and exposing a Program object which can output escape sequences compatible with any terminal. (https://cdn.jsdelivr.net/gh/chjj/blessed@latest/README.md)
- Note: When text is input, it will be stripped of all non-SGR escape codes, tabs will be replaced with 8 spaces, and tags will be replaced with SGR codes (if enabled). (https://cdn.jsdelivr.net/gh/chjj/blessed@latest/README.md)
- A scrollable text box which can display and scroll text, as well as handle pre-existing newlines and escape codes. (https://cdn.jsdelivr.net/gh/chjj/blessed@latest/README.md)
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.
Report a problem with this API docOpens a pre-filled issue on GitHub.