{"repo":"termbox/termbox2","free":true,"listed":false,"github":"https://github.com/termbox/termbox2","clone":"git clone https://github.com/termbox/termbox2.git","description":"terminal I/O library","language":"C","stars":748,"topics":["terminal","terminfo","termcap","ncurses","curses","tui"],"license":"MIT","category":"cli-tools","readme_excerpt":"termbox2 termbox2 is a terminal I/O library for creating TUIs. It is a slim alternative to the ubiquitous ncurses library. Unlike ncurses, it has a tighter API, and comes with built-in support for popular terminals if a terminfo db is not present on the system. Compared to the original termbox, it retains a simple API and no dependencies beyond libc, and adds stricter error checking, more efficient escape sequence parsing, opt-in support for 32-bit color, extended grapheme clusters, code gen for built-in escape sequences, a test suite, and more. termbox2 is organized as a single file header library, though it is possible to compile it as a stand-alone shared or static library. Synopsis API The basic API is pretty self-explanatory. Consult the header file itself for the complete API and documentation. How to use termbox2 As mentioned above, there are two options: 1. Copy (or git submodule ) termbox2.h into your C project. As normal, include the header file wherever you want to use tb functions, but also be sure to #define TB IMPL in exactly one of your source files. (This is a common pattern for single file header libraries.) Ensure that feature test macros DEFAULT SOURCE and XOPEN SOURCE are defined (either by defining them via compiler flags or including termbox2.h first[^1]). 2. Build termbox2 as a library (either make libtermbox2.so or make libtermbox2.a ) and link as normal. Make sure the compile-time options remain the same for libtermbox2 and your application. (Alternat","default_branch":null,"files":null,"tree":[],"storefront":"/r/termbox","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/termbox/termbox2/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}