
    i4                     R    U d Z ddlZddgZeeeef                  ed<   d ZdZ	d Z
dS )	u  
Top-level argparse construction for the hermes CLI.

Lives in its own module so other modules (e.g. ``relaunch.py``) can
introspect the parser to discover which flags exist without running the
``main`` fn.

Only the top-level parser and the ``chat`` subparser live here. Every other
subparser (model, gateway, sessions, …) is built inline in ``main.py``
because its dispatch is tightly coupled to module-level ``cmd_*`` functions.
    N)z	--profileT)z-pTPRE_ARGPARSE_INHERITED_FLAGSc                 .     | j         |i |}d|_        |S )a~  Register a flag that ``hermes_cli.relaunch`` should carry over when
    the CLI re-execs itself (e.g. after ``sessions browse`` picks a session,
    or after the setup wizard launches chat).

    Equivalent to ``parser.add_argument(...)`` plus tagging the resulting
    Action with ``inherit_on_relaunch = True`` so the relaunch table builder
    can find it via introspection.
    T)add_argumentinherit_on_relaunch)parserargskwargsactions       7/home/piyush/.hermes/hermes-agent/hermes_cli/_parser.py_inherited_flagr      s(     !V $1&11F!%FM    a  
Examples:
    hermes                        Start interactive chat
    hermes chat -q "Hello"        Single query mode
    hermes -c                     Resume the most recent session
    hermes -c "my project"        Resume a session by name (latest in lineage)
    hermes --resume <session_id>  Resume a specific session by ID
    hermes setup                  Run setup wizard
    hermes logout                 Clear stored authentication
    hermes auth add <provider>    Add a pooled credential
    hermes auth list              List pooled credentials
    hermes auth remove <p> <t>    Remove pooled credential by index, id, or label
    hermes auth reset <provider>  Clear exhaustion status for a provider
    hermes model                  Select default model
    hermes fallback [list]        Show fallback provider chain
    hermes fallback add           Add a fallback provider (same picker as `hermes model`)
    hermes fallback remove        Remove a fallback provider from the chain
    hermes config                 View configuration
    hermes config edit            Edit config in $EDITOR
    hermes config set model gpt-4 Set a config value
    hermes gateway                Run messaging gateway
    hermes -s hermes-agent-dev,github-auth
    hermes -w                     Start in isolated git worktree
    hermes gateway install        Install gateway background service
    hermes sessions list          List past sessions
    hermes sessions browse        Interactive session picker
    hermes sessions rename ID T   Rename/title a session
    hermes logs                   View agent.log (last 50 lines)
    hermes logs -f                Follow agent.log in real time
    hermes logs errors            View errors.log
    hermes logs --since 1h        Lines from the last hour
    hermes debug share             Upload debug report for support
    hermes update                 Update to latest version
    hermes dashboard              Start web UI dashboard (port 9119)
    hermes dashboard --stop       Stop running dashboard processes
    hermes dashboard --status     List running dashboard processes

For more help on a command:
    hermes <command> --help
c            
         t          j        ddt           j        t                    } |                     dddd           |                     d	d
ddd           t          | dddd           t          | ddd           |                     dddd           |                     ddddd           |                     ddddd dd!d"#           |                     d$d%dd&d'(           t          | d)dd&d*(           t          | d+d,d-dd.(           t          | d/dd&d0(           t          | d1dd&d2(           t          | d3dd&d4(           t          | d5dd&d6(           t          | d7dd&d8(           t          | d9d:dd&d;<           |                     d=d>?          }|                    d@dAdBC          }|                    dDdEdFG           |                    dHdIG           t          |dddJG           |                    dddKG           t          |d,d+d-t           j        d.(           t          |dddL           |                    dMdNddO           |                    dPdQddR           |                    dddSt           j        dT           |                    ddddd t           j        d!d"#           |                    d$d%dt           j        dU(           t          |d)dt           j        dV(           |                    dWdd&dX(           |                    dYt          ddZd[\           t          |d/dt           j        d0(           t          |d1dt           j        d2(           t          |d3dt           j        d](           t          |d5dt           j        d^(           |                    d_dd`           t          |d7dd&d8(           t          |d9d:dd&d;<           | ||fS )aa  Build the top-level parser, the subparsers action, and the ``chat`` subparser.

    Returns ``(parser, subparsers, chat_parser)``. The caller wires
    ``chat_parser.set_defaults(func=cmd_chat)`` and continues registering
    other subparsers via ``subparsers.add_parser(...)``.
    hermesz:Hermes Agent - AI assistant with tool-calling capabilities)progdescriptionformatter_classepilogz	--versionz-V
