Refactor CLI setup#2503
Open
achilleas-k wants to merge 5 commits into
Open
Conversation
achilleas-k
force-pushed
the
refactor-cli-setup
branch
2 times, most recently
from
July 10, 2026 07:13
9358371 to
6835857
Compare
achilleas-k
marked this pull request as ready for review
July 10, 2026 07:13
supakeen
approved these changes
Jul 10, 2026
Create separate functions for each subcommand and a top-level one for creating the root command. The setupRootCmd() function sets up the root command and calls the setupX() function for each of its subcommands. This is a very simple code-shuffling commit. It's meant to make navigating the CLI creation easier by localising the creation and configuration of each subcommand.
Create separate functions for each subcommand and a top-level one for creating the root command (previously, this was bibBuildCobraCmdline, now renamed to match the image-builder root command setup from the previous commit). The setupRootCmd() function sets up the root command and calls the setupX() function for each of its subcommands. This is a very simple code-shuffling commit. It's meant to make navigating the CLI creation easier by localising the creation and configuration of each subcommand.
Subcommands don't need to support printing the command version.
Update the long description of the bootc-image-builder root command. Also remove the descriptions from the build command. I don't think they're necessary or very useful.
Rephrase a couple of error messages to remove typos and make the failure reason clearer.
achilleas-k
force-pushed
the
refactor-cli-setup
branch
from
July 10, 2026 22:14
6835857 to
44750ea
Compare
brlane-rht
approved these changes
Jul 14, 2026
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.
Create separate functions for each subcommand and a top-level one for creating the root command for both image-builder and bootc-image-builder. The setupRootCmd() function sets up the root command and calls the setupX() function for each of its subcommands.
This is a very simple code-shuffling commit. It's meant to make navigating and reading the CLI creation easier by localising the creation and configuration of each subcommand, making it much clearer which flags apply where, and when things are shared by appearing one level higher in the callstack.
I started this while exploring the code path duplication between image-builder and bootc-image-builder. I wanted to get this merged into main before I move on to more substantial refactoring work.