View Source mix deps.tree (Mix v1.18.0)

Prints the dependency tree.

$ mix deps.tree

If no dependency is given, it uses the tree defined in the mix.exs file.

Command line options

  • --only - the environment to show dependencies for.

  • --target - the target to show dependencies for.

  • --exclude - exclude dependencies which you do not want to see printed. You can pass this flag multiple times to exclude multiple dependencies.

  • --umbrella-only (since v1.17.0) - only include the umbrella applications. This is useful when you have an umbrella project and want to see the relationship between the apps in the project.

  • --format - can be set to one of either:

    • pretty - uses Unicode code points for formatting the tree. This is the default except on Windows.

    • plain - does not use Unicode code points for formatting the tree. This is the default on Windows.

    • dot - produces a DOT graph description of the dependency tree in deps_tree.dot in the current directory. Warning: this will override any previously generated file.

Examples

Print the dependency tree for the :test environment:

$ mix deps.tree --only test

Exclude the :ecto and :phoenix dependencies:

$ mix deps.tree --exclude ecto --exclude phoenix

Only print the tree for the :bandit and :phoenix dependencies:

$ mix deps.tree --include bandit --include phoenix