Skip to content

graph

Display the dependency graph of your infrastructure config as an ASCII tree or Graphviz DOT output.

Terminal window
kyku graph [options]
Flag Default Description
-c, --config <path> ./infrastructure.ts Path to config file
--dot false Output in Graphviz DOT format
Terminal window
# Show ASCII dependency tree
kyku graph
# Output DOT format for external rendering
kyku graph --dot > graph.dot
dot -Tsvg graph.dot > graph.svg
# Graph from a specific config
kyku graph -c ./my-config.ts
Vpc (vpc-main) [level 0]
└── depended on by: SecurityGroup (sg-web), Vm (vm-web)
SecurityGroup (sg-web) [level 1]
└── depends on: Vpc (vpc-main)
└── depended on by: Vm (vm-web)
Vm (vm-web) [level 2]
└── depends on: Vpc (vpc-main), SecurityGroup (sg-web)

The DOT format assigns distinct colors and shapes per resource type:

Type Shape Color
Vpc folder blue
Vm box green
SecurityGroup hexagon orange
LoadBalancer parallelogram purple
Database cylinder red

Use the graph to verify:

  • No dangling references — every depends on ID appears as a node
  • No orphan resources (unless truly standalone)
  • Create order is correct (level 0 = roots created first)
  • Destroy order is the reverse of creation
  • No cycles (throws CycleError)