373 Commits

Author SHA1 Message Date
allcontributors[bot]
b874409ff0 📝 Add mochaaP as a contributor for platform (#1281)
Adds @mochaaP as a contributor for platform.

This was requested by phlptp [in this
comment](https://github.com/CLIUtils/CLI11/pull/1280#issuecomment-3761350721)

[skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2026-01-16 17:39:39 -08:00
Philip Top
20e9132dfc Extras configuration (#1270)
Allow more control over how extras are interpreted. Specifically
allowing some assumptions to be made about arguments to unrecognized
options. With `CLI::ExtrasMode::AssumeMultipleArguments` all positional
arguments following an unrecognized option will be considered extra as
well even if there are open positional arguments. With
`CLI::ExtrasMode::AssumeSingleArgument` a positional argument following
an unrecognized option will also be considered unrecognized and go into
the `remaining()` bin.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-01-02 10:05:46 -08:00
allcontributors[bot]
457839d482 📝 Add jaefunk as a contributor for doc (#1276)
Adds @jaefunk as a contributor for doc.

This was requested by phlptp [in this
comment](https://github.com/CLIUtils/CLI11/pull/1275#issuecomment-3694056410)

[skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2025-12-27 10:00:03 -08:00
jaefunk
f8ece0c65d docs: fix typos in README (#1275)
This PR corrects minor typos in the README documentation.
2025-12-27 09:59:44 -08:00
allcontributors[bot]
fc126de5f7 📝 Add The0Dev as a contributor for code (#1274)
Adds @The0Dev as a contributor for code.

This was requested by phlptp [in this
comment](https://github.com/CLIUtils/CLI11/pull/1273#issuecomment-3692934734)

[skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2025-12-27 07:50:33 -08:00
Philip Top
fe8f9f7db3 prefix_command tests and improvements (#1266)
adding a PrefixCommandMode option to the prefix_command to allow
specification of a separator and catch other errors

Addresses #1264

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-12-17 06:26:16 -08:00
Philip Top
c9921127d7 Update some documentation and book chapters (#1250)
Update documentation related to formatters and some other recent
updates.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-11-09 05:55:23 -08:00
Philip Top
3a69ed51c0 option name formatting in help (#1247)
Add some controls to manipulate option string formatting, including
disabling the default values, disabling default flag values, disabling
type names.

Fixes #857

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-11-03 04:55:14 -08:00
Philip Top
3a1946e965 update precommit markdownlint and add permissions on workflow files (#1246)
test out some precommit hooks and other updates

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-10-28 07:26:18 -07:00
Philip Top
8ddadd7cea patch release for recent fixes (#1241)
updates for patch release

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-10-25 12:53:47 -07:00
allcontributors[bot]
4d78aa30d6 📝 Add LunarWatcher as a contributor for doc (#1240)
Adds @LunarWatcher as a contributor for doc.

This was requested by phlptp [in this
comment](https://github.com/CLIUtils/CLI11/pull/1239#issuecomment-3434894391)

[skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2025-10-23 04:25:08 -07:00
Olivia (Zoe)
1d94f2bbf9 Fix incorrect links to validator examples (#1239)
8c77664bd0 added the files and the links,
but the links were off by one character and therefore don't work. This
PR fixes them
2025-10-22 20:02:36 -07:00
Philip Top
3914826ef8 Version update (#1219)
update changelog for 2.6 release

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-10-20 06:07:51 -07:00
allcontributors[bot]
3b84cbae64 📝 Add TheodorNEngoy as a contributor for infra (#1231)
Adds @TheodorNEngoy as a contributor for infra.

This was requested by phlptp [in this
comment](https://github.com/CLIUtils/CLI11/pull/1225#issuecomment-3418608931)

[skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2025-10-18 10:48:50 -07:00
Philip Top
3388e8ea49 Help spacing (#1229)
Fix the help spacing and double printing of footers in certain
circumstances

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-10-18 08:45:09 -07:00
Volker Christian
0104dceb17 Option callback priority v2 (#1226)
Extension allowing all possible priority combinations.
Add a field callback_priority to OptionBase.

---------

Co-authored-by: Philip Top <phlptp@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-10-18 06:52:55 -07:00
allcontributors[bot]
89dc726939 📝 Add romanholidaypancakes as a contributor for code (#1208)
Adds @romanholidaypancakes as a contributor for code.

This was requested by phlptp [in this
comment](https://github.com/CLIUtils/CLI11/pull/1206#issuecomment-3292000117)

[skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2025-09-15 07:34:09 -07:00
Philip Top
be52eb6972 Contrib update (#1205)
update contributors
2025-09-08 05:24:24 -07:00
Philip Top
c8dc5f627a add permission validators as an Extra Validator (#1203)
an update of #250 

Fixes #249

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-09-08 05:16:49 -07:00
Philip Top
8c77664bd0 move some of the Validators to an ExtraValidators file (#1192)
Rework some of the validator locations, add documentation, and fix some
lingering issues with validators.
The extra will will enable additions of some new validators and reduce
compile times for those that are not needed.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-09-01 05:13:21 -07:00
Philip Top
5602f2b438 add an example of finding close matches (#1152)
continue discussion on #1149 
Adds subcommand prefix matching as a modifier to CLI.  
Adds an example of close matching logic for further exploration.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-05-21 19:39:00 -07:00
allcontributors[bot]
8fa8a0fa0c 📝 Add ComixHe as a contributor for code (#1137)
Adds @ComixHe as a contributor for code.

This was requested by phlptp [in this
comment](https://github.com/CLIUtils/CLI11/pull/1132#issuecomment-2702742598)

[skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2025-03-05 20:34:07 -08:00
allcontributors[bot]
38e370f671 📝 Add gblanco92 as a contributor for code (#1131)
Adds @gblanco92 as a contributor for code.

This was requested by phlptp [in this
comment](https://github.com/CLIUtils/CLI11/pull/1129#issuecomment-2694425412)

[skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2025-03-04 06:53:37 -08:00
Philip Top
4160d259d9 update version and changelog for 2.5 release (#1121)
update readme, changelog, and version for 2.5 release

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
2025-02-27 04:25:31 -08:00
allcontributors[bot]
a48f049365 📝 Add jmarrec as a contributor for code (#1127)
Adds @jmarrec as a contributor for code.

This was requested by phlptp [in this
comment](https://github.com/CLIUtils/CLI11/pull/1122#issuecomment-2682507198)

[skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Philip Top <phlptp@gmail.com>
2025-02-25 16:19:35 -08:00
allcontributors[bot]
091d4cfb3b 📝 Add nshaheed as a contributor for platform (#1126)
Adds @nshaheed as a contributor for platform.

This was requested by phlptp [in this
comment](https://github.com/CLIUtils/CLI11/pull/1122#issuecomment-2682506808)

[skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Philip Top <phlptp@gmail.com>
2025-02-25 14:10:38 -08:00
allcontributors[bot]
8d5d0967a0 📝 Add j-rivero as a contributor for platform (#1124)
Adds @j-rivero as a contributor for platform.

This was requested by phlptp [in this
comment](https://github.com/CLIUtils/CLI11/pull/1122#issuecomment-2682497166)

[skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Philip Top <phlptp@gmail.com>
2025-02-25 13:37:15 -08:00
allcontributors[bot]
8fcbddadd3 📝 Add krico as a contributor for code (#1125)
Adds @krico as a contributor for code.

This was requested by phlptp [in this
comment](https://github.com/CLIUtils/CLI11/pull/1122#issuecomment-2682503164)

[skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2025-02-25 12:00:31 -08:00
allcontributors[bot]
65220bd28a 📝 Add jsoref as a contributor for doc (#1123)
Adds @jsoref as a contributor for doc.

This was requested by phlptp [in this
comment](https://github.com/CLIUtils/CLI11/pull/1122#issuecomment-2682493678)

[skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2025-02-25 08:34:26 -08:00
allcontributors[bot]
6193e56935 📝 Add LostInCompilation as a contributor for code (#1122)
Adds @LostInCompilation as a contributor for code.

This was requested by phlptp [in this
comment](https://github.com/CLIUtils/CLI11/pull/1121#issuecomment-2682455232)

[skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2025-02-25 08:33:53 -08:00
Josh Soref
ef50bb35c3 Spelling (#1101)
This PR corrects misspellings identified by the [check-spelling
action](https://github.com/marketplace/actions/check-spelling) (which is
an evolution of the script I used ages ago when I first made a PR
here...).

The misspellings have been reported at
https://github.com/jsoref/CLI11/actions/runs/12194174338#summary-34017587518

The action reports that the changes in this PR would make it happy:
https://github.com/jsoref/CLI11/actions/runs/12194174680#summary-34017588281

---------

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-12-22 14:03:24 -08:00
pre-commit-ci[bot]
b71106f870 chore(deps): pre-commit.ci autoupdate (#1104)
<!--pre-commit.ci start-->
updates:
- [github.com/pre-commit/mirrors-clang-format: v19.1.4 →
v19.1.5](https://github.com/pre-commit/mirrors-clang-format/compare/v19.1.4...v19.1.5)
<!--pre-commit.ci end-->

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-12-22 13:57:27 -08:00
Henry Schreiner
d9473a486b feat: increase min CMake to 3.10 (#1084)
Close https://github.com/CLIUtils/CLI11/issues/1082.

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
2024-11-15 05:40:46 -08:00
Philip Top
5a03ee5838 Allow non standard option names like -option (#1078)
This has been bounced around for a couple years now 

#474 and a few others have expressed desire to work with non-standard
option names. We have been somewhat resistant to that but I think it can
be done now. This PR adds a modifier `allow_non_standard_option_names()`
It is purposely long, it is purposely off by default. But what it does
is allow option names with a single `-` to act like a short option name.
With this modifier enabled no single letter short option names are
allowed to start with the same letter as a non-standard names. For
example `-s` and `-single` would not be allowed.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Henry Schreiner <HenrySchreinerIII@gmail.com>
2024-10-23 05:14:29 -07:00
Philip Top
ca66827263 Subcommand fallthrough (#1073)
Add modifier for subcommands to restrict subcommands falling through to
parent.
This will resolve #1022

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-10-09 04:46:45 -07:00
Philip Top
f7600953d4 add a round trip test to the fuzzer (#1060)
This is the next phase of the fuzzer. It runs a round trip and makes
sure that the config files generated by the app will load into the same
results, to test full round trip on the config files.

Issues fixed
- fix a bug in the string escape code caught by initial round trip tests
- resolve inconsistencies in handling of {} for empty vector indication
between config and cli parsing

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-09-23 06:13:47 -07:00
Uilian Ries
f4f225d9a2 docs: Add Conan installation in the documentation (#1061)
Greetings, fellow CLI11 community!

We have just added the latest version of cli11 to [Conan
Center](https://conan.io/center/recipes/cli11?version=2.4.2) and thought
it would be a nice addition to include instructions on how to install
CLI11 via Conan in the book folder.

Please let me know if this is okay, or if you would prefer it placed
elsewhere.

**UPDATE**: Some extra information to be more clear about the used
command line and links:

I did not mention how to install/configure Conan, because both links to
conan.io and conan-center-index has all Conan documentation updated. For
instance: https://conan.io/downloads

The latest version of CLI11 available in Conan Center is 2.4.2:

- https://conan.io/center/recipes/cli11?version=2.4.2

or, can be found by running the conan command:

    conan search "cli11"

The command `conan install --requires="cli11/[*]" --build=missing`
means:

* conan install: Install a package from a remote. By default, it points
to the official Conan Center
* --requires="cli11/[*]": Install the latest version of CLI11 available
in Conan Center
* --build=missing: In case not finding a pre-built package compatible,
build it from source then.


Regards!

---------

Signed-off-by: Uilian Ries <uilianries@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-08-10 15:17:38 -07:00
Philip Top
b038a403ca Issue cleanup (#1059)
Fix docstring related to #1052 
Fix config_to_string with defaults #1007

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-07-29 05:32:11 -07:00
pre-commit-ci[bot]
3afddf3578 chore(deps): pre-commit.ci autoupdate (#1051)
<!--pre-commit.ci start-->
updates:
- [github.com/pre-commit/mirrors-clang-format: v18.1.5 →
v18.1.6](https://github.com/pre-commit/mirrors-clang-format/compare/v18.1.5...v18.1.6)
<!--pre-commit.ci end-->

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-06-11 12:35:37 -04:00
Philip Top
08d840bfbe Group merge (#1039)
This PR adds a mechanism to hide groups but have their options visible
as part of the parent.
This works for option group names starting with a '+'

for example 
```
 CLI::App app;

    bool flag = false;
    std::optional<bool> optional_flag = std::nullopt;

    app.add_option("--tester");
    auto *m1=app.add_option_group("+tester");

    m1->add_option("--flag", flag, "description");
    m1->add_option("--optional_flag", optional_flag, "description");

    CLI11_PARSE(app,argc, argv);
```
will produce help as 
```txt
Options:
  -h,--help                   Print this help message and exit
  --tester
  --flag BOOLEAN              description
  --optional_flag BOOLEAN     description
```

instead of 
```
Options:
  -h,--help                   Print this help message and exit
  --tester
[Option Group: tester]
  Options:
    --flag BOOLEAN              description
    --optional_flag BOOLEAN     description

```

Fixes issue #1034 and a few other past issues or questions

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-05-20 11:14:55 -07:00
Henry Schreiner
6c7b07a878 chore: prepare version 2.4.2 (#1037)
Prepare for release.

---------

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Philip Top <phlptp@gmail.com>
2024-05-04 00:50:51 -04:00
Henry Schreiner
e4ee3af785 chore: clean out some mentions of appveyor (#990) 2024-02-04 23:41:56 -05:00
Henry Schreiner
cc9407287f chore: bump wandbox demo (#992) 2024-02-04 23:41:42 -05:00
Philip Top
88e9bb1741 docs: release update (#974)
Update the Readme and the changelog in preparation for a release.

---------

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Co-authored-by: Henry Schreiner <henry.fredrick.schreiner@cern.ch>
Co-authored-by: Henry Schreiner <henryschreineriii@gmail.com>
2024-02-04 22:59:34 -05:00
Henry Schreiner
ef327b7883 chore: sort contributors alphabetically (#978)
This is getting long, and order isn't meaningful, so let's make it
alphabetical.

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
2024-01-12 09:33:43 -05:00
Henry Schreiner
b6e367db88 chore: update all-contributors (#977)
The bot isn't working and we've not really been keeping this up. This is
everything from `yarn run all-contributors check`.

- 📝 Add @dherrera-fb as a contributor
- 📝 Add @VolkerChristian as a contributor
- 📝 Add @thewtex as a contributor
- 📝 Add @polistern as a contributor
- 📝 Add @andreasxp as a contributor
- 📝 Add @SherlockInSpace as a contributor
- 📝 Add @Krzmbrzl as a contributor
- 📝 Add @RangeMachine as a contributor
- 📝 Add @ptheywood as a contributor
- 📝 Add @peterh as a contributor
- 📝 Add @PeteAudinate as a contributor
- 📝 Add @captainurist as a contributor
- 📝 Add @djerius as a contributor
- 📝 Add @shameekganguly as a contributor
- 📝 Add @ayum as a contributor
- 📝 Add @BenjaminBeichler as a contributor
- 📝 Add @DarkWingMcQuack as a contributor
- 📝 Add @eli-schwartz as a contributor
- 📝 Add @bruxisma as a contributor
- 📝 Add @j-rivero as a contributor
- 📝 Add @looopTools as a contributor
- 📝 Add @cetius as a contributor
- 📝 Add @nathanielhourt as a contributor
2024-01-11 11:39:57 -05:00
Philip Top
de1c6a1207 Escape transform and docs (#970)
Update some documentation and add a string escape transformer so escaped
strings can be handled on the command line as well as in the config
files.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-01-06 06:29:46 -08:00
Henry Schreiner
3bc2739c11 docs: use gfm notes in README (#952)
A fairly new addition to GitHub Flavored Markdown.

---------

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Philip Top <phlptp@gmail.com>
2023-12-18 05:17:42 -08:00
Philip Top
319e918af6 update docs on usage to indicate it is only available on main (#959)
fix missing doc indicator on usage method

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-12-16 06:47:44 -08:00
Philip Top
583c1abfc6 add an example of capturing the arguments after a specific option. (#944)
Based on Issue #931 and #942.  
Add an example of how to do what those issues were requesting.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-11-03 06:29:00 -07:00