Doctor Report Primitives (hermes_cli/doctor_report.py)

hermes-agent · hermes_cli/doctor_report.py · python · MIT
dev-tools, cli, infra, lang:python, tag:colors

Shared CLI diagnostic helpers for printing pass/warn/fail status checks with colored glyphs and detail messages, used across hermes_cli doctor modules.

# Source: https://github.com/NousResearch/hermes-agent | License: MIT | Copyright 2025 Nous Research
# Provided via justclaw.it.com; keep this notice with the code.
"""Doctor output primitives shared by every ``hermes_cli.doctor_*`` module."""

from __future__ import annotations

import functools
from contextlib import contextmanager
from dataclasses import dataclass, field

from hermes_cli.colors import Colors, color


def _mark(glyph: str, col: str):
    return lambda text, detail="": print(f"  {color(glyph, col)} {text}" + (f" {color(detail, Colors.DIM)}" if detail else ""))


check_ok, check_warn, check_fail = _mark("✓", Colors.GREEN), _mark("⚠", Colors.YELLOW), _mark("✗", Colors.RED)


def check_info(text: str):
    print(f"    {color('→', Colors.CYAN)} {text}")


def check_bool(cond,

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key