[client] Add cmd flag dependencies

Merged
TH
16d ago
+355-9

Describe your changes

This PR improves UI experience for flag dependency.

  • Adds markFlagRequires to indicate which flags that depend on another (one-way relationship), used for upload-bundle.
  • Marks extend as mutually exclusive for setup-key.
  • Marks ssh --login as deprecated as it does the same things as -u/--user.

Issue ticket number and link

Stack

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)
  • I ran and tested this change locally — I did not rely on CI to find out whether it works
  • This PR has a single purpose (not a fix + refactor + feature in one)
  • This change is a trivial fix, OR it links an issue the NetBird team agreed on beforehand. Changes to the public API, gRPC protocols, functionality behavior, CLI / service flags, or new features always need that agreement first. See CONTRIBUTING.md.

By submitting this pull request, you confirm that you have read and agree to the terms of the Contributor License Agreement.

Documentation

Select exactly one:

  • I added/updated documentation for this change
  • Documentation is not needed for this change (explain why)

Docs PR URL (required if "docs added" is checked)

Paste the PR link from https://github.com/netbirdio/docs here:

https://github.com/netbirdio/docs/pull/1098

Summary by CodeRabbit

  • CLI Behavior

    • Debug bundle upload options now require --upload-bundle.
    • login --extend requires an active connection and cannot be combined with --setup-key or --setup-key-file.
    • --setup-key and --setup-key-file cannot be used together with login or up.
  • Deprecations

    • SSH --login remains available but displays a deprecation notice; use --user instead.
    • SSH help no longer lists --login and uses --user in its example.