graph
Display the dependency graph of your infrastructure config as an ASCII tree or Graphviz DOT output.
kyku graph [options]Options
Section titled “Options”| Flag | Default | Description |
|---|---|---|
-c, --config <path> |
./infrastructure.ts |
Path to config file |
--dot |
false |
Output in Graphviz DOT format |
Examples
Section titled “Examples”# Show ASCII dependency treekyku graph
# Output DOT format for external renderingkyku graph --dot > graph.dotdot -Tsvg graph.dot > graph.svg
# Graph from a specific configkyku graph -c ./my-config.tsASCII Output
Section titled “ASCII Output”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)DOT Output
Section titled “DOT Output”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 |
Verification
Section titled “Verification”Use the graph to verify:
- No dangling references — every
depends onID 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)