Skip to content
modularity_cliClassesmodularity_cli

modularity_cli

CLI tools for analyzing and visualizing Modularity module dependency graphs.

Provides utilities to introspect a module tree at build time and render the resulting dependency graph in a browser.

Key Classes

Quick Start

dart
import 'package:modularity_cli/modularity_cli.dart';

void main() async {
  await GraphVisualizer.visualize(
    AppModule(),
    renderer: GraphRenderer.g6,
  );
}

Classes

ClassDescription
DependencyRecordMetadata about a single dependency registration captured by RecordingBinder.
GraphVisualizerGenerate and display module dependency graphs in a browser.
ModuleBindingsAnalyzerAnalyzes a Module tree and produces ModuleBindingsSnapshot for each node by running its binds and exports phases against a RecordingBinder.
ModuleBindingsSnapshotImmutable snapshot of a Module's dependency registrations.
ModuleEdgeRepresents a directed relationship between two modules in the graph.
ModuleGraphDataComplete graph data structure containing all ModuleNodes and ModuleEdges.
ModuleNodeRepresents a single module as a node in the dependency graph.
RecordingBinderBinder implementation that records registrations without instantiating any dependencies.

Enums

EnumDescription
DependencyRegistrationKindClassification of how a dependency is registered in a Binder.
GraphRendererAvailable visualization renderers.
ModuleEdgeTypeTypes of directed relationships between modules in the dependency graph.

Extensions

ExtensiononDescription
DependencyRegistrationKindLabelDependencyRegistrationKindProvide a human-readable label for each DependencyRegistrationKind value.