All Versions
Latest Version
Avg Release Cycle
45 days
Latest Release

Changelog History
Page 1

  • v2.3 Changes

    This version adds a pre-compiled mode to CLI11, which allows you to precompile the library, saving time on incremental rebuilds, making CLI11 more competitive on compile time with classic compiled CLI libraries. The header-only mode is 0๏ธโƒฃ still default, and is not yet distributed via binaries.

    • โž• Add CLI11_PRECOMPILED as an option. #762
    • ๐Ÿ›  Bugfix: Include <functional> in FormatterFwd #727
    • ๐Ÿ›  Bugfix: Add missing Macros.hpp to Error.hpp #755
    • ๐Ÿ›  Bugfix: Fix subcommand callback trigger #733
    • ๐Ÿ›  Bugfix: Variable rename to avoid warning #734
    • Bugfix: split_program_name single file name error #740
    • ๐Ÿ›  Bugfix: Better support for min/max overrides on MSVC #741
    • ๐Ÿ›  Bugfix: Support MSVC 2022 #748
    • ๐Ÿ›  Bugfix: Support negated flag in config file #775
    • ๐Ÿ›  Bugfix: Better errors for some confusing config file situations #781
    • โช Backend: Restore coverage testing (lost with Travis CI) #747
  • v2.2 Changes

    ๐Ÿ†• New features include support for output of an empty vector, a summing option policy that can be applied more broadly, and an option to validate optional arguments to discriminate from positional arguments. A new validator to check 0๏ธโƒฃ for files on a default path is included to allow one or more default paths for ๐Ÿ”ง configuration files or other file arguments. A number of bug fixes and code ๐Ÿ— cleanup for various build configurations. Clean up of some error outputs and extension of existing capability to new types or situations.

    There is a possible minor breaking change in behavior of certain types which wrapped an integer, such as std::atomic<int> or std::optional<int> when used 0๏ธโƒฃ in a flag. The default behavior is now as a single argument value vs. summing 0๏ธโƒฃ all the arguments. The default summing behavior is now restricted to pure integral types, int64_t, int, uint32_t, etc. Use the new sum multi option โช policy to revert to the older behavior. The summing behavior on wrapper types was not originally intended.

    • โž• Add MultiOptionPolicy::Sum and refactor the add_flag to fix a bug when using std::optional<bool> as type. #709
    • โž• Add support for an empty vector result in TOML and as a default string. #660
    • Add .validate_optional_arguments() to support discriminating positional arguments from vector option arguments. #668
    • โž• Add CLI::FileOnDefaultPath to check for files on a specified default path. #698
    • ๐Ÿ”„ Change default value display in help messages from =XXXX to [XXXXX] to make it clearer. #666
    • ๐Ÿ‘ Modify the Range Validator to support additional types and clean up the error output. #690
    • ๐Ÿ›  Bugfix: The trigger on parse modifier did not work on positional argument.s #713
    • ๐Ÿ›  Bugfix: The single header file generation was missing custom namespace generation. #707
    • ๐Ÿ›  Bugfix: Clean up File Error handling in the argument processing. #678
    • ๐Ÿ›  Bugfix: Fix a stack overflow error if nameless commands had fallthrough. #665
    • ๐Ÿ›  Bugfix: A subcommand callback could be executed multiple times if it was a member of an option group. #666
    • ๐Ÿ›  Bugfix: Fix an issue with vectors of multi argument types where partial argument sets did not result in an error. #661
    • ๐Ÿ›  Bugfix: Fix an issue with type the template matching on C++20 and add some CI builds for C++20. #663
    • ๐Ÿ›  Bugfix: Fix typo in C++20 detection on MSVC. #706
    • ๐Ÿ›  Bugfix: An issue where the detection of RTTI being disabled on certain MSVC platforms did not disable the use of dynamic cast calls. #666
    • ๐Ÿ›  Bugfix: Resolve strict-overflow warning on some GCC compilers. #666
    • โœ… Backend: Add additional tests concerning the use of aliases for option groups in config files. #666
    • ๐Ÿ— Build: Add support for testing in meson and cleanup symbolic link generation. #701, #697
    • ๐Ÿ— Build: Support building in WebAssembly. #679
  • v2.1.3 Changes

    • ๐Ÿ”„ Change the way the default value is displayed in the included help text generation from =XXXXX to [XXXXX] to clean up some situations in which the text looked awkward and unclear #666
    • ๐Ÿ›  Fix a bug where a subcommand callback could be executed multiple times if it was a member of an option group #666
    • ๐Ÿ›  Fix an issue where the detection of RTTI being disabled on certain visual studio platforms did not disable the use of dynamic cast calls #666
    • โž• Add additional tests concerning the use of aliases for option groups in config files #666
    • โš  Resolve strict-overflow warning on some GCC compilers #666
  • v2.1.2 Changes

    • ๐Ÿ‘‰ Use main for the main branch of the repository #657
    • ๐Ÿ›  Bugfix(cmake): Enforce at least C++11 when using CMake target #656
    • ๐Ÿ— Build: Don't run doxygen and CTest includes if a submodule #656
    • ๐Ÿ— Build: Avoid a warning on CMake 3.22 #656
    • ๐Ÿ— Build: Support compiling the tests with an external copy of Catch2 #653
  • v2.1.1 Changes

    • ๐Ÿ A collision with min/max macros on Windows has been fixed. #642
    • โœ… Tests pass with Boost again #646
    • ๐Ÿณ Running the pre-commit hooks in development no longer requires docker for clang-format #647
  • v2.1 Changes

    The name restrictions for options and subcommands are now much looser, allowing a wider variety of characters than before, even spaces can be used (use quotes ๐Ÿ”ง to include a space in most shells). The default configuration parser was ๐Ÿ‘Œ improved, allowing your configuration to sit in a larger file. And option callbacks have a few new settings, allowing them to be run even if the option is ๐Ÿ“œ not passed, or every time the option is parsed.

    • Option/subcommand name restrictions have been relaxed. Most characters are now allowed. #627
    • ๐Ÿ“œ The config parser can accept streams, specify a specific section, and inline comment characters are supported #630
    • force_callback & trigger_on_parse added, allowing a callback to always run on parse even if not present or every time the option is parsed #631
    • ๐Ÿ›  Bugfix(cmake): Only add CONFIGURE_DEPENDS if CLI11 is the main project #633
    • ๐Ÿ›  Bugfix(cmake): Ensure the cmake/pkg-config files install to a arch independent path #635
    • ๐Ÿ›  Bugfix: The single header file generation was missing the include guard. #620
  • v2.0 Changes

    ๐Ÿ—„ This version focuses on cleaning up deprecated functionality, and some minor 0๏ธโƒฃ default changes. The config processing is TOML compliant now. Atomics and ๐Ÿ‘ complex numbers are directly supported, along with other container improvements. A new version flag option has finally been added. Subcommands are significantly ๐Ÿ‘Œ improved with new features and bugfixes for corner cases. This release contains โœ… a lot of backend cleanup, including a complete overhaul of the testing system and single file generation system.

    • Built-in config format is TOML compliant now #435
      • Support multiline TOML #528
      • Support for configurable quotes #599
      • Support short/positional options in config mode #443
    • ๐Ÿ‘ More powerful containers, support for %% separator #423
    • ๐Ÿ‘Œ Support atomic types #520 and complex types natively #423
    • โž• Add a type validator CLI::TypeValidator<TYPE> #526
    • โž• Add a version flag easily #452, with help message #601
    • ๐Ÿ‘Œ Support ->silent() on subcommands. #529
    • โž• Add alias section to help for subcommands #545
    • ๐Ÿ‘ Allow quotes to specify a program name #605
    • Backend: redesigned MakeSingleFiles to have a higher level of manual control, to support future features. #546
    • ๐Ÿšš Backend: moved testing from GTest to Catch2 #574
    • ๐Ÿ›  Bugfix: avoid duplicated and missed calls to the final callback #584
    • ๐Ÿ›  Bugfix: support embedded newlines in more places #592
    • ๐Ÿ›  Bugfix: avoid listing helpall as a required flag #530
    • ๐Ÿ›  Bugfix: avoid a clash with WINDOWS define #563
    • ๐Ÿ›  Bugfix: the help flag didn't get processed when a config file was required #606
    • ๐Ÿ›  Bugfix: fix description of non-configurable subcommands in config #604
    • ๐Ÿ— Build: support pkg-config #523

    Converting from CLI11 1.9

    ๐Ÿšš > - Removed deprecated set commands, use validators instead. #565 0๏ธโƒฃ > - The final "defaulted" bool has been removed, use ->capture_default_str() 0๏ธโƒฃ > instead. Use app.option_defaults()->always_capture_default() to set this for all future options. #597

    • Use add_option on a complex number instead of add_complex, which has ๐Ÿšš > been removed.
  • v1.9.1 Changes

    June 20, 2020

    ๐Ÿ›  This is a patch version that backports fixes from the development of 2.0.

    • ๐Ÿ‘Œ Support relative inclusion #475
    • ๐Ÿ›  Fix cases where spaces in paths could break CMake support #471
    • ๐Ÿ›  Fix an issue with string conversion #421
    • Cross-compiling improvement for #430
    • ๐Ÿ›  Fix option group default propagation #450
    • ๐Ÿ›  Fix for C++20 #459
    • ๐Ÿ‘Œ Support compiling with RTTI off #461
  • v1.9 Changes

    ๐Ÿ‘ Config file handling was revamped to fix common issues, and now supports reading TOML.

    โž• Adding options is significantly more powerful with support for things like std::tuple and std::array, including with transforms. Several new ๐Ÿ”ง configuration options were added to facilitate a wider variety of apps. GCC 4.7 ๐Ÿ‘ is no longer supported.

    • ๐Ÿ”จ Config files refactored, supports TOML (may become default output in 2.0) #362
    • โž• Added two template parameter form of add_option, allowing std::optional to be supported without a special import #285
    • ๐Ÿ‘ string_view now supported in reasonable places #300, #285
    • immediate_callback, final_callback, and parse_complete_callback added to support controlling the App callback order #292, #313
    • Multiple positional arguments maintain order if positionals_at_end is set. #306
    • ๐Ÿ‘ Pair/tuple/array now supported, and validators indexed to specific components in the objects #307, #310
    • ๐Ÿ‘ Footer callbacks supported #309
    • ๐Ÿ‘ Subcommands now support needs (including nameless subcommands) #317
    • More flexible type size, more useful add_complex #325, #370
    • โž• Added new validators CLI::NonNegativeNumber and CLI::PositiveNumber #342
    • ๐Ÿ‘ Transform now supports arrays #349
    • Option groups can be hidden #356
    • Add CLI::deprecate_option and CLI::retire_option functions #358
    • 0๏ธโƒฃ More flexible and safer Option default_val #387
    • Backend: Cleaner type traits #286
    • โšก๏ธ Backend: File checking updates #341
    • Backend: Using pre-commit to format, checked in GitHub Actions #336
    • Backend: Clang-tidy checked again, CMake option now CL11_CLANG_TIDY #390
    • โš  Backend: Warning cleanup, more checks from klocwork #350, Effective C++ #354, clang-tidy #360, CUDA NVCC #365, cross compile #373, sign conversion #382, and cpplint #400
    • ๐Ÿ“„ Docs: CLI11 Tutorial now hosted in the same repository #304, #318, #374
    • ๐Ÿ›  Bugfix: Fixed undefined behavior in checked_multiply #290
    • ๐Ÿ›  Bugfix: ->check() was adding the name to the wrong validator #320
    • ๐Ÿ›  Bugfix: Resetting config option works properly #301
    • ๐Ÿ›  Bugfix: Hidden flags were showing up in error printout #333
    • ๐Ÿ›  Bugfix: Enum conversion no longer broken if stream operator added #348
    • ๐Ÿ‘ท Build: The meson build system supported #299
    • ๐Ÿ— Build: GCC 4.7 is no longer supported, due mostly to GoogleTest. GCC 4.8+ is now required. #160
    • ๐Ÿ‘ท Build: Restructured significant portions of CMake build system #394

    Converting from CLI11 1.8

    ๐Ÿ—„ > - Some deprecated methods dropped

    • add_set* should be replaced with ->check/->transform and CLI::IsMember since 1.8 0๏ธโƒฃ > - get_defaultval was replaced by get_default_str in 1.8 ๐Ÿšš > - The true/false 4th argument to add_option is expected to be removed in 0๏ธโƒฃ > 2.0, use ->capture_default_str() since 1.8
  • v1.8.0 Changes

    May 20, 2019

    Set handling has been completely replaced by a new backend that works as a Validator or Transformer. This provides a single interface instead of the 16 different functions in App. It also allows ordered collections to be used, custom functions for filtering, and better help and error messages. You can also use a collection of pairs (like std::map) to transform the match into an output. Also new are inverted flags, which can cancel or reduce the count of flags, and can also support general flag types. A new add_option_fn lets you more easily program CLI11 options with the types you choose. Vector options now support a custom separator. Apps can now be composed with unnamed subcommand support. The final bool "defaults" flag when creating options has been replaced by ->capture_default_str() (ending an old limitation in construction made this possible); the old method is still available but may be removed in future versions.

    • Replaced default help capture: .add_option("name", value, "", True) becomes .add_option("name", value)->capture_default_str() #242
    • Added .always_capture_default() #242
    • ๐Ÿ†• New CLI::IsMember validator replaces set validation #222
    • ๐Ÿ‘ IsMember also supports container of pairs, transform allows modification of result #228
    • โž• Added new Transformers, CLI::AsNumberWithUnit and CLI::AsSizeValue #253
    • Much more powerful flags with different values #211, general types #235
    • ๐Ÿ‘ add_option now supports bool due to unified bool handling #211
    • ๐Ÿ‘Œ Support for composable unnamed subcommands #216
    • Reparsing is better supported with .remaining_for_passthrough() #265
    • Custom vector separator using ->delimiter(char) #209, #221, #240
    • Validators added for IP4 addresses and positive numbers #210 and numbers #262
    • Minimum required Boost for optional Optionals has been corrected to 1.61 #226
    • Positionals can stop options from being parsed with app.positionals_at_end() #223
    • โž• Added validate_positionals #262
    • ๐Ÿ“œ Positional parsing is much more powerful #251, duplicates supported []#247]
    • Validators can be negated with ! #230, and now handle tname functions #228
    • ๐Ÿ‘ Better enum support and streaming helper #233 and #228
    • โš  Cleanup for shadow warnings #232
    • ๐Ÿ‘ Better alignment on multiline descriptions #269
    • ๐Ÿ‘ Better support for aarch64 #266
    • โœ… Respect BUILD_TESTING only if CLI11 is the main project; otherwise, CLI11_TESTING must be used #277
    • โฌ‡๏ธ Drop auto-detection of experimental optional and boost::optional; must be enabled explicitly (too fragile) #277 #279

    Converting from CLI11 1.7:

    • .add_option(..., true) should be replaced by .add_option(...)->capture_default_str() or app.option_defaults()->always_capture_default() can be used
    • app.add_set("--name", value, {"choice1", "choice2"}) should become app.add_option("--name", value)->check(CLI::IsMember({"choice1", "choice2"}))
    • The _ignore_case version of this can be replaced by adding CLI::ignore_case to the argument list in IsMember
    • The _ignore_underscore version of this can be replaced by adding CLI::ignore_underscore to the argument list in IsMember
    • The _ignore_case_underscore version of this can be replaced by adding both functions listed above to the argument list in IsMember
    • If you want an exact match to the original choice after one of the modifier functions matches, use ->transform instead of ->check
    • The _mutable versions of this can be replaced by passing a pointer or shared pointer into IsMember
    • An error with sets now produces a ValidationError instead of a ConversionError