Skip to content

The agent that grows with you

fix(cli): document -p <profile> and the gateway service verbs in --help

Konstantin Khlopkovbd72c4205dcf
diff --git a/hermes_cli/_parser.py b/hermes_cli/_parser.py
index cc73a1506f3..ff3d1732821 100644
--- a/hermes_cli/_parser.py
+++ b/hermes_cli/_parser.py
@@ -99,6 +99,10 @@ Examples:
hermes config edit Edit config in $EDITOR
hermes config set model gpt-4 Set a config value
hermes gateway Run messaging gateway
+ hermes gateway start Start the installed gateway service
+ hermes gateway stop Stop the gateway service
+ hermes -p <profile> <cmd> Run any command against a named profile's
+ home — e.g. hermes -p coder gateway stop
hermes -s hermes-agent-dev,github-auth
hermes -w Start in isolated git worktree
hermes gateway install Install gateway background service
diff --git a/tests/hermes_cli/test_parser_epilogue_gateway_profile.py b/tests/hermes_cli/test_parser_epilogue_gateway_profile.py
new file mode 100644
index 00000000000..5484dbe5c28
--- /dev/null
+++ b/tests/hermes_cli/test_parser_epilogue_gateway_profile.py
@@ -0,0 +1,20 @@
+"""The ``--help`` epilogue must cover the profile-scoped gateway lifecycle.
+
+``-p/--profile`` is consumed before argparse (``main._apply_profile_override``), so it never
+appears among the parser's option rows — the epilogue examples are the only place ``--help``
+can teach the ``hermes -p <profile> gateway <action>`` form that generated service units and
+user-facing copy already rely on (#114495). Contract, not snapshot: assert the verbs and the
+profile flag are named, not the exact wording.
+"""
+
+from hermes_cli._parser import _EPILOGUE
+
+
+def test_epilogue_documents_the_profile_scoped_command_form():
+ assert "-p <profile>" in _EPILOGUE
+ assert "hermes -p coder gateway stop" in _EPILOGUE
+
+
+def test_epilogue_documents_the_gateway_service_verbs():
+ for verb in ("gateway start", "gateway stop", "gateway install"):
+ assert f"hermes {verb}" in _EPILOGUE