Curses
lastmod 2025-08-19created 2015-03-055 edits
is a terminal control library for Unix-like operating systems that enables building text user interface (TUI) applications.
The name comes from "cursor optimization" (cusor optimization). It is a library of commands that manage an application's display on character-cell terminals (such as the VT100).
Overview
The curses API is described in several places. Most curses implementations use a database that can describe the capabilities of thousands of different terminals. Some implementations, such as PDCurses, use specialized device drivers rather than a terminal database. Most implementations use terminfo, and some use termcap. curses has the advantages of backward compatibility with all cell terminals and simplicity. For applications that do not need bitmap graphics or multiple fonts, an interface implementation using curses is generally much simpler and faster than one using an X toolkit.
Using curses, programmers can write text-based applications without writing for a specific terminal type. The curses library on the running system sends the appropriate control characters based on the terminal type.