nctetris running in the KDE Konsole.
|Original author(s)||Nick Black|
|Initial release||November 30, 2019|
|Written in||C (C++/Rust/Python wrappers are available)|
|Type||Textual widget toolkit|
notcurses, as in not ncurses, is a thread-safe library for building complex user interfaces for modern terminal emulators. It is written in C with C++ safe headers. It can be used to create games, image viewers and a lot more. The library comes bundled with a tetris game, a image viewer and a "demo" application that shows of its capabilities.
notcurses can be used to make C++, Rust and Python applications thanks to notcurses wrappers for those programming languages.
- notcurses supports 24-bit 8bpc RGB color. Colors are quantize down for indexed palette terminals.
- notcurses supports transparency and semi-transparency (a terminal with support is obviously required)
- notcurses has full Unicode support, including bidirectional text and glyphs
- it supports images using OpenImageIO and, in theory, video via ffmpeg
- it support fade/in and fade/out of text-blocks / sub-regions
- it supports blitters, rotation and scaling
The notcurses library comes bundled with several programs. Some distributions opt to ship them in a separate package called
notcurses-utils though they aren't really utilities. The included programs are, as of version 2.5.0:
||A ls that shows image previews in terminals|
||A neofetch/UwUfetch like program that shows information about your distribution, kernel, terminal and a few other things|
||A simple multimedia player that lets you view images, and supposedly videos, in terminals. The video output would be similar to mpv's caca output driver (|
||A tetris clone. You can move left and right with h and l or the ← and → arrow keys, rotate the pieces withand and move pieces down with with or the arrow key.|
||A demo-program that shows of the various capabilities the notcures library has to offer|
||Tool for decoding and printing keystrokes|
The primary developer has written a 153 pages long book about notcurses titled "Hacking the Planet (with Notcurses) - A Guide to TUIs and Character Graphics". The e-book edition is available for free at https://nick-black.com/htp-notcurses.pdf.
Notcurses developer Nick Black gave a 15 minute talk titled Notcurses: Making terminals do things that were never intended at LibrePlanet 2021.
There is a pretty complete API reference guide available.
Availability And Support
Most GNU/Linux distributions have a version of notcurses in their repositories. It is safe to assume that distributions will be able to include your program if you write one with a interface using the notcurses library.
notcurses applications run fine in most modern terminal emulators including konsole, xfce4-terminal and even xterm. It doesn't work very well with screen multiplexers like tmux and screen.
- Dankwiki:Notcurses (the developers own wiki-page aboutNotcurses]