Classes
HealthResult
5
▼
Result of a CLI health check.
HealthResult
5
▼
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.
_load
0
dict[str, Any]
▼
def _load() -> dict[str, Any]
Returns
dict[str, Any]
_save
1
None
▼
Save the registry file.
_save
1
None
▼
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.
install
5
None
▼
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.
uninstall
1
bool
▼
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.
list_clis
0
dict[str, dict[str, Any]]
▼
def list_clis() -> dict[str, dict[str, Any]]
Returns
dict[str, dict[str, Any]]
registry_path
0
Path
▼
Return the registry file path.
registry_path
0
Path
▼
def registry_path() -> Path
Returns
Path
fingerprint
2
str
▼
Compute a SHA-256 fingerprint for a CLI entry.
fingerprint
2
str
▼
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.
_health_check_entry
2
HealthResult
▼
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.
health_check
1
HealthResult
▼
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.
check_all
1
list[HealthResult]
▼
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.
doctor
0
str
▼
def doctor() -> str
Returns
str