{"id":26372644,"url":"https://github.com/maipa01/mcui","last_synced_at":"2026-04-11T20:35:40.419Z","repository":{"id":282634231,"uuid":"947870194","full_name":"MAIPA01/mcui","owner":"MAIPA01","description":"mcui (MAIPA's Console User Interface) is a C++ library designed to simplify the creation of console-based menus and input fields. It provides a structured way to build interactive terminal interfaces with minimal effort.","archived":false,"fork":false,"pushed_at":"2025-03-15T22:43:34.000Z","size":19,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-15T23:25:14.017Z","etag":null,"topics":["bsd-3-clause","console","cpp","cpp-library","cpp20","header-only","open-source","ui","user-interface"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MAIPA01.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-13T11:29:19.000Z","updated_at":"2025-03-15T22:43:38.000Z","dependencies_parsed_at":"2025-03-15T23:25:16.477Z","dependency_job_id":"13ceda5f-b4b4-4d9a-8c29-e75be34f3393","html_url":"https://github.com/MAIPA01/mcui","commit_stats":null,"previous_names":["maipa01/mcui"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MAIPA01%2Fmcui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MAIPA01%2Fmcui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MAIPA01%2Fmcui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MAIPA01%2Fmcui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MAIPA01","download_url":"https://codeload.github.com/MAIPA01/mcui/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243955799,"owners_count":20374373,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bsd-3-clause","console","cpp","cpp-library","cpp20","header-only","open-source","ui","user-interface"],"created_at":"2025-03-17T01:18:29.933Z","updated_at":"2025-10-26T23:32:01.250Z","avatar_url":"https://github.com/MAIPA01.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mcui - MAIPA's Console User Interface\n\n## About\n\n**mcui** (MAIPA's Console User Interface) is a C++ library designed to simplify the creation of console-based menus and input fields. It provides a structured way to build interactive terminal interfaces with minimal effort.\n\n## Features\n\n- **Menu System**: Easily create hierarchical console menus with selectable options.\n- **User Input Handling**: Prompt users for input with a message.\n- **Custom Views**: Define your own menu display style.\n- **Header-Only**: Simple integration without the need for compilation.\n- **Cross-Platform**: Works on **Windows, macOS, and Linux**.\n- **C++20 Compatible**: Utilizes modern C++ features.\n\n## Requirements\n\n- **C++ Standard**: Requires **C++20** or later.\n- **Dependencies**: Uses [**mstd**](https://github.com/MAIPA01/mstd) (Maipa’s Standard Library).\n\n## Installation\n\nNo additional setup is required apart from including **mcui** headers and ensuring [**mstd**](https://github.com/MAIPA01/mstd) is available.\n\n## Usage Examples\n\n### Creating a Simple Menu\n\n```cpp\n#include \u003cmcui/mcui.hpp\u003e\n#include \u003ciostream\u003e\n\nusing namespace std;\nusing namespace mcui;\n\nvoid menu2OptionFunc() {\n    cout \u003c\u003c \"Menu 2 Option\" \u003c\u003c endl;\n}\n\nMenuExitState menuOptionFunc() {\n    return MenuExitState::Exit;\n}\n\nint main() {\n    MenuBuilder::makeStandardMenu(\"Menu\", true, false, true,\n        MenuBuilder::makeStandardMenu(\"Menu2\", true, true, false,\n            MenuBuilder::makeOption(\"Menu2 Option 1\", \u0026menu2OptionFunc)\n        ),\n        MenuBuilder::makeOption(\"Exit\", \u0026menuOptionFunc)\n    )-\u003erun();\n}\n```\n\n### Creating a Simple Input Field\n\n```cpp\n#include \u003cmcui/mcui.hpp\u003e\n#include \u003ciostream\u003e\n\nusing namespace std;\nusing namespace mcui;\n\nint main() {\n    std::string name = InputBuilder::makeInput(\"Name: \"s)-\u003erun();\n    cout \u003c\u003c \"Hello \" \u003c\u003c name \u003c\u003c endl;\n}\n```\n\n### Customizing Menu Appearance\n\nYou can define your own menu rendering style by implementing a custom **View** structure:\n\n```cpp\nstruct ViewSample {\n    static void printView(const std::string\u0026 menu_name,\n        const mstd::ordered_map\u003cstd::string, MenuElementSPtr\u003e\u0026 elements);\n};\n```\n\n## License\n\nThis project is licensed under the **BSD 3-Clause License with Attribution Requirement**. See the [`LICENSE`](./LICENSE) file for more details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaipa01%2Fmcui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaipa01%2Fmcui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaipa01%2Fmcui/lists"}