All Versions
31
Latest Version
Avg Release Cycle
45 days
Latest Release
-

Changelog History
Page 1

  • 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 🚚 > * 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 Conan.io #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
    • 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 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
  • v1.7.1 Changes

    January 30, 2019

    🏁 This version provides a quick patch for a (correct) warning from GCC 8 for the windows options code.

    • 🛠 Fix for Windows style option parsing #201
    • 👌 Improve add_subcommand when throwing an exception #204
    • 👍 Better metadata for Conan package #202
  • v1.7.0 Changes

    January 24, 2019

    📜 The parsing procedure now maps much more sensibly to complex, nested subcommand structures. Each phase of the parsing happens on all subcommands before moving on with the next phase of the parse. This allows several features, like required environment variables, to work properly even through subcommand boundaries.
    Passing the same subcommand multiple times is better supported. Several new features were added as well, including Windows style option support, parsing strings directly, and ignoring underscores in names. Adding a set that you plan to change later must now be done with add_mutable_set.

    • 🏁 Support Windows style options with ->allow_windows_style_options. #187 On by default on Windows. #190
    • ➕ Added parse(string) to split up and parse a command-line style string directly. #186
    • ➕ Added ignore_underscore and related functions, to ignore underscores when matching names. #185
    • 0️⃣ The default INI Config will now add quotes to strings with spaces #195
    • 0️⃣ The default message now will mention the help-all flag also if present #197
    • ➕ Added ->description to set Option descriptions #199
    • Mutating sets (introduced in Version 1.6) now have a clear add method, add_mutable_set*, since the set reference should not expire #200
    • 📜 Subcommands now track how many times they were parsed in a parsing process. count() with no arguments will return the number of times a subcommand was encountered. #179
    • 📜 Parsing is now done in phases: shortcurcuits, ini, env, callbacks, and requirements; all subcommands complete a phase before moving on. #179
    • 📜 Calling parse multiple times is now officially supported without clear (automatic). #179
    • ⬇️ Dropped the mostly undocumented short_circuit property, as help flag parsing is a bit more complex, and the default callback behavior of options now works properly. #179
    • ✅ Use the standard BUILD_TESTING over CLI11_TESTING if defined (CLI11_TESTING may eventually be removed) #183
    • ⚠ Cleanup warnings #191
    • Remove deprecated names: set_footer, set_name, set_callback, and set_type_name. Use without the set_ instead. #192

    Converting from CLI11 1.6:

    🚚 > - ->short_circuit() is no longer needed, just remove it if you were using it - raising an exception will happen in the proper place now without it.

    • ->add_set* becomes ->add_mutable_set* if you were using the editable set feature
    • footer, name, callback, and type_name must be used instead of the set_* versions (deprecated previously).
  • v1.6.2 Changes

    November 24, 2018

    ⚠ This version fixes some formatting bugs with help-all. It also adds fixes for several warnings, including an experimental optional error on Clang 7. Several smaller fixes.

    • 🛠 Fixed help-all formatting #163
      • Printing help-all on nested command now fixed (App)
      • Missing space after help-all restored (Default formatter)
      • More detail printed on help all (Default formatter)
      • Help-all subcommands get indented with inner blank lines removed (Default formatter)
      • detail::find_and_replace added to utilities
    • 🛠 Fixed CMake install as subproject with CLI11_INSTALL flag. #156
    • 🛠 Fixed warning about local variable hiding class member with MSVC #157
    • 🛠 Fixed compile error with default settings on Clang 7 and libc++ #158
    • 🛠 Fixed special case of --help on subcommands (general fix planned for 1.7) #168
    • Removing an option with links #179