Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jupyter-xeus/cpp-terminal
C++ library for writing multiplatform terminal applications
https://github.com/jupyter-xeus/cpp-terminal
Last synced: about 1 month ago
JSON representation
C++ library for writing multiplatform terminal applications
- Host: GitHub
- URL: https://github.com/jupyter-xeus/cpp-terminal
- Owner: jupyter-xeus
- License: other
- Created: 2019-09-24T22:36:57.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-01-04T12:04:28.000Z (5 months ago)
- Last Synced: 2024-01-06T22:06:20.414Z (5 months ago)
- Language: C++
- Homepage: https://jupyter-xeus.github.io/cpp-terminal/
- Size: 1.09 MB
- Stars: 426
- Watchers: 14
- Forks: 50
- Open Issues: 38
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Lists
- awesome-cpp - cpp-terminal - Small header only C++ library for writing multiplatform terminal applications. [MIT] (CLI)
- fucking-awesome-cpp - cpp-terminal - Small header only C++ library for writing multiplatform terminal applications. [MIT] (CLI)
- awesome-cpp-completed - cpp-terminal - Small header only C++ library for writing multiplatform terminal applications. [MIT] (CLI)
- awesome-cpp - cpp-terminal - Small header only C++ library for writing multiplatform terminal applications. [MIT] (CLI)
- awesome-cpp - cpp-terminal - Small header only C++ library for writing multiplatform terminal applications. [MIT] (CLI)
- awesome-cpp - cpp-terminal - Small header only C++ library for writing multiplatform terminal applications. [MIT] (CLI)
- awesome-cpp-completed - cpp-terminal - Small header only C++ library for writing multiplatform terminal applications. [MIT] (CLI)
- awesome-cpp - cpp-terminal - Small header only C++ library for writing multiplatform terminal applications. [MIT] (CLI)
- awesome-cpp - cpp-terminal - Small header only C++ library for writing multiplatform terminal applications. [MIT] (CLI)
README
[//]: {#mainpage}
[![Linux CI](https://github.com/jupyter-xeus/cpp-terminal/actions/workflows/linux.yml/badge.svg)](https://github.com/jupyter-xeus/cpp-terminal/actions/workflows/linux.yml)
[![Windows CI](https://github.com/jupyter-xeus/cpp-terminal/actions/workflows/windows.yml/badge.svg)](https://github.com/jupyter-xeus/cpp-terminal/actions/workflows/windows.yml)
[![MacOS CI](https://github.com/jupyter-xeus/cpp-terminal/actions/workflows/macOS.yml/badge.svg)](https://github.com/jupyter-xeus/cpp-terminal/actions/workflows/macOS.yml)
[![docs](https://github.com/jupyter-xeus/cpp-terminal/actions/workflows/docs.yml/badge.svg)](https://github.com/jupyter-xeus/cpp-terminal/actions/workflows/docs.yml)
[![CodeQL](https://github.com/jupyter-xeus/cpp-terminal/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/jupyter-xeus/cpp-terminal/actions/workflows/codeql-analysis.yml)
[![pre-commit](https://github.com/jupyter-xeus/cpp-terminal/actions/workflows/pre-commit-check.yml/badge.svg)](https://github.com/jupyter-xeus/cpp-terminal/actions/workflows/pre-commit-check.yml)
[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/jupyter-xeus/cpp-terminal/master.svg)](https://results.pre-commit.ci/latest/github/jupyter-xeus/cpp-terminal/maset)`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.
## Hello World example
To write a simple Hello World program, all you need to do is:
```cpp
#include "cpp-terminal/terminal.hpp"
#includeint main()
{
std::cout << "Just including terminal.hpp activate \033[31mcolor\033[0m !" << std::endl;
}
```or
```cpp
#include "cpp-terminal/terminal.hpp"
#include "cpp-terminal/color.hpp"
#includeint main()
{
std::cout << Term::color_fg(Term::Color::Name::Red)<<"Hello world !"<
#includeint __stdcall WinMain(HINSTANCE hinst, HINSTANCE hprev, LPSTR cmdline, int show)
{
std::cout << Term::color_fg(Term::Color::Name::Red)<<"Hello world !"< 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
## 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)