Menu Manager
The Menu Manager produces YAML menu definition files that customize the Infrahub web UI sidebar. Menus can be flat or deeply nested, with group headers, icons, and ordering. The skill generates syntactically correct menu YAML and handles the nesting structure that is easy to get wrong by hand.
When to use
- Replacing Infrahub's auto-generated sidebar navigation with a custom structure
- Grouping schema nodes into logical sections (e.g., "IP Management", "Network Topology", "Inventory")
- Adding nested sub-menus and section headers
- Controlling the ordering of menu items
What it produces
- YAML file with
apiVersion,kind: Menu, and aspec.datablock containing the menu tree - Loaded into Infrahub alongside schema and object files
Example prompts
- "Create a menu with sections for Network Topology, IP Management, and Inventory — each with relevant schema nodes nested underneath"
- "Build a flat menu that lists Device, Interface, Site, and Rack in that order"
- "Add a nested sub-menu under Network Topology for BGP with entries for BGP Sessions and BGP Peers"
Key rules enforced
spec.datawrapping — the top-level menu items must be inspec.data; a common mistake is writingspec:followed by a list directlychildren.datawrapping — nested items must usechildren.data:notchildren:directly; this is the most common nesting mistakekindvspath— each item uses eitherkind:(links to a schema node's list view) orpath:(links to a custom URL), never both- Group headers — section headers with no link (no
kindorpath) are valid and used for visual grouping - Icon format — icons use the Material Design Icons format with
mdi:prefix (e.g.,mdi:server,mdi:ip-network) order_weight— integer controlling item display order; lower numbers appear first
Loading
Load a menu file into a running Infrahub instance:
infrahubctl menu load <menu-file>