Infralight: A vibecoded Visual Dashboard for SaltStack & Terraform
Where This Started
At my previous job I worked with SaltStack and Terraform. As the project grew, it became harder to keep track of what was installed where, which states depended on each other, and what a given change might affect. The usual approach was going through YAML files, which worked but wasn’t great.
I wanted a simple tool that could scan a directory of .sls or .tf files and show me what’s in there — without needing a running Salt Master or Terraform state. I couldn’t find one, so I though it may be a good idea to build something my self.
What Infralight Does
Infralight is browser-based dashboard that scans a project directory and gives you instant visibility into your infrastructure code — no Salt Master required, no Terraform state files needed.
Point it at any directory containing .sls or .tf files and you get:
- A dashboard showing file counts, resource totals, and potential issues at a glance
- A Salt States browser where every file is listed with its state count and modules used — click to inspect parsed states and raw YAML
- A Salt Overview that categorises every resource by module type: packages, services, files, commands, users, cron jobs, and more — each in a sortable, filterable table
- A dependency graph that parses all requisites (
require,watch,onchanges,listenand their_invariants) so you can finally answer “what breaks if I remove this?” - Terraform resource browsing with the same treatment — resources, data sources, variables, outputs, and modules with their properties and source locations
Infrastructure Visualisation with IL Decorators
One feature I’m particularly excited about: IL decorators — Jinja2 template functions you embed directly in your IaC files:
{{ il_group("web", label="Web Tier", icon="globe", color="#42A5F5") }}
{{ il_node("nginx", label="Nginx LB", icon="dns", group="web") }}
nginx:
pkg.installed:
- name: nginx
service.running:
- enable: True
{{ il_edge("nginx", "app", label="proxy_pass :8080") }}
These render to empty strings — your output is still valid SaltStack YAML or Terraform HCL. But Infralight reads them and generates an interactive architecture diagram. The diagram lives in the code and updates every time you edit. No separate diagramming tool, no stale Confluence page.
The Tech Stack
Infralight is a Python app with minimal dependencies: NiceGUI for the browser UI, Jinja2 for template rendering, PyYAML for Salt parsing, and regex-based HCL parsing for Terraform. No database, no external services. Install with pip install -e . and run with python -m infralight.main.
The architecture follows a clean MVC pattern with typed dataclasses throughout — controllers return typed view-models, views use dot-access instead of magic string keys, and the model layer is completely decoupled from the UI.
Getting Started
git clone https://github.com/WannaBeKratos/infralight.git
cd infralight
python -m venv .venv
.venv/Scripts/activate # Windows
# source .venv/bin/activate # Linux/macOS
pip install -e .
python -m infralight.main
Open http://localhost:8080, click Open Folder, and point at any directory with .sls or .tf files. That’s it.
What’s Next
Infralight is at v0.1.0. On the roadmap: pillar data visualisation, grain-based filtering, Terraform plan integration, HTML/SVG export for documentation, and optional Salt Master API connectivity.
It’s MIT-licensed — contributions and feedback are welcome.
This project started as a personal itch. I wanted the kind of visibility into infrastructure code that we take for granted with application code. Infralight is my attempt at closing that gap.
Infralight — see your infrastructure.