A small, header-only C++ library for keyboard-driven console menus, checkboxes, text input, and progress bars.
SKCUI stands for Simple Keyboard Console UI. It includes Windows, Linux, and macOS input implementations without requiring a separate library build.
- C++20 or newer for the current component API (the bundled CMake example uses C++23)
- C++17 or newer for the stable 1.x function API
- An interactive Windows, Linux, or macOS terminal
- ANSI support for the current API's default screen clearing, or
SKCUILEGACYCONSOLEfor command-based clearing
| Package | API | C++ standard |
|---|---|---|
| Stable | component::Menu, component::Checkbox, and composable add-ons |
C++20+; bundled CMake example uses C++23 |
| Stable 1.x | skcui::menu and skcui::checkbox functions |
C++17+ |
Both packages include their own header, example, setup guide, and license. Development takes place in dev/skcui.hpp.
Copy release/stable/src/skcui.hpp into your project or add release/stable/src to your compiler's include path:
#include "skcui.hpp"
#include <iostream>
int main() {
skcui::component::Menu menu{{"Start", "Exit"}};
menu.add(skcui::component::Text{"Choose an option."});
menu.add(skcui::component::Input{"", "Name: "});
skcui::display::render(menu);
if (menu.selected >= 0 &&
menu.selected < static_cast<int>(menu.options.size())) {
std::cout << "Highlighted: " << menu.options[menu.selected] << '\n';
}
}Use Up/Down to navigate through options and input fields. Type to edit the focused input and use Backspace to delete. Enter on a menu option returns; Escape closes the UI. Checkboxes use Enter to toggle and Escape to return.
Text, separators, blank lines, input fields, and progress bars can be appended with add. See the API reference for stored input values, checkbox state, and progress-bar usage.
From the repository root in an x64 Visual Studio Developer Command Prompt:
cl /nologo /std:c++20 /EHsc /W4 /I release\stable\src release\stable\examples\full-example.cpp /Fe:skcui-example.exeOr use the bundled CMake project (CMake 3.20+ and a C++23 compiler):
cmake -S release/stable/examples -B build/stable
cmake --build build/stable --config ReleaseFor the C++17 package:
cl /nologo /std:c++17 /EHsc /W4 /I "release\stable 1.x\src" "release\stable 1.x\examples\full-example.cpp" /Fe:skcui-1x-example.exeassets/— demo GIFdev/skcui.hpp— development headerrelease/stable/— current component API and full examplerelease/stable 1.x/— C++17 function API and full exampledocs/— current API reference and historical release notes
See the release index for package details.
SKCUI is available under the MIT License.
