$ luarocks install depgraph
depgraph is a command-line tool for building, analyzing, and visualizing
graph of dependencies between Lua modules within a package.
depgraph scans Lua files for all usages of 'require' and can distinguish
normal, lazy (from within a function), conditional, and protected calls.
depgraph command-line tool named 'luadepgraph' can show gathered data in
textual form or export it in .dot format, which can be turned into an
image using GraphViz. It can also detect circular and external dependencies.
Versions
Dependencies
argparse >= 0.6.0
lua >= 5.1, < 5.4
LuaFileSystem >= 1.6.3