hermes-agent/hermes_cli/subcommands
kshitijk4poor a7ec334448 fix(cli): deprecated hermes login fails gracefully for any provider
`hermes login` was removed in favor of `hermes auth` / `hermes model`, but
the subparser still validated `--provider` against a hardcoded choices list
(nous, openai-codex, xai-oauth). Running `hermes login --provider anthropic`
therefore crashed in argparse with `invalid choice: 'anthropic'` *before* the
deprecation handler could print the redirect to `hermes model` — so a user
trying to authenticate a perfectly valid provider just saw a hard error and
assumed the feature was broken rather than relocated.

- Drop the restrictive `choices=` so every `--provider` value reaches the
  deprecation handler (which ignores the value and prints guidance).
- Omit the subparser `help=` kwarg so the dead command no longer advertises
  itself in `hermes --help` (#24756). Avoids the `==SUPPRESS==` placeholder
  leak that `help=argparse.SUPPRESS` emits for a top-level subparser on 3.12+.
- `hermes login [--flags]` still reaches the actionable deprecation message
  for old scripts/aliases; `hermes login --help` shows the redirect.

Picks up the intent of the inactivity-closed #24902, rebased onto the
post-refactor parser location (hermes_cli/subcommands/login.py) and extended
to fix the whole bug class (any provider value), not just hiding from --help.

Tests: parametrized provider acceptance + help-suppression (no SUPPRESS leak).
2026-06-17 12:55:40 +05:30
..
__init__.py refactor(cli): extract hermes cron parser into hermes_cli/subcommands/ (god-file Phase 2) 2026-06-07 22:18:14 -07:00
_shared.py refactor(cli): extract hermes cron parser into hermes_cli/subcommands/ (god-file Phase 2) 2026-06-07 22:18:14 -07:00
acp.py refactor(cli): promote 9 closure handlers to top-level + extract their parsers (god-file Phase 2 follow-up) 2026-06-07 22:56:23 -07:00
auth.py refactor(cli): extract 25 more subcommand parsers into hermes_cli/subcommands/ 2026-06-07 22:18:14 -07:00
backup.py refactor(cli): extract 25 more subcommand parsers into hermes_cli/subcommands/ 2026-06-07 22:18:14 -07:00
claw.py refactor(cli): promote 9 closure handlers to top-level + extract their parsers (god-file Phase 2 follow-up) 2026-06-07 22:56:23 -07:00
config.py refactor(cli): extract 25 more subcommand parsers into hermes_cli/subcommands/ 2026-06-07 22:18:14 -07:00
cron.py revert(cron): remove per-job profile support (PR #28124) (#43956) 2026-06-10 20:46:17 -07:00
dashboard.py refactor(desktop): use port 0 for ephemeral port discovery instead of PortPool reservation 2026-06-12 14:02:19 -04:00
debug.py refactor(cli): extract 25 more subcommand parsers into hermes_cli/subcommands/ 2026-06-07 22:18:14 -07:00
doctor.py refactor(cli): extract 25 more subcommand parsers into hermes_cli/subcommands/ 2026-06-07 22:18:14 -07:00
dump.py refactor(cli): extract 25 more subcommand parsers into hermes_cli/subcommands/ 2026-06-07 22:18:14 -07:00
gateway.py fix(gateway): block shell gateway run when a service supervises the profile 2026-06-14 08:42:06 -07:00
gui.py refactor(cli): extract 25 more subcommand parsers into hermes_cli/subcommands/ 2026-06-07 22:18:14 -07:00
hooks.py refactor(cli): extract 25 more subcommand parsers into hermes_cli/subcommands/ 2026-06-07 22:18:14 -07:00
import_cmd.py refactor(cli): extract 25 more subcommand parsers into hermes_cli/subcommands/ 2026-06-07 22:18:14 -07:00
insights.py refactor(cli): promote 9 closure handlers to top-level + extract their parsers (god-file Phase 2 follow-up) 2026-06-07 22:56:23 -07:00
login.py fix(cli): deprecated hermes login fails gracefully for any provider 2026-06-17 12:55:40 +05:30
logout.py refactor(cli): extract 25 more subcommand parsers into hermes_cli/subcommands/ 2026-06-07 22:18:14 -07:00
logs.py refactor(cli): extract 25 more subcommand parsers into hermes_cli/subcommands/ 2026-06-07 22:18:14 -07:00
mcp.py fix(mcp): preserve stdio argv passthrough 2026-06-11 08:59:55 -07:00
memory.py refactor(cli): promote 9 closure handlers to top-level + extract their parsers (god-file Phase 2 follow-up) 2026-06-07 22:56:23 -07:00
model.py refactor(cli): extract 25 more subcommand parsers into hermes_cli/subcommands/ 2026-06-07 22:18:14 -07:00
pairing.py refactor(cli): promote 9 closure handlers to top-level + extract their parsers (god-file Phase 2 follow-up) 2026-06-07 22:56:23 -07:00
plugins.py refactor(cli): promote 9 closure handlers to top-level + extract their parsers (god-file Phase 2 follow-up) 2026-06-07 22:56:23 -07:00
postinstall.py refactor(cli): extract 25 more subcommand parsers into hermes_cli/subcommands/ 2026-06-07 22:18:14 -07:00
profile.py fix(profile): make clone-from a full source selector 2026-06-13 07:33:58 -07:00
prompt_size.py refactor(cli): extract 25 more subcommand parsers into hermes_cli/subcommands/ 2026-06-07 22:18:14 -07:00
security.py refactor(cli): extract 25 more subcommand parsers into hermes_cli/subcommands/ 2026-06-07 22:18:14 -07:00
setup.py refactor(cli): extract 25 more subcommand parsers into hermes_cli/subcommands/ 2026-06-07 22:18:14 -07:00
skills.py refactor(cli): promote 9 closure handlers to top-level + extract their parsers (god-file Phase 2 follow-up) 2026-06-07 22:56:23 -07:00
slack.py refactor(cli): extract 25 more subcommand parsers into hermes_cli/subcommands/ 2026-06-07 22:18:14 -07:00
status.py refactor(cli): extract 25 more subcommand parsers into hermes_cli/subcommands/ 2026-06-07 22:18:14 -07:00
tools.py refactor(cli): promote 9 closure handlers to top-level + extract their parsers (god-file Phase 2 follow-up) 2026-06-07 22:56:23 -07:00
uninstall.py refactor(cli): extract 25 more subcommand parsers into hermes_cli/subcommands/ 2026-06-07 22:18:14 -07:00
update.py refactor(cli): extract 25 more subcommand parsers into hermes_cli/subcommands/ 2026-06-07 22:18:14 -07:00
version.py refactor(cli): extract 25 more subcommand parsers into hermes_cli/subcommands/ 2026-06-07 22:18:14 -07:00
webhook.py refactor(cli): extract 25 more subcommand parsers into hermes_cli/subcommands/ 2026-06-07 22:18:14 -07:00
whatsapp.py refactor(cli): extract 25 more subcommand parsers into hermes_cli/subcommands/ 2026-06-07 22:18:14 -07:00