burgee
Switching a terminal UI from…

Coming from neo-blessed

Move a neo-blessed program to controlroom, the burgee family's neo-blessed alternative. neo-blessed keeps blessed's API, so its mapping is blessed's; this page gives it section by section, with what does not map and what burgee migrate reports.

controlroom is the burgee family's neo-blessed alternative for keyboard-driven terminal programs, inline or full-screen. open(), layout, tabs and keymaps, the input line and plugins all ship, since 0.2.0.

neo-blessed is a fork of blessed that keeps blessed's API under another name: the same screen(), box(), list(), key() and render(). So its path to controlroom is blessed's, and the runnable examples live once, on Coming from blessed. This page keeps the same sections so that every link burgee migrate prints for a neo-blessed site lands on one.

Only drawing inline output, with no keys? You want flagstaff: Which one do I need?

Migrate from neo-blessed: not one import

There is no controlroom/neo-blessed, for blessed's reason: the surface is too large to reproduce honestly. burgee migrate reports every neo-blessed site it can see, with "from": "neo-blessed" and a link to the section below, and rewrites none of them:

npx burgee migrate --dry-run --json

A site is reported only when its receiver came from neo-blessed in the same file, by require('neo-blessed'), import blessed from 'neo-blessed' or a destructured factory. The exit code stays 0, because nothing was refused. blessed's page has a whole screen moved, with what it prints in a pipe.

The mapping

neo-blessedcontrolroom
blessed.screen()open(runtime, { screen: 'alternate' })
blessed.box()a pane in a layout tree, holding a flagstaff component
blessed.list()flagstaff's tasks in a pane, for a list you show
screen.key([...], fn)an entry in a keymap, which is data, and onAction
screen.render()nothing: an update() repaints
screen.program.alternateBuffer()screen: 'alternate', left on every exit path
blessed.textbox()the input line: caique's line editor in a pane
mouse: true, on('click')nothing
blessed.textarea()nothing: a question asked once is caique's prompt

The full table, with listbar(), log() and destroy(), is blessed's.

Screen

blessed.screen(), new blessed.Screen() and blessed.program() become open(runtime, { screen: 'alternate' }), which takes the terminal only when there is one and opens a static screen everywhere else. screen: 'inline', the default, draws under the program's own output instead. See blessed's Screen section.

Box

box(), text(), element(), log() and layout() become panes: names in one layout tree of rows and columns with fixed, fractional and fit-to-content sizes, each drawing a flagstaff component. See blessed's Box section.

List

list() and listtable() you show become flagstaff's tasks in a pane. A list the user picks from has no pane component; a pick is caique's select prompt, outside the screen. listbar() becomes a pane over flagstaff's tabBar, kept in step with the screen's tab state. See blessed's List section.

Key handling

key(), onceKey(), unkey() and removeKey(), and every on() or once() whose event starts with key, become entries in a keymap that is plain data, { q: 'quit' }. The screen's tabs, focus and collapsed panes move through a reducer, onAction sees every action, and the hint line is generated from the same keymap. C-c is spelled ctrl+c. See blessed's Key handling section.

Render loop

Every render(), including box.screen.render(), is deleted rather than translated: an update() repaints through flagstaff's frame writer. See blessed's Render loop section.

Alternate screen

alternateBuffer() and normalBuffer(), on a program or on screen.program, become the screen: 'alternate' option, left on every exit path through closeout. See blessed's Alternate screen section.

What does not map

Out of scope, so a program that depends on these should stay on neo-blessed.

Mouse

enableMouse(), and on() with mouse, click, mousedown, mouseup, mousemove, mouseover, mouseout, wheeldown or wheelup. None is planned.

Text editing in a pane

textbox() maps to the input line, caique's line editor hosted in one pane (the input option of open()). textarea(), a multi-line editor inside the layout, does not map: prompts stay with caique, outside a pane. See blessed's section.

Legacy Windows consoles

controlroom handles no Windows legacy console quirks beyond what Node's own terminal handling does.

Is controlroom compatible with neo-blessed?

No, by design. There is no drop-in and nothing is graded, for neo-blessed or for blessed.

What you gain over neo-blessed

A static projection of every screen for a pipe, CI and a screen reader, NDJSON events on stderr under --json, no wait for a key that nobody can press, an inline mode under the program's own output, and one render engine shared with flagstaff. blessed's page has each. Nothing about neo-blessed's own output or size has been measured here.

When to switch from neo-blessed

Switch a screen if it has to work for a pipe, CI, a screen reader or an agent as well as for a person at a terminal. Stay on neo-blessed if you depend on the mouse or on multi-line editing inside the screen.

On this page