Module

components_cli

milo components— discover bundled and user-defined template components.

Walks the bundledsrc/milo/templates/components/tree (and any extra path the caller supplies) and lists the{% def %}macros each template exposes. Backed by Kida'sTemplate.def_metadata()introspection.

Functions

_collect_defs 1 list[dict[str, Any]]
Walk *roots* and return one row per (template_name, def_name) pair.
def _collect_defs(roots: tuple[Path, ...]) -> list[dict[str, Any]]
Parameters
Name Type Description
roots tuple[Path, ...]
Returns
list[dict[str, Any]]
run 2 int
Entry point used by ``milo components``. Returns exit code.
def run(*, paths: tuple[Path, ...] = (), as_json: bool = False) -> int
Parameters
Name Type Description
paths tuple[Path, ...] Default:()
as_json bool Default:False
Returns
int