diff --git a/honcho-cli/src/honcho_cli/branding.py b/honcho-cli/src/honcho_cli/branding.py new file mode 100644 index 00000000..1d5df59e --- /dev/null +++ b/honcho-cli/src/honcho_cli/branding.py @@ -0,0 +1,17 @@ +"""Honcho CLI brand constants — colours, icons, and the ASCII banner. +""" + +BRAND = "#B6DAFD" + +BANNER = r""" +██╗ ██╗ ██████╗ ███╗ ██╗ ██████╗██╗ ██╗ ██████╗ +██║ ██║██╔═══██╗████╗ ██║██╔════╝██║ ██║██╔═══██╗ +███████║██║ ██║██╔██╗ ██║██║ ███████║██║ ██║ +██╔══██║██║ ██║██║╚██╗██║██║ ██╔══██║██║ ██║ +██║ ██║╚██████╔╝██║ ╚████║╚██████╗██║ ██║╚██████╔╝ +╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═════╝╚═╝ ╚═╝ ╚═════╝ +""".strip() + +ICON_OK = "[green]✓[/green]" +ICON_FAIL = "[red]✗[/red]" +ICON_RUN = f"[{BRAND}]→[/{BRAND}]" diff --git a/honcho-cli/src/honcho_cli/commands/setup.py b/honcho-cli/src/honcho_cli/commands/setup.py index bf5217a8..193ab222 100644 --- a/honcho-cli/src/honcho_cli/commands/setup.py +++ b/honcho-cli/src/honcho_cli/commands/setup.py @@ -19,16 +19,11 @@ from honcho_cli.config import ( DEFAULT_BASE_URL, CLIConfig, ) -from honcho_cli.main import BANNER, get_resolved_config +from honcho_cli.branding import BANNER, BRAND, ICON_FAIL, ICON_OK, ICON_RUN from honcho_cli.output import print_error, print_result _console = Console(stderr=True) -BRAND = "#B6DAFD" -ICON_OK = "[green]✓[/green]" -ICON_FAIL = "[red]✗[/red]" -ICON_RUN = f"[{BRAND}]→[/{BRAND}]" - # --------------------------------------------------------------------------- # # shared helpers @@ -211,6 +206,8 @@ def doctor( if not use_json(): _console.print(f"\n[bold {BRAND}]Honcho Doctor[/bold {BRAND}]\n") + from honcho_cli.main import get_resolved_config + config = get_resolved_config() _add("Config file", CONFIG_FILE.exists(), str(CONFIG_FILE) if CONFIG_FILE.exists() else f"{CONFIG_FILE} not found") diff --git a/honcho-cli/src/honcho_cli/main.py b/honcho-cli/src/honcho_cli/main.py index 85c82ba1..5f8e04cc 100644 --- a/honcho-cli/src/honcho_cli/main.py +++ b/honcho-cli/src/honcho_cli/main.py @@ -10,17 +10,9 @@ from typing import Optional import typer from honcho_cli import __version__ +from honcho_cli.branding import BANNER, BRAND from honcho_cli.output import set_json_mode -BANNER = r""" -██╗ ██╗ ██████╗ ███╗ ██╗ ██████╗██╗ ██╗ ██████╗ -██║ ██║██╔═══██╗████╗ ██║██╔════╝██║ ██║██╔═══██╗ -███████║██║ ██║██╔██╗ ██║██║ ███████║██║ ██║ -██╔══██║██║ ██║██║╚██╗██║██║ ██╔══██║██║ ██║ -██║ ██║╚██████╔╝██║ ╚████║╚██████╗██║ ██║╚██████╔╝ -╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═════╝╚═╝ ╚═╝ ╚═════╝ -""".strip() - app = typer.Typer( name="honcho", help="A terminal for Honcho — memory that reasons.", @@ -77,7 +69,7 @@ def main( console = Console() if not use_json(): - console.print(f"[bold #B6DAFD]{BANNER}[/bold #B6DAFD]") + console.print(f"[bold {BRAND}]{BANNER}[/bold {BRAND}]") console.print(f" [dim]v{__version__}[/dim]\n") console.print(ctx.get_help()) raise typer.Exit()