From 7f36259f8834be45756ff441e87d49cd7a2cb87a Mon Sep 17 00:00:00 2001 From: 0xbyt4 <35742124+0xbyt4@users.noreply.github.com> Date: Thu, 26 Feb 2026 23:49:08 +0300 Subject: [PATCH] fix(cli): show correct config file path in /config command show_config() always checked cli-config.yaml in the project directory, but load_cli_config() first looks at ~/.hermes/config.yaml. When the user config existed, /config would display "cli-config.yaml (not found)" even though configuration was loaded successfully from ~/.hermes/. Use the same lookup order as load_cli_config and display the actual resolved path. --- cli.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cli.py b/cli.py index 10d43ea7c..8def0bd7d 100755 --- a/cli.py +++ b/cli.py @@ -1139,7 +1139,12 @@ class HermesCLI: terminal_cwd = os.getenv("TERMINAL_CWD", os.getcwd()) terminal_timeout = os.getenv("TERMINAL_TIMEOUT", "60") - config_path = Path(__file__).parent / 'cli-config.yaml' + user_config_path = Path.home() / '.hermes' / 'config.yaml' + project_config_path = Path(__file__).parent / 'cli-config.yaml' + if user_config_path.exists(): + config_path = user_config_path + else: + config_path = project_config_path config_status = "(loaded)" if config_path.exists() else "(not found)" api_key_display = '********' + self.api_key[-4:] if self.api_key and len(self.api_key) > 4 else 'Not set!' @@ -1171,7 +1176,7 @@ class HermesCLI: print() print(" -- Session --") print(f" Started: {self.session_start.strftime('%Y-%m-%d %H:%M:%S')}") - print(f" Config File: cli-config.yaml {config_status}") + print(f" Config File: {config_path} {config_status}") print() def show_history(self):