cli: help and usage print the command as typed !485

merged merged by cmc on 2026-09-28 22:05 UTC · krz/gitbay:cli-ux-help into main

Discussion

cmc

CLI help and usage print the command as typed.

  • The CLI sends the path it was invoked as (--path=<cli path>, next to --term=) for the 18 commands whose CLI path differs from the server's (gitbay auth …, repo topics list); TestServerPathMismatches pins the list.
  • Usage, help and bad-flag refusals print the CLI form from the CLI (usage: gitbay auth keys remove <fingerprint>, [<owner/name>] optional) and the ssh form over stock OpenSSH (ssh git@host keys remove <fingerprint>). --path= only changes display text, never which command runs.
  • gitbay auth --help renders with the registry layout in CLI paths (auth keys add, auth export), summary "whoami, SSH and PGP keys, email, API tokens"; a test keeps the CLI's alias list and the server's in step.
  • auth keys add --help and auth pgp add --help print help instead of reading stdin.
  • Bare-noun summaries become verb phrases ("add or remove assignees", "add a comment", …).
  • Off a terminal, the 18 commands print the gitbay form and the rest the ssh form.

Upgrade note. Upgrade the instance before the CLI: an older server refuses the leading --path= as an unknown command for those 18 commands. CHANGELOG * Unreleased carries #265 and #267.

Stacked on !481 (cli-ux-activity).

Closes #267