cli-fancy (nice looking cli apss)
Go to file
2024-12-16 22:13:20 +01:00
.vscode Initial Commit 2024-12-15 19:53:40 +01:00
include Add Color and Design Disable 2024-12-16 12:03:45 +00:00
LICENSE Initial Commit 2024-12-15 19:53:40 +01:00
README.md Fix Example 2024-12-16 22:13:20 +01:00

cli-fancy library

Single header library for cli apps

Used in ctrff and npi-build

Example

#include <cli-fancy.hpp>

void ShowString(const cf7::command::ArgumentList& data) {
  std::cout << "Input String was: " << cf7::command::GetArg(data, "input") << std::endl;
}

int main(int argc, char* argv[]) {
  cf7::arg_mgr mgr(argc, argv);
  mgr.SetAppInfo("test", "1.0.0");
  mgr.AddCommand(
      cf7::command("show", "Show an input String")
          .AddSubEntry(cf7::command::sub("i", "input", "Input String", true))
          .SetFunction(ShowString));
  mgr.Execute();
  return 0;
}