Skip to content

( 📖 ) Enhancements to CLI Help#5498

Open
cmallikarjunah wants to merge 1 commit intokubernetes-sigs:masterfrom
cmallikarjunah:issue-5446-cli-help-enhancements
Open

( 📖 ) Enhancements to CLI Help#5498
cmallikarjunah wants to merge 1 commit intokubernetes-sigs:masterfrom
cmallikarjunah:issue-5446-cli-help-enhancements

Conversation

@cmallikarjunah
Copy link
Copy Markdown
Contributor

@cmallikarjunah cmallikarjunah commented Feb 22, 2026

For review purpose attaching a CLI_HELP_DOCUMENTATION.md for a clean read on how the cli help command output looks after modifications.
CLI_HELP_DOCUMENTATION.md

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Feb 22, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

Hi @cmallikarjunah. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: cmallikarjunah
Once this PR has been reviewed and has the lgtm label, please assign varshaprasad96 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Feb 22, 2026
@cmallikarjunah cmallikarjunah changed the title (:book:) [WiP] Enhancements to CLI Help ( 📖 ) [WiP] Enhancements to CLI Help Feb 22, 2026
@cmallikarjunah cmallikarjunah force-pushed the issue-5446-cli-help-enhancements branch from 5199364 to 1941ec0 Compare March 8, 2026 17:16
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 8, 2026
@cmallikarjunah cmallikarjunah force-pushed the issue-5446-cli-help-enhancements branch from 1941ec0 to 35ffe38 Compare March 14, 2026 18:15
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Mar 14, 2026
@cmallikarjunah
Copy link
Copy Markdown
Contributor Author

For review purpose attaching a CLI_HELP_DOCUMENTATION.md (in the PR description) for a clean read on how the cli help command output looks after modifications.

@cmallikarjunah cmallikarjunah requested a review from mayuka-c March 14, 2026 18:22
@cmallikarjunah cmallikarjunah marked this pull request as ready for review March 14, 2026 18:23
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 14, 2026
@cmallikarjunah cmallikarjunah changed the title ( 📖 ) [WiP] Enhancements to CLI Help ( 📖 ) Enhancements to CLI Help Apr 2, 2026
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 7, 2026
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

PR needs rebase.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.


This is helpful for migrating projects to a newer Kubebuilder layout or plugin version (e.g., v3 to v4)
as update your project from any previous version to the current one.
This command uses the latest installed Kubebuilder version and plugins to regenerate
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

That is not accurate. The command will use the code of the CLI version installed/used.
I think the original text here seems more accurate.


# Re-scaffold the project from ./test into ./my-output
kubebuilder alpha generate --input-dir="./path/to/project" --output-dir="./my-output"
# Re-scaffold to a different directory (safe, preserves original)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I do not think we need the info under ()

# Re-scaffold to a different directory (safe, preserves original)
kubebuilder alpha generate --output-dir="./regenerated"

# Re-scaffold from a specific project directory to a different directory
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The original # Re-scaffold the project from ./test into ./my-output direct form seems more intuitive and aligned with kubebuilder/k8s docs style.

scaffoldCmd.Flags().StringVar(&opts.InputDir, "input-dir", "",
"Path to the directory containing the PROJECT file. "+
"Defaults to the current working directory. WARNING: delete existing files (except .git and PROJECT).")
"path to directory containing the PROJECT file (default: current directory). "+
Copy link
Copy Markdown
Member

@camilamacedo86 camilamacedo86 Apr 7, 2026

Choose a reason for hiding this comment

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

That is a good point, what is the best: Should start all with Upper case or not?
The change here shows make it better 👍

updateCmd.Flags().StringVar(&opts.FromVersion, "from-version", "",
"binary release version to upgrade from. Should match the version used to init the project and be "+
"a valid release version, e.g., v4.6.0. If not set, it defaults to the version specified in the PROJECT file.")
"Kubebuilder version to upgrade from (e.g., v4.6.0). Should match version used to initialize project "+
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think clarify that from. == init version is important. WDYT?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants