-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcli_utils.py
More file actions
25 lines (20 loc) · 801 Bytes
/
cli_utils.py
File metadata and controls
25 lines (20 loc) · 801 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
"""
cli_utils.py - Consistent CLI output helpers for LoreBuilder.
"""
from rich import print as rprint
def cli_error(msg: str):
"""Display an error message (red, with [ERROR] prefix)."""
rprint(f"[bold red][ERROR][/bold red] {msg}")
def cli_warn(msg: str):
"""Display a warning message (yellow, with [WARNING] prefix)."""
rprint(f"[bold yellow][WARNING][/bold yellow] {msg}")
def cli_info(msg: str):
"""Display informational message (cyan)."""
rprint(f"[cyan]{msg}")
def cli_success(msg: str):
"""Display a success message (green, with checkmark)."""
rprint(f"[bold green]✔[/bold green] {msg}")
def cli_debug(msg: str, verbose: bool = False):
"""Display a debug message (grey/dim), if verbosity is set."""
if verbose:
rprint(f"[dim]{msg}[/dim]")