Skip to content

feat(cli): add display.show_banner option for minimal startup - #23679

Closed
konsisumer wants to merge 1 commit into
NousResearch:mainfrom
konsisumer:feat/cli-disable-startup-banner
Closed

feat(cli): add display.show_banner option for minimal startup#23679
konsisumer wants to merge 1 commit into
NousResearch:mainfrom
konsisumer:feat/cli-disable-startup-banner

Conversation

@konsisumer

Copy link
Copy Markdown
Contributor

Adds a display.show_banner flag (default true) that lets users skip the startup banner for a clean, focused screen — the "Ctrl+L" feel the reporter described.

What changed and why

  • cli.py: read display.show_banner in HermesCLI.__init__. Gate both the startup show_banner() method and the /new command's banner re-render on the new flag. Screen-clear and the post-banner diagnostic warnings (disabled tools, low context length) are intentionally still executed so genuine problems surface.
  • cli-config.yaml.example: documented the new option under display: next to compact.
  • tests/cli/test_cli_show_banner_option.py: new tests covering enable/disable behavior in full and compact modes, plus the default-when-missing case.
  • tests/cli/test_cli_context_warning.py: the existing fixture that constructs HermesCLI via __new__ now also sets show_startup_banner = True so it matches __init__'s default.

How to test

  • Set display.show_banner: false in ~/.hermes/config.yaml, then run hermes — the startup screen should clear and skip the banner panel, leaving any tool/context warnings (if applicable) and the welcome line.
  • Default (or display.show_banner: true) should be unchanged.
  • Inside a session, /new should clear the screen; with the flag off, the banner is not redrawn but the "Fresh start!" message and tip still appear.
  • pytest tests/cli/test_cli_show_banner_option.py tests/cli/test_cli_context_warning.py -q.

What platforms tested on

  • macOS on darwin-arm64 (local): focused pytest run for banner-related tests (62 passed; 1 unrelated _make_real_cli-reload flake also fails on main).

Fixes #23487

@alt-glitch alt-glitch added type/feature New feature or request comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have labels May 11, 2026
@konsisumer
konsisumer force-pushed the feat/cli-disable-startup-banner branch from fda4da4 to b82cf02 Compare May 17, 2026 07:51
@konsisumer

Copy link
Copy Markdown
Contributor Author

Rebased onto current origin/main and resolved the cli.py banner conflicts without expanding scope.

Scoped verification passed: tests/cli/test_cli_show_banner_option.py and tests/cli/test_cli_context_warning.py.

Local pytest tests/ -q -x --timeout=60 did not reach PR-specific failures here; collection stopped in tests/hermes_cli/test_cron_fire_dashboard.py because this environment is missing fastapi/uvicorn for the dashboard test imports.

@konsisumer
konsisumer force-pushed the feat/cli-disable-startup-banner branch from b82cf02 to 935cdc4 Compare June 27, 2026 22:03

@teknium1 teknium1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for targeting the noisy classic-CLI startup path. Current main still calls show_banner() from HermesCLI.run() (cli.py:13146), so the linked request remains applicable.

Problems

  • show_banner is read with a local fallback at PR cli.py:3474, but the option is absent from both default-config surfaces: cli.py:449 and hermes_cli/config.py:1749. The shared default controls reset/setup and new-option detection (hermes_cli/config.py:4573-4598, 6178-6187).
  • The added tests call show_banner() directly (tests/cli/test_cli_show_banner_option.py:94-175). They do not cover the changed prompt-toolkit /new branch at PR cli.py:8140-8162 or prove diagnostic warnings still run.

Suggested changes

  • Add display.show_banner: true to both default dictionaries.
  • Add a /new regression test for show_banner: false, including the prompt-toolkit path and retained warning behavior.

Automated hermes-sweeper review.

Comment thread cli.py
# show_banner: when False, suppress the ASCII-art / compact welcome
# banner at startup and on /new for a minimal "Ctrl+L" feel.
# Diagnostic warnings (disabled tools, low context) are still shown.
self.show_startup_banner = CLI_CONFIG["display"].get("show_banner", True)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also add this default to both configuration schemas: cli.py's load_cli_config() defaults and hermes_cli/config.py's shared DEFAULT_CONFIG. The shared defaults are used by setup/reset and missing-option reporting, so the example file and this fallback alone leave the option outside those config surfaces.

assert mock_compact.call_count == 0


def test_show_banner_skipped_when_show_banner_false():

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These tests exercise show_banner() directly, but the PR also changes the prompt-toolkit /new branch. Please add a show_banner: false /new regression test that verifies banner helpers are skipped while the fresh-start message and diagnostic warnings remain.

@teknium1 teknium1 added sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades sweeper:blast-contained Sweeper blast radius: contained — one narrow path / opt-in / few users labels Jul 13, 2026
@konsisumer

Copy link
Copy Markdown
Contributor Author

Thanks for the review. Addressed in this push:

  • CLI default: added display.show_banner: true to the cli.py default configuration.
  • Prompt-toolkit reset path: added regression coverage for /clear with show_banner: false, verifying the screen reset still occurs while neither banner variant renders.
  • Diagnostics: expanded the disabled-banner test to verify tool-availability warnings still run.

The shared hermes_cli/config.py default requested in the review is outside this PR's original allowed file list, so I left it unchanged rather than expanding the PR's scope.

Focused tests passed: tests/cli/test_cli_show_banner_option.py and tests/cli/test_cli_context_warning.py; lint passed for the changed Python files.

@konsisumer

Copy link
Copy Markdown
Contributor Author

Closing — on reflection, feat(cli): add display.show_banner option for minimal startup omits the shared default config needed by setup/reset. Please reopen with it attached.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have sweeper:blast-contained Sweeper blast radius: contained — one narrow path / opt-in / few users sweeper:risk-compatibility Sweeper risk: may break existing users, config, migrations, defaults, or upgrades type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Option to disable new session banner/info

3 participants