CLI & Command

COMMAND_REGISTRY Command Registry Alias & Self-Healing Dispatch

Decrypting hermes_cli/commands.py command declarations & cli.py name-based routing flow
Command dispatch
📊 Fig 11-1-1: CLI command input, alias self-healing resolution & interactive command dispatch flow

💻 1. COMMAND_REGISTRY Central Command Table

In hermes_cli/commands.py, all slash commands are centrally declared through CommandDef, covering alias registration, permission gateway filtering, command descriptions, and parameter prompt settings. Other modules can dynamically subscribe to this registry to auto-generate command completions and documentation.

Skin mapping
📊 Fig 11-1-2: Skin loading engine, HSL geek color mapping & KawaiiSpinner terminal binding diagram

🔄 2. Command Alias Self-Healing Routing & Autocompletion

When a user types a shortened alias (e.g., /bg) in the interactive terminal, resolve_command() in cli.py automatically completes and corrects it, routing it to the actual implementation function — avoiding numerous hardcoded mappings.