diff --git a/cli-config.yaml.example b/cli-config.yaml.example index 6b1cf97c0..ec7ccb620 100644 --- a/cli-config.yaml.example +++ b/cli-config.yaml.example @@ -635,3 +635,8 @@ display: # verbose: Full args, results, and debug logs (same as /verbose) # Toggle at runtime with /verbose in the CLI tool_progress: all + + # Play terminal bell when agent finishes a response. + # Useful for long-running tasks — your terminal will ding when the agent is done. + # Works over SSH. Most terminals can be configured to flash the taskbar or play a sound. + bell_on_complete: false diff --git a/cli.py b/cli.py index 362fc6f2d..4820069ef 100755 --- a/cli.py +++ b/cli.py @@ -1036,6 +1036,8 @@ class HermesCLI: self.tool_progress_mode = CLI_CONFIG["display"].get("tool_progress", "all") # resume_display: "full" (show history) | "minimal" (one-liner only) self.resume_display = CLI_CONFIG["display"].get("resume_display", "full") + # bell_on_complete: play terminal bell (\a) when agent finishes a response + self.bell_on_complete = CLI_CONFIG["display"].get("bell_on_complete", False) self.verbose = verbose if verbose is not None else (self.tool_progress_mode == "verbose") # Configuration - priority: CLI args > env vars > config file @@ -3126,6 +3128,12 @@ class HermesCLI: # nothing can interleave between the box borders. _cprint(f"\n{top}\n{response}\n\n{bot}") + # Play terminal bell when agent finishes (if enabled). + # Works over SSH — the bell propagates to the user's terminal. + if self.bell_on_complete: + sys.stdout.write("\a") + sys.stdout.flush() + # Combine all interrupt messages (user may have typed multiple while waiting) # and re-queue as one prompt for process_loop if pending_message and hasattr(self, '_pending_input'): diff --git a/hermes_cli/config.py b/hermes_cli/config.py index 184440a5a..8c8c79b63 100644 --- a/hermes_cli/config.py +++ b/hermes_cli/config.py @@ -108,6 +108,7 @@ DEFAULT_CONFIG = { "compact": False, "personality": "kawaii", "resume_display": "full", # "full" (show previous messages) | "minimal" (one-liner only) + "bell_on_complete": False, # Play terminal bell (\a) when agent finishes a response }, # Text-to-speech configuration diff --git a/website/docs/user-guide/configuration.md b/website/docs/user-guide/configuration.md index 0420b435f..b600a4761 100644 --- a/website/docs/user-guide/configuration.md +++ b/website/docs/user-guide/configuration.md @@ -581,6 +581,7 @@ display: personality: "kawaii" # Default personality for the CLI compact: false # Compact output mode (less whitespace) resume_display: full # full (show previous messages on resume) | minimal (one-liner only) + bell_on_complete: false # Play terminal bell when agent finishes (great for long tasks) ``` | Mode | What you see |