Repository navigation
Add rfl::cli::usage to generate usage and help text - #23
Open
clockblocker wants to merge 1 commit into
Open
clockblocker wants to merge 1 commit into
clockblocker wants to merge 1 commit into
Conversation
clockblocker
force-pushed
the
cli-usage-help-text
branch
from
November 14, 2026 13:01
d0ce41c to
95184e5
Compare
clockblocker
force-pushed
the
wave-base-4
branch
from
November 14, 2026 13:01
5f5bda8 to
55507ad
Compare
clockblocker
force-pushed
the
cli-usage-help-text
branch
from
November 15, 2026 08:21
95184e5 to
ea81d4e
Compare
clockblocker
force-pushed
the
wave-base-5
branch
from
November 16, 2026 05:18
ebe522c to
c171f71
Compare
clockblocker
force-pushed
the
cli-usage-help-text
branch
from
November 16, 2026 05:18
ea81d4e to
7452227
Compare
clockblocker
force-pushed
the
wave-base-5
branch
from
November 17, 2026 04:18
c171f71 to
576b6a2
Compare
clockblocker
force-pushed
the
cli-usage-help-text
branch
2 times, most recently
from
November 17, 2026 05:11
0d52e67 to
953f9db
Compare
clockblocker
force-pushed
the
wave-base-5
branch
2 times, most recently
from
November 17, 2026 07:15
64bb06b to
ca12ff5
Compare
clockblocker
force-pushed
the
cli-usage-help-text
branch
from
November 17, 2026 07:15
953f9db to
3d1b55f
Compare
clockblocker
force-pushed
the
wave-base-5
branch
from
November 17, 2026 09:25
ca12ff5 to
c286ad9
Compare
clockblocker
force-pushed
the
cli-usage-help-text
branch
from
November 17, 2026 09:25
3d1b55f to
dcb5ff4
Compare
This was referenced Nov 21, 2026
clockblocker
force-pushed
the
cli-usage-help-text
branch
2 times, most recently
from
November 27, 2026 21:33
dc16c58 to
c898597
Compare
This was referenced Nov 29, 2026
clockblocker
force-pushed
the
cli-usage-help-text
branch
from
December 2, 2026 08:57
c898597 to
4b329b4
Compare
This was referenced Dec 2, 2026
…h-data-engineering#692) Adds `rfl::cli::usage<T, Ps...>(program_name, with_details)` in an isolated header (`include/rfl/cli/usage.hpp`) to render command-line usage lines and aligned argument descriptions directly from `rfl::cli`'s option table and format-agnostic schema, matching `rfl::cli::read<T, Ps...>`. Judge polish applied: - Preserves cv-qualification in `add_usage_field_meta` so `const rfl::DefaultVal<T>` inside `rfl::NamedTuple` is accurately reported as required. - Guards `path_separator` for root `std::map<std::string, V>` so keys render `--<key>=<value>` instead of `--.<key>=<value>`. - Drops unused `<rfl/internal/processed_t.hpp>` and includes `<rfl/to_generic.hpp>` for standalone `<rfl/cli/usage.hpp>` builds. Closes: munich-data-engineering#692 (Maintainer: "A PR is very welcome!") Refs: munich-data-engineering#347
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses munich-data-engineering/reflect-cpp#692
Problem
rfl::cli::readparses CLI flags directly from a C++ struct, but callers still have to hand-write--helpoutput.As structs evolve, documented flag names, short aliases, and required arguments drift out of sync with the actual parser.
Summary
rfl::cli::usage<T>()in an isolated<rfl/cli/usage.hpp>header sharing the exact option table and processors asrfl::cli::read, so kebab-case, renames, flattened structs, and nested paths stay in sync.rfl::Result<std::string>(detailed = falsefor the usage line;truefor aligned descriptions); welcomed by the maintainer on issue #692.For Agents
upstream-queue(72cf64a3) · Score86/100(S=28,M=28,D=19,R=11) ·+452/-0(2f)queue-tests/cli/test_usage.cpp,queue-tests/cli/test_usage_options.cpp