setup.py 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. """``hermes setup`` subcommand parser."""
  2. from __future__ import annotations
  3. from typing import Callable
  4. def build_setup_parser(subparsers, *, cmd_setup: Callable) -> None:
  5. """Attach the ``setup`` subcommand to ``subparsers``."""
  6. setup_parser = subparsers.add_parser(
  7. "setup", help="Interactive setup wizard",
  8. description="Configure Hermes Agent with an interactive wizard. "
  9. "Run a specific section: "
  10. "hermes setup model|tts|terminal|gateway|tools|telemetry|agent")
  11. setup_parser.add_argument(
  12. "section", nargs="?",
  13. choices=["model", "tts", "terminal", "gateway", "tools", "telemetry", "agent"],
  14. default=None, help="Run a specific setup section instead of the full wizard")
  15. setup_parser.add_argument(
  16. "--non-interactive", action="store_true",
  17. help="Non-interactive mode (use defaults/env vars)")
  18. setup_parser.add_argument(
  19. "--reset", action="store_true", help="Reset configuration to defaults")
  20. setup_parser.add_argument(
  21. "--reconfigure", action="store_true",
  22. help="(Default on existing installs.) Re-run the full wizard, "
  23. "showing current values as defaults. Kept for backwards "
  24. "compatibility — a bare 'hermes setup' now does this.")
  25. setup_parser.add_argument(
  26. "--quick", action="store_true",
  27. help="On existing installs: only prompt for items that are missing "
  28. "or unset, instead of running the full reconfigure wizard.")
  29. setup_parser.add_argument(
  30. "--portal", action="store_true",
  31. help="One-shot Nous Portal setup: log in via OAuth, pick a Nous "
  32. "model, set Nous as the inference provider, and opt into the Tool "
  33. "Gateway. Skips the rest of the wizard.")
  34. setup_parser.set_defaults(func=cmd_setup)