C++ library for writing multiplatform terminal applications
C++ library for writing multiplatform terminal applications
CPP-Terminal is a small and dependency-free C++ library for writing platform independent terminal-based applications. It follows the "Zero-overhead principle" and limits externally included files to the C++ STL. Being cross-platform we are currently supporting Windows, Linux and MacOS and are providing an unified API across all platforms. Our main features are consisting of Colors, Keyboard input, terminal resize handling, as well as other common terminal functionality. It's also possible to open a managed terminal from a windows GUI application.
To write a simple Hello World program, all you need to do is:
#include "cpp-terminal/terminal.hpp"
#include
int main()
{
std::cout
int __stdcall WinMain(HINSTANCE hinst, HINSTANCE hprev, LPSTR cmdline, int show)
{
std::cout Windows versions prior Windows 10 are missing the Win32 API functionality for entering the "raw mode" and therefore
> won't work. They are also lacking ANSI support. See #173 for adding support to prior windows versions for MSVC / Win32.
## How to use
Adding CPP-Terminal to your own project is really easy. We have collected various ways with easy
how-to's [in our documentation](https://github.com/jupyter-xeus/cpp-terminal/wiki/Adding-CPP-Terminal-to-your-ptoject).
## Documentation
Online
PDF
## Contributing
Contributing to CPP-Terminal is highly appreciated and can be done in more ways than code. Extending it's functionality,
reporting or fixing bugs and extending the documentations are just a few of them.
## License
CPP-Terminal is licensed under the terms
of [the MIT License](https://github.com/jupyter-xeus/cpp-terminal/blob/master/LICENSE) by Ondřej Čertík.
## Projects using cpp-terminal
- [Lime](https://github.com/TobiasWallner/Lime)
## Similar Projects
### Colors
Libraries to handle color output.
C++:
- [rang](https://github.com/agauniyal/rang)
### Drawing
JavaScript:
- [node-drawille](https://github.com/madbence/node-drawille)
### Prompt
Libraries to handle a prompt in terminals.
C and C++:
- [readline](https://tiswww.case.edu/php/chet/readline/rltop.html)
- [libedit](http://thrysoee.dk/editline/)
- [linenoise](https://github.com/antirez/linenoise)
- [replxx](https://github.com/AmokHuginnsson/replxx)
Python:
- [python-prompt-toolkit](https://github.com/prompt-toolkit/python-prompt-toolkit)
### General TUI libraries
C and C++:
- [curses](https://en.wikipedia.org/wiki/Curses_%28programming_library%29) and [ncurses](https://www.gnu.org/software/ncurses/ncurses.html)
- [Newt](https://en.wikipedia.org/wiki/Newt_(programming_library))
- [termbox](https://github.com/nsf/termbox)
- [FTXUI](https://github.com/ArthurSonzogni/FTXUI)
- [ImTui](https://github.com/ggerganov/imtui)
Python:
- [urwid](http://urwid.org/)
- [python-prompt-toolkit](https://github.com/prompt-toolkit/python-prompt-toolkit)
- [npyscreen](http://www.npcole.com/npyscreen/)
- [curtsies](https://github.com/bpython/curtsies)
Go:
- [gocui](https://github.com/jroimartin/gocui)
- [clui](https://github.com/VladimirMarkelov/clui)
- [tview](https://github.com/rivo/tview)
- [termbox-go](https://github.com/nsf/termbox-go)
- [termui](https://github.com/gizak/termui)
- [tcell](https://github.com/gdamore/tcell)
Rust:
- [tui-rs](https://github.com/fdehau/tui-rs)
JavaScript:
- [blessed](https://github.com/chjj/blessed) and [blessed-contrib](https://github.com/yaronn/blessed-contrib)No open issues yet, or sync has not completed.