devlens 1.0.1 copy "devlens: ^1.0.1" to clipboard
devlens: ^1.0.1 copied to clipboard

Flutter Dependency Explorer. A developer tool to analyze any Flutter or Dart project and generate an interactive architecture and dependency visualization map.

πŸ” DevLens #

Pub Version License

Flutter Dependency Explorer. A developer tool to analyze any Flutter or Dart project and generate an interactive architecture and dependency visualization map.


✨ Features #

  • πŸš€ Fast Parsing: Scans your entire lib/ directory in milliseconds.
  • πŸ“¦ Dependency Mapping: Accurately maps both package: and relative imports.
  • πŸ—οΈ Architecture Analysis: Categorizes files by types like Screen, Bloc, Repository, and Model.
  • πŸ“Š JSON Export: Generates a standard JSON graph model that can be consumed by visualizers.

πŸš€ Getting Started #

Installation #

Activate the CLI globally via pub:

dart pub global activate devlens

Usage #

Run the scanner in the root of any Flutter or Dart project:

devlens scan

You can also specify a specific path:

devlens scan --path /path/to/your/flutter_project

πŸ—ΊοΈ How it Works & Where Everything Goes #

When you run devlens scan, here is what happens under the hood and where the outputs are generated:

1. Parsing Phase [Click to expand]
The DartParser scans through your project's lib/ directory, reading every .dart file. It extracts dependencies and identifies the type of each component (e.g., is it a State, Screen, or Repository?).
2. Graph Generation [Click to expand]
The parsed files are converted into a connected DependencyGraph. This engine models the nodes (files) and edges (imports) of your architecture.
3. Output (.dep_explorer/) [Click to expand]
Once the scan is complete, DevLens creates a new directory in your project root called .dep_explorer/.
Inside this folder, it generates a graph.json file (and other reports) containing the full dependency tree, which can be loaded into visualization tools!

πŸ“ Source Code Architecture #

Curious about how DevLens itself is built? Here's a quick overview of our source code:

  • πŸ“‚ bin/: Contains the executable entrypoint (devlens.dart).
  • πŸ“‚ lib/cli/: The command-line interface logic and command runner.
  • πŸ“‚ lib/packages/parser/: The Dart analyzer code that reads your files.
  • πŸ“‚ lib/packages/graph_engine/: Data structures for the dependency graph.
  • πŸ“‚ lib/packages/reports/: Exporters that write the .dep_explorer/ outputs.

🀝 Contributing #

Contributions, issues, and feature requests are welcome! Feel free to check the issues page.

1
likes
0
points
121
downloads

Publisher

unverified uploader

Weekly Downloads

Flutter Dependency Explorer. A developer tool to analyze any Flutter or Dart project and generate an interactive architecture and dependency visualization map.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

analyzer, args, path

More

Packages that depend on devlens