devlens 1.2.0 copy "devlens: ^1.2.0" to clipboard
devlens: ^1.2.0 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 #

  • πŸš€ Offline HTML Dashboard: Generates a stunning 6-tab Onboarding Dashboard (Learning Path, Risk Report, Folder Map, Dead Code, Graph).
  • 🧠 AST Code Analysis: Uses the official analyzer package to statically parse Dart files, extracting imports and file types.
  • πŸ—οΈ Architecture Health Score: Detects Circular Dependencies, God Classes, and Highly Coupled files to grade your codebase.
  • πŸ—ΊοΈ Learning Path: Automatically calculates the optimal reading order for a new developer to understand the project in 10 minutes.
  • πŸ’€ Dead Code Detection: Highlights orphaned files that have zero incoming dependencies.

πŸš€ 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 an index.html file which automatically opens in your browser. This contains the full 6-tab Onboarding Dashboard!

πŸ“ 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
160
points
143
downloads

Documentation

API reference

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

MIT (license)

Dependencies

analyzer, args, path, yaml

More

Packages that depend on devlens