feat(duo): add --install and --yes flags to duo cli command

Summary

  • Adds --install flag to download and install the Duo CLI binary without running it (useful for CI setup steps)
  • Adds -y/--yes flag to skip all confirmation prompts (both download and run confirmations), enabling fully headless/non-interactive use
  • Fixes --help/-h to show glab's Cobra help (where the new flags are documented) rather than passing through to the Duo CLI binary; plain glab duo cli help still passes help to the Duo binary
  • Registers --install, --update, and -y/--yes with cmd.Flags() for proper documentation in help output (Cobra displays registered flags even with DisableFlagParsing: true)

Behaviour matrix

Command Download prompt Run prompt
glab duo cli asks asks
glab duo cli --yes skipped skipped
glab duo cli --install asks no (doesn't run)
glab duo cli --install --yes skipped no (doesn't run)

Test plan

  • glab duo cli --help shows glab Cobra help with --install, --update, -y/--yes flags documented
  • glab duo cli help shows Duo CLI help
  • glab duo cli --install prompts to download, installs binary, does not run
  • glab duo cli --install --yes installs without any prompts
  • glab duo cli --yes installs if needed (no prompts) and runs without confirmation
  • glab duo cli --install when already installed prints ✓ Duo CLI version X.Y.Z is already installed.
  • Unit tests pass

Merge request reports

Loading