The check deps command visualizes and analyzes infrastructure dependencies in your Terragrunt projects. It parses the DAG (Directed Acyclic Graph) from terragrunt dag graph, calculates component risk scores, and renders the topology in multiple formats.
# Default: Rich tree with risk percentages
thothctl check iac -type deps
# ASCII box topology (best for terminal sharing)
thothctl check iac -type deps --format boxart
# Interactive HTML in browser (vis.js graph)
thothctl check iac -type deps --format html
# Raw DOT output (pipe to graphviz or other tools)
thothctl check iac -type deps --format dot
| Format | Description | Use Case |
|---|---|---|
tree |
Rich tree with color-coded risk | Default terminal view |
boxart |
ASCII box drawing topology | Copy/paste into docs, Slack, PRs |
html |
Interactive vis.js graph in browser | Presentations, exploration |
dot |
Raw GraphViz DOT | Pipe to dot, neato, custom tools |
Infrastructure Modules
└── stacks/observability/network/reachability-analyzer (31.0% risk)
├── stacks/foundation/network/security-groups (38.5% risk)
│ └── stacks/foundation/network/vpc (46.5% risk)
└── stacks/platform/data/rds (42.5% risk)
✅ Found 5 stacks, 12 modules, 10 dependencies
The summary counts:
terragrunt.hcl)module blocks across all stack .tf filesdependency blocks)┌───────────────┐ ┌──────────────────┐
│ vpc 47% │ │ security-groups 39% │
└───────────────┘ └──────────────────┘
│ │
▼ ▼
┌───────────────┐ ┌──────────────────┐
│ rds 43% │ │ vpc-lattice 34% │
└───────────────┘ └──────────────────┘
For best quality boxart, install graph-easy:
| OS | Install Command |
|---|---|
| Linux (Debian/Ubuntu) | sudo apt install libgraph-easy-perl |
| macOS | brew install graph-easy |
| Windows | choco install graphviz then use --format dot \| dot -Tpng -o graph.png |
Note: Without
graph-easy, ThothCTL uses a built-in Python fallback renderer.
Opens an interactive topology in your default browser with:
Reports/dependency_topology.htmlOutputs raw DOT graph for piping:
# Generate PNG image
thothctl check iac -type deps --format dot | dot -Tpng -o topology.png
# Generate SVG
thothctl check iac -type deps --format dot | dot -Tsvg -o topology.svg
# Open in xdot viewer
thothctl check iac -type deps --format dot | xdot -
| Tool | Required | Install |
|---|---|---|
terragrunt |
✅ Required | terragrunt.gruntwork.io |
graphviz |
Optional (for --format dot piping) |
See below |
graph-easy |
Optional (for --format boxart enhanced output) |
See below |
| OS | Command |
|---|---|
| Linux (Debian/Ubuntu) | sudo apt install graphviz |
| macOS | brew install graphviz |
| Windows | choco install graphviz |
| OS | Command |
|---|---|
| Linux (Debian/Ubuntu) | sudo apt install libgraph-easy-perl |
| macOS | brew install graph-easy |
| Windows (WSL) | sudo apt install libgraph-easy-perl |
Windows native:
graph-easyis a Perl tool. On native Windows, use WSL or the--format htmlalternative.
dependency blocks--format dot for pipeline image generation, --format boxart for PR comments# Generate boxart for PR comment
echo '```' > /tmp/deps.md
thothctl check iac -type deps --format boxart >> /tmp/deps.md
echo '```' >> /tmp/deps.md
gh pr comment --body-file /tmp/deps.md
thothctl check iac -type deps --format html
# → Opens browser + saves Reports/dependency_topology.html
check blast-radius — Assess change impact analysischeck tfplan — Analyze Terraform plansinventory iac — Create dependency inventorydocument iac — Generate documentation with graphs