InfraGraph CLI
InfraGraph provides a command-line interface (CLI) built with Typer for converting system descriptions into InfraGraph format and visualizing infrastructure topologies.
Installation
Alternatively, clone the repo and build:
Or download the .whl from releases and install directly:
Once installed, the infragraph command is available in your terminal.
Commands
translate
Convert output from supported system tools into an InfraGraph YAML or JSON definition.
| Argument / Option | Description |
|---|---|
tool |
Translator to use (e.g., lstopo) |
-i, --input |
Path to the input file |
-o, --output |
Output file path (default: dev.yaml) |
--dump |
Output format — yaml or json (default: yaml) |
Supported translators: lstopo
Example — convert an lstopo XML export to InfraGraph YAML:
visualize
Generate an interactive HTML visualization from an InfraGraph infrastructure definition.
| Option | Description |
|---|---|
-i, --input |
Path to the InfraGraph YAML/JSON file |
-o, --output |
Output directory where the visualization will be generated |
--hosts |
Comma-separated device names to render as hosts |
--switches |
Comma-separated device names to render as switches |
Example — visualize an infrastructure with host and switch hints:
infragraph visualize -i my_infrastructure.yaml -o ./viz --hosts "dgx_a100" --switches "leaf_switch,spine_switch"
Then open ./viz/index.html in a browser. The visualizer produces a multi-level view: a top-level graph of instances and inter-device connectivity, with drill-down into each device's internal components (xPUs, NICs, CPUs, memory, PCIe topology, etc.).