Intra-Dependencies

A simple command-line tool to analyze and output Dart project dependencies.

Installation

Activate globally using Dart:

dart pub global activate intra_dependencies

Usage

intra_dependencies <path> [options]
  • <path> is the project base directory. Analysis starts inside <path>/lib.

Options

Option Description
--reverse Reverse the dependencies link: show for each file who depends on it.
--console Output to console (default if no output is specified).
--text=<outputFile> Output to a text file.
--json=<outputFile> Output to a JSON file.
--yaml=<outputFile> Output to a YAML file.
--sort Sort mode: path, dependencies (default), or none.
-h, --help Show usage information.

Example

Analyze the project at . and output the results to a JSON file:

intra_dependencies . --json=dependencies.json

Reverse the dependencies link and output to console:

intra_dependencies . --reverse

.depignore file (optional)

You can create a .depignore file in the project root to exclude specific files or folders from the analysis.
Each line should contain a relative path to ignore.

Lines starting with # are treated as comments.

Example .depignore:

lib/generated/
lib/src/experimental/

License

BSD-3-Clause License.