Module

registry

Milo CLI registry — tracks installed CLIs for gateway discovery.

Classes

HealthResult 5
Result of a CLI health check.

Result of a CLI health check.

Attributes

Name Type Description
name str
reachable bool
latency_ms float
error str
stale bool

Functions

_load 0 dict[str, Any]
Load the registry file.
def _load() -> dict[str, Any]
Returns
dict[str, Any]
_save 1 None
Save the registry file.
def _save(data: dict[str, Any]) -> None
Parameters
Name Type Description
data dict[str, Any]
install 5 None
Register a CLI in the milo registry.
def install(name: str, command: list[str], *, description: str = '', version: str = '', project_root: str = '') -> None
Parameters
Name Type Description
name str

CLI name (used as namespace prefix in the gateway).

command list[str]

Shell command to start the CLI with --mcp.

description str

Human-readable description.

Default:''
version str

CLI version string.

Default:''
project_root str

Absolute path to the project root.

Default:''
uninstall 1 bool
Remove a CLI from the milo registry. Returns True if it was found.
def uninstall(name: str) -> bool
Parameters
Name Type Description
name str
Returns
bool
list_clis 0 dict[str, dict[str, Any]]
Return all registered CLIs.
def list_clis() -> dict[str, dict[str, Any]]
Returns
dict[str, dict[str, Any]]
registry_path 0 Path
Return the registry file path.
def registry_path() -> Path
Returns
Path
fingerprint 2 str
Compute a SHA-256 fingerprint for a CLI entry.
def fingerprint(command: list[str], project_root: str) -> str
Parameters
Name Type Description
command list[str]
project_root str
Returns
str
_health_check_entry 2 HealthResult
Ping a single CLI entry using pre-loaded registry info.
def _health_check_entry(name: str, info: dict[str, Any]) -> HealthResult
Parameters
Name Type Description
name str
info dict[str, Any]
Returns
HealthResult
health_check 1 HealthResult
Ping a registered CLI with initialize and measure latency.
def health_check(name: str) -> HealthResult
Parameters
Name Type Description
name str
Returns
HealthResult
check_all 1 list[HealthResult]
Run health checks on all registered CLIs in parallel.
def check_all(clis: dict[str, dict[str, Any]] | None = None) -> list[HealthResult]
Parameters
Name Type Description
clis dict[str, dict[str, Any]] | None Default:None
Returns
list[HealthResult]
doctor 0 str
Generate a diagnostic report for all registered CLIs.
def doctor() -> str
Returns
str