A single-header C++11 command line parser with a simple interface and rich feature set.
CLI11 is a command line parsing library for C++11 and beyond. It enables developers to define, parse, and validate command line arguments with minimal code, supporting flags, options, subcommands, and configuration files. It solves the problem of writing verbose, error-prone argument parsing code by providing a clean, intuitive API.
C++ developers building command line tools, applications, or frameworks that require robust argument parsing, especially those targeting modern C++ standards and cross-platform compatibility.
Developers choose CLI11 for its simplicity, zero dependencies, and comprehensive feature set in a single header file. It balances ease of use with advanced capabilities like subcommands, validators, and configuration support, making it a versatile alternative to heavier libraries.
CLI11 is a command line parser for C++11 and beyond that provides a rich feature set with a simple and intuitive interface.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
CLI11 is a single-file header with no external dependencies, making integration as simple as copying a file into your project, as highlighted in the installation section.
Defining options and flags requires minimal boilerplate, with a clean API that reduces parsing code to just a few lines, as shown in the usage examples.
It supports advanced capabilities like nested subcommands, built-in validators, and configuration file reading, covering most CLI needs without extra libraries.
Tested on Linux, macOS, and Windows with major compilers like GCC, Clang, and MSVC, ensuring consistent behavior across different development environments.
The README admits that autocomplete is not supported and partial option matching is limited, which can reduce user-friendliness for interactive or complex tools.
While modern, this excludes projects stuck on older C++ standards like C++98, forcing teams to upgrade or choose alternative parsers with broader compatibility.
For very simple use cases, the extensive option modifiers and validation system might introduce unnecessary overhead compared to lighter, more minimal parsers.