Skip to content

cleanup: standardize CLI flag naming to use hyphens - #806

Merged
ch4r10t33r merged 9 commits into
blockblaz:mainfrom
markolazic01:cleanup/standardize-cli-flags
May 12, 2026
Merged

ch4r10t33r merged 9 commits into
blockblaz:mainfrom
markolazic01:cleanup/standardize-cli-flags

Conversation

@markolazic01

Copy link
Copy Markdown
Contributor

cleanup: standardize CLI flag naming to use hyphens

Closes #795

Problem

CLI flags used a mix of underscores and hyphens (--custom_genesis vs --node-id), making the interface inconsistent.

Changes

Renamed all underscore CLI flags to use hyphens:

  • --custom_genesis → --custom-genesis
  • --network_id → --network-id
  • --validator_config → --validator-config
  • --metrics_enable → --metrics-enable
  • --override_genesis_time → --override-genesis-time
  • --data_dir → --data-dir (in BeamCmd)
  • --dist_dir → --dist-dir (in prove command)

Updated all references across main.zig and node.zig including struct fields, help messages, format strings, debug output, and tests.

Internal struct fields in NodeOptions (e.g. .network_id, .validator_config) are unchanged — this PR only affects user-facing CLI flags.

@ch4r10t33r

Copy link
Copy Markdown
Contributor

@markolazic01 this is a breaking change and it will impact downstream usage in lean-quickstart etc. I would suggest, you create an alias, instead of a hard replace.

@markolazic01

Copy link
Copy Markdown
Contributor Author

Thanks @ch4r10t33r, will update according to your advice

@ch4r10t33r
ch4r10t33r marked this pull request as draft April 30, 2026 16:02
@markolazic01

Copy link
Copy Markdown
Contributor Author

@ch4r10t33r simargs maps struct field names directly to CLI flag names and doesn't support aliases. I couldn't find an alias mechanism in the library. Happy to add manual alias resolution after parsing if you'd like (I tried it and decided to ask you first since it is messy), or if you have a preferred approach for this I'm open to suggestions.

@ch4r10t33r

Copy link
Copy Markdown
Contributor

@ch4r10t33r simargs maps struct field names directly to CLI flag names and doesn't support aliases. I couldn't find an alias mechanism in the library. Happy to add manual alias resolution after parsing if you'd like (I tried it and decided to ask you first since it is messy), or if you have a preferred approach for this I'm open to suggestions.

Hmm. not worth the effort. I think we have to time your changes along with the corresponding changes on lean-quickstart. Can you make the necessary PR on that repository as well?

@markolazic01

Copy link
Copy Markdown
Contributor Author

Sounds good @ch4r10t33r, I'll make that PR as well.

@markolazic01

Copy link
Copy Markdown
Contributor Author

Companion PR for lean-quickstart: blockblaz/lean-quickstart#169

@markolazic01
markolazic01 marked this pull request as ready for review April 30, 2026 21:23
@ch4r10t33r ch4r10t33r changed the title cleanup: standardize CLI flag naming to use hyphens (Don't merge yet) cleanup: standardize CLI flag naming to use hyphens May 1, 2026
@ch4r10t33r

Copy link
Copy Markdown
Contributor

Companion PR for lean-quickstart: blockblaz/lean-quickstart#169

Companion PR for lean-quickstart: blockblaz/lean-quickstart#169

Thanks for this @markolazic01 . We'll discuss this internally and coordinate the release.

@markolazic01

Copy link
Copy Markdown
Contributor Author

Merged main as I resolved a new conflict.

@ch4r10t33r

Copy link
Copy Markdown
Contributor

Apologies @markolazic01 , there are 3 more PRs which should be merged before I can merge yours. You can wait until all of them are merged before updating yours. Thanks for the patience.

@markolazic01

Copy link
Copy Markdown
Contributor Author

Hey @ch4r10t33r, apologies for updating (I assume you get notifications for it), I just wanted to make sure all the checks still run well as the std.Io change took place. Take your time with it, no worries. Thanks.

@ch4r10t33r ch4r10t33r changed the title (Don't merge yet) cleanup: standardize CLI flag naming to use hyphens cleanup: standardize CLI flag naming to use hyphens May 7, 2026
@ch4r10t33r
ch4r10t33r self-requested a review May 7, 2026 09:41
@ch4r10t33r

Copy link
Copy Markdown
Contributor

@markolazic01 pls update the lean-quickstart commit hash on zeam to this one blockblaz/lean-quickstart#169

@markolazic01

Copy link
Copy Markdown
Contributor Author

I updated the submodule commit. Not sure why exactly is CI failing this time, but it seems that the same issue is present on main.

@ch4r10t33r ch4r10t33r left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ch4r10t33r
ch4r10t33r merged commit 462673c into blockblaz:main May 12, 2026
13 checks passed
KolbyML pushed a commit to ethereum/hive that referenced this pull request May 12, 2026
clients/zeam: use hyphenated zeam CLI flags

Match blockblaz/zeam#806: --custom-genesis, --validator-config,
--metrics-enable (underscore forms removed).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cleanup: standardize CLI flag naming to use hyphens

2 participants