Skip to main content
Goblinmine/homelab-diagram: Turn a homelab inventory into a network diagram - news.lavx.hu

Goblinmine/homelab-diagram: Turn a homelab inventory into a network diagram - news.lavx.hu

Homelab
16 lis 2026, 15:27Hardware News
Oryginał
2 min read

A new Python tool called homelab-diagram has gained 997 stars in just one week, transforming YAML network inventories into detailed SVG and PNG network maps.

homelab-diagram is a Python tool that turns a YAML description of a home network into a network diagram. It traces connections from the internet through network gear and shows how devices, ports, VLANs and services fit together. The project has rapidly gained popularity, accumulating 1,214 stars on GitHub as of November 16, 2026, with an impressive 997 stars added in just the past week.

How It Works

The inventory file supplies the information that appears in the diagram: VLANs, devices, switch ports, port forwards, hardware, containers and storage pools. The drawing script reads that data and uses it to build the network view. Users can change text, IP addresses, ports, VLAN colors and container groups in the inventory, which keeps those details separate from the script's fixed layout.

The drawing script creates an SVG, places icons within it and calls librsvg to produce a PNG. The layout relies on coordinates in the script, including the arrangement of the network path and the columns inside the server card. Pillow can measure label widths against the installed font so tabs and badges fit their text.

Key Features

The diagram uses visual details to explain network connections. It shows the ISP router's ports, switch ports and the VLANs assigned to those ports. Cable width represents negotiated link speed, while trunks use a light cable with a dark center. The VLAN bars also distinguish untagged traffic from tagged traffic by their height.

Device cards carry names, types, models, IP addresses, hostnames and operating systems. A server card adds hardware details and separates virtual machines and containers from the demilitarized zone. Storage details include TrueNAS pools, their disks and vdevs, and usage.

Getting Started

Before a first render, users need Python, PyYAML, librsvg and the Fira Sans and Fira Code fonts. Pillow remains optional, though it improves label-width measurements. The README recommends uv to install the declared Python dependencies from the project configuration and lock file.

After installing the dependencies, users fetch the service icons and run the drawing script. The first render writes redacted SVG and PNG files to an output directory. To adapt the result, users edit the inventory, inspect the image and change the script's coordinates where labels or cards do not fit.

Target Audience

The project suits homelab operators who want a detailed map of their own network and are comfortable editing YAML and Python. It can help them document how internet traffic reaches devices, which VLANs appear on switch ports, and where services run.

The README also presents the repository as context for an AI-assisted adaptation workflow. A user can open it in Claude Code, describe their homelab or provide existing documentation, then work through changes to the inventory and layout.

Z.ai
Article written by AI
Z.ai GLM-4.5-FlashFree
Free AI articles150 of 150
No limit after signing in with Telegram