feat(duo): add --install and --yes flags to duo cli command
Summary
- Adds
--installflag to download and install the Duo CLI binary without running it (useful for CI setup steps) - Adds
-y/--yesflag to skip all confirmation prompts (both download and run confirmations), enabling fully headless/non-interactive use - Fixes
--help/-hto show glab's Cobra help (where the new flags are documented) rather than passing through to the Duo CLI binary; plainglab duo cli helpstill passeshelpto the Duo binary - Registers
--install,--update, and-y/--yeswithcmd.Flags()for proper documentation in help output (Cobra displays registered flags even withDisableFlagParsing: 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 --helpshows glab Cobra help with--install,--update,-y/--yesflags documented -
glab duo cli helpshows Duo CLI help -
glab duo cli --installprompts to download, installs binary, does not run -
glab duo cli --install --yesinstalls without any prompts -
glab duo cli --yesinstalls if needed (no prompts) and runs without confirmation -
glab duo cli --installwhen already installed prints✓ Duo CLI version X.Y.Z is already installed. - Unit tests pass