store_truezShow version and exit)r
   helpz-zz	--oneshotPROMPTNa  One-shot mode: send a single prompt and print ONLY the final response text to stdout. No banner, no spinner, no tool previews, no session_id line. Tools, memory, rules, and AGENTS.md in the CWD are loaded as normal; approvals are auto-bypassed. Intended for scripts / pipes.)metavardefaultr   z-mz--modelzModel override for this invocation (e.g. anthropic/claude-sonnet-4.6). Applies to -z/--oneshot and --tui. Also settable via HERMES_INFERENCE_MODEL env var.)r   r   z
--providerzProvider override for this invocation (e.g. openrouter, anthropic). Applies to -z/--oneshot and --tui. Also settable via HERMES_INFERENCE_PROVIDER env var.z-tz
--toolsetszZComma-separated toolsets to enable for this invocation. Applies to -z/--oneshot and --tui.z--resumez-rSESSIONz(Resume a previous session by ID or titlez
--continuez-ccontinue_last?TSESSION_NAMEz=Resume a session by name, or the most recent if no name given)destnargsconstr   r   r   z
--worktreez-wFz5Run in an isolated git worktree (for parallel agents))r
   r   r   z--accept-hookszAuto-approve any unseen shell hooks declared in config.yaml without a TTY prompt.  Equivalent to HERMES_ACCEPT_HOOKS=1 or hooks_auto_accept: true in config.yaml.  Use on CI / headless runs that can't prompt.z--skillsz-sappendzJPreload one or more skills for the session (repeat flag or comma-separate)z--yolozDBypass all dangerous command approval prompts (use at your own risk)z--pass-session-idz3Include the session ID in the agent's system promptz--ignore-user-configzfIgnore ~/.hermes/config.yaml and fall back to built-in defaults (credentials in .env are still loaded)z--ignore-ruleszUSkip auto-injection of AGENTS.md, SOUL.md, .cursorrules, memory, and preloaded skillsz--tuiz1Launch the modern TUI instead of the classic REPLz--devtui_devz<With --tui: run TypeScript sources via tsx (skip dist build))r   r
   r   r   commandzCommand to run)r   r   chatzInteractive chat with the agentz3Start an interactive chat session with Hermes Agent)r   r   z-qz--queryz#Single query (non-interactive mode))r   z--imagez5Optional local image path to attach to a single queryz.Model to use (e.g., anthropic/claude-sonnet-4)z"Comma-separated toolsets to enablezeInference provider (default: auto). Built-in or a user-defined name from `providers:` in config.yaml.z-vz	--verbosezVerbose outputz-Qz--quietz~Quiet mode for programmatic use: suppress banner, spinner, and tool previews. Only output the final response and session info.
SESSION_IDz/Resume a previous session by ID (shown on exit)zFRun in an isolated git worktree (for parallel agents on the same repo)zAuto-approve any unseen shell hooks declared in config.yaml without a TTY prompt (see also HERMES_ACCEPT_HOOKS env var and hooks_auto_accept: in config.yaml).z--checkpointsz[Enable filesystem checkpoints before destructive file operations (use /rollback to restore)z--max-turnsNzaMaximum tool-calling iterations per conversation turn (default: 90, or agent.max_turns in config))typer   r   r   zIgnore ~/.hermes/config.yaml and fall back to built-in defaults (credentials in .env are still loaded). Useful for isolated CI runs, reproduction, and third-party integrations.zSkip auto-injection of AGENTS.md, SOUL.md, .cursorrules, memory, and preloaded skills. Combine with --ignore-user-config for a fully isolated run.z--sourcezSession source tag for filtering (default: cli). Use 'tool' for third-party integrations that should not appear in user session lists.)
argparseArgumentParserRawDescriptionHelpFormatter	_EPILOGUEr   r   add_subparsers
add_parserSUPPRESSint)r   
subparserschat_parsers      r   build_top_level_parserr1   R   s    $P <	  F T,5L     ;    " c	 	 	 	 f    i	     7     L  	 	 	 D     &    Y    S    B    u    d    @    K    &&I<L&MMJ
 ''.I (  K
 iC     O     iN    l!E     !Y    
 t	 	 	 	 k,5E      N	     !>     !L  	 	 	 !U     !2
 
 
 
 j	     p     !S    !B    ! @    ! b     V    
 @    K    :{**r   )__doc__r'   r   listtuplestrbool__annotations__r   r*   r1    r   r   <module>r9      s   
 
 
  8 d5d#34     '	Tf+ f+ f+ f+ f+r   