Skip to content

Map (Lane 3): Practical CLI (rfl::cli) #87

Backlog
2 of 2 issues completed
Backlog

Description

@clockblocker

Destination

Lock a clean rfl::cli surface plus public metadata introspection on showcase/all-lanes, and upstream a right-sized, minimal rfl::cli help/app layer in Phase 2.

Phase 1 Status: COMPLETE (fork/showcase/all-lanes d0f1fca1 · 0/2 open child tickets). Phase 2 Wave 6 scoped cleanly to minimal #23 + #28 (PLANNED_PR_WAVES.md).

Notes

  • Parent map: Map: Close reflect-cpp Adoption Gaps into showcase/all-lanes.
  • Phase 2 mapping (PLANNED_PR_WAVES.md):
    • Merged upstream: #798 (fork #24, grouped short options -qfcsv).
    • Live upstream: #797 (fork #34, unknown long options under NoExtraFields — needs rebase on main after #798).
    • Wave 6 (Right-Sized rfl::cli): #23 (cli-usage-help-text, minimal rfl::cli::usage, closes #692) + #28 (cli-help-and-version, minimal opt-in rfl::cli::App --help/--version, stacked on #23, closes #347) — rebase & dual-Judge verify on origin/main.
    • Parked in #117 (Cut CLI Empire — reference artifacts preserved on fork & showcase/all-lanes d0f1fca1): 14 closed fork PRs (#25, #26, #27, #30, #31, #35, #36, #39, #47, #48, #51, #52, #58, #62) plus the Phase 1 Settings/describe/CommandTree/DynamicOptions/Presets/response_file/suggest framework.
  • Settled Phase 1 CLI Architecture Benchmarks (reference):
    • UsageWalker (without static cache): −63.8% (read+usage) / −87.5% (usage-only) .o size and −16% to −22% compile time.
    • rfl::cli::Settings + src/rfl/cli/*.cpp: −31% compile time / −50.1% .o / −26.1% binary on 2-preset TUs (+352 B vs +1.02 MB per preset).

Decisions so far

  • Prototype public rfl::cli::describe metadata API and non-erasing hidden-positional semantics: Promoted rfl::cli::OptionKind, added rfl::cli::describe<T, Ps...>() (AppDescriptor/CommandDescriptor/OptionDescriptor/PositionalDescriptor, JSON-serializable, zero internal::* reach-ins), preserved rfl::Hidden options/positionals and hidden_groups with .hidden = true, and enabled CommandNode to host static reflected <Cmd>Options structs (copyable & move-only) alongside DynamicOptions (d0f1fca1, dual-Judge approved, 1,137/1,137 CTests). Preserved on showcase/all-lanes (d0f1fca1) as reference artifact in #117.
  • Consolidate Wave 5 CLI parsing mode API and reconcile Wave 11 cli::Alias with core rfl::Alias: Added consolidated runtime rfl::cli::Settings (gnu, gnu_last_wins, posix_strict, single_dash, from_processors) across read/read_detailed/read_into/read_app/usage/describe/DynamicOptions/CommandNode, and reconciled rfl::cli::Alias (using rfl::Alias;) & rfl::cli::attr::Alias via field_aliases_impl + compile-time no_alias_collisions across CLI and non-CLI formats (d0f1fca1, dual-Judge approved). Preserved on showcase/all-lanes (d0f1fca1) as reference artifact in #117.

Not yet specified

  • Wave 6 rebase & dual-Judge verification: Rebase #23 and #28 cleanly onto origin/main (incorporating UsageWalker perf win where minimal) after #797 lands.

Out of scope

  • Upstreaming the 6,500-LoC CLI framework (Opt/OptGroup, CommandTree, DynamicOptions, Presets, response_file, suggest, describe, Settings, and 14 expansion PRs) — cut and archived in #117.
  • Shell-specific completion generators baked directly into reflect-cpp core.

Sub-issues

Sub-issues

2 of 2 Issues completed
Loading 2 sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    wayfinder:map

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions