landscape_analysis 2.0.1 landscape_analysis: ^2.0.1 copied to clipboard
A cli for analyzing pubspec files and generating visual dependency graphs using Graphviz.
Landscape Analysis CLI #
landscape_analysis
is a Dart CLI tool for analyzing Dart package dependencies and generating visual dependency graphs. It reads pubspec.yaml
files, builds a dependency tree, and supports different output formats.
Features #
- Fetch dependencies from a GitLab group using API credentials.
- Analyze dependencies from a folder of Dart
pubspec.yaml
files. - Output dependency graphs in dot, gexf, graphml or json format.
Prerequisites #
- Dart SDK: Install the Dart SDK.
Installation #
Option 1: Install with dart pub activate
#
Activate landscape_analysis
directly from pub.dev
or a Git repository.
-
From
pub.dev
:dart pub activate landscape_analysis
Option 2: Compile a Standalone Executable #
-
Clone the repository:
git clone https://github.com/yourusername/landscape_analysis.git cd landscape_analysis
-
Compile the executable:
dart compile exe bin/landscape_analysis.dart -o landscape_analysis
-
Run the executable:
./landscape_analysis <command> <options>
Usage #
Put the pubspec.yaml
files in a folder and run the following command to analyze them:
landscape_analysis analyze --format <format> ./path/to/your/folder > output
Optional: You can fetch pubspec.yaml
files from a gitlab group using:
landscape_analysis fetch gitlab --token <token> --group-id <group-id> --api-url <api-url>
Visualize the graph #
It is recommended to use yEd (uses graphml-format) for visualization, if a hierarchical structure is desired. For simple graphs GraphViz (uses dot-format) is sufficient. And some metrics can be calculated in Gephi (uses gexf-format).
Contributing #
Contributions are welcome! Open an issue or submit a pull request.
License #
This project is licensed under the MIT License. See the LICENSE file for more details.