Group help options into sections in command help#2567
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors CLI --help output to group commonly-flattened flags (RPC, transaction-building, global, signing) into distinct sections via clap’s help_heading, and regenerates the full markdown help docs accordingly.
Changes:
- Renamed existing help section headings (e.g.,
Options (RPC)→RPC Options) and introduced new headings forSigning OptionsandTransaction Options. - Assigned
help_headingto shared signing/transaction args (sign_with::Args,config::Args,tx::Args) so affected commands render grouped help. - Regenerated
FULL_HELP_DOCS.mdfrom clap-markdown to reflect the new headings/sections.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| FULL_HELP_DOCS.md | Regenerated CLI help docs showing the new per-section headings across commands. |
| cmd/soroban-cli/src/config/sign_with.rs | Adds help_heading = HEADING_SIGNING to signing-related flags. |
| cmd/soroban-cli/src/config/mod.rs | Adds help_heading = HEADING_TRANSACTION to tx-related shared config flags. |
| cmd/soroban-cli/src/commands/tx/args.rs | Moves --build-only into the Transaction Options help section. |
| cmd/soroban-cli/src/commands/mod.rs | Renames heading constants and adds new constants for signing/transaction sections. |
| cmd/soroban-cli/src/commands/message/sign.rs | Groups message signing flags under Signing Options. |
leighmcculloch
approved these changes
May 7, 2026
Member
leighmcculloch
left a comment
There was a problem hiding this comment.
The --build-only flag in the following places is technically owned by each individual command at the moment, but I think should be grouped in a separate section. Maybe under Transaction Options.
stellar contract extendstellar contract uploadstellar contract deploy assetstellar contract invokestellar contract restorestellar contract deploy wasm
Otherwise, looks good to me.
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.
What
Group
--helpoutput into sections using clap'shelp_heading, so the shared signing, transaction, RPC, and global options no longer mix into the flatOptions:list of every command.The new layout (e.g.
stellar tx new payment --help):Options:— the command's primary optionsRPC Options:—--rpc-url,--rpc-header,--network-passphrase,--networkTransaction Options:—--source-account,--fee,--inclusion-fee,--build-onlyGlobal Options:—--config-dir,--quiet,--verbose,--no-cache, …Signing Options:—--sign-with-key,--hd-path,--sign-with-lab,--sign-with-ledgerThis affects ~53 commands at once: all 22
stellar tx newsubcommands, all 22stellar tx operation addsubcommands, the 5stellar contractsubcommands (deploy,upload,extend,restore,invoke),stellar contract asset deploy,stellar tx sign,stellar tx simulate, andstellar message sign.The existing
Options (RPC)/Options (Archive)/Options (Global)headings were renamed toRPC Options/Archive Options/Global Optionsfor a consistent style across all sections.Closes #2454.
Why
Until now, every transaction-building command listed all signing, transaction, source-account, and command-specific options in a single flat
Options:block. The 8 shared options effectively buried the 3–7 primary options of each command, making--helphard to scan.Grouping centrally on
config::Args,sign_with::Args, andtx::Argsfixes all 53 affected commands with a small edit and no behavioral change.Known limitations
N/A — purely a
--helprendering change. No CLI flags or behavior change.