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.
- Fetch dependencies from a GitLab group using API credentials.
- Analyze dependencies from a folder of Dart
pubspec.yamlfiles. - Output dependency graphs in dot, gexf, graphml or json format.
- Dart SDK: Install the Dart SDK.
Activate landscape_analysis directly from pub.dev or a Git repository.
-
From
pub.dev:dart pub activate landscape_analysis
-
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>
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 > outputOptional: 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>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).
Contributions are welcome! Open an issue or submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for more details.