On this page
Monorepo dependency graph export command supporting JSON, DOT, and text tree formats with optional root/reverse filtering and depth limiting.
#rlsbl.commands.monorepo.graph
#rlsbl.commands.monorepo.graph
Monorepo dependency graph export command: JSON, DOT, and text tree formats.
#_collect_graph_data
def _collect_graph_data(root, projects, graph)Build packages dict and edges list from the workspace graph.
Returns (packages, edges) where packages is a dict keyed by project name and edges is a list of dicts with from/to/type/constraint keys.
#_filter_packages
def _filter_packages(graph, packages, edges, root_pkg=None, reverse_pkg=None, depth=None)Apply --root or --reverse filtering to the graph data.
Returns (filtered_packages, filtered_edges).
#_render_json
def _render_json(packages, edges)Render the graph as JSON.
#_render_dot
def _render_dot(packages, edges)Render the graph as Graphviz DOT with scope-styled edges and fact-styled nodes.
#_render_text
def _render_text(packages, edges)Render the graph as an indented text tree with fact labels.
#_text_label
def _text_label(name, pkg)Build a text label with fact annotations like [dev], [lib], [leaf].
#_render_text_subtree
def _render_text_subtree(name, packages, lines, indent, visited)Recursively render a package and its deps as indented text.
#_cmd_graph
def _cmd_graph(flags, project_root)Export the monorepo dependency graph.