gitmyhub

FTXUI

C++ ★ 10k updated 7d ago

:computer: C++ Functional Terminal User Interface. :heart:

A C++ library for building full-featured interactive apps that run inside a terminal window, with buttons, menus, inputs, animations, and mouse support, no graphical window or external dependencies required.

C++CMakeWebAssemblysetup: moderatecomplexity 3/5

FTXUI (Functional Terminal X User Interface) is a C++ library for building interactive interfaces that run entirely inside a terminal window. Instead of opening a graphical window, it draws layouts, buttons, menus, and animations using plain text characters directly in the console. Think of it as a toolkit for making a program look like a full app, but one that works over SSH, in CI logs, or anywhere a regular graphical interface would not.

The library is organized into three layers. The lowest layer handles raw pixels and colors in the terminal. On top of that sits a layout system where you arrange boxes, grids, and text elements much like you would arrange blocks on a webpage. The top layer provides interactive widgets such as buttons, checkboxes, input fields, sliders, and dropdown menus, all of which respond to keyboard and mouse input. You compose these pieces together in a style similar to how React components work on the web.

FTXUI ships with no external dependencies, so adding it to a project is straightforward. It works on Linux, macOS, Windows, and can even compile to WebAssembly so terminal apps run in a browser. The library supports Unicode and wide characters out of the box, meaning it handles languages that use multi-column glyphs without extra configuration. Animated elements and canvas-based drawing are also supported for projects that need motion or custom graphics.

A developer writing a command-line tool can use FTXUI to build a progress bar, a file browser, a configuration menu, or a real-time dashboard without reaching for a web framework or a graphical toolkit. The package is available through CMake FetchContent, vcpkg, Conan, Debian and Ubuntu packages, Arch Linux, and several other package managers, so it fits into most existing C++ build setups. Documentation is available in English, French, Spanish, Chinese, and Japanese, and live examples run directly in the browser.

Where it fits