Skip to main content
Show a tree of workspace dependencies, displaying how packages depend on each other.

Usage

pixi tree [OPTIONS] [REGEX]
Alias: pixi t

Arguments

REGEX
string
List only packages matching a regular expression.

Options

--manifest-path
path
The path to the pixi.toml or pyproject.toml file.
--environment
string
The environment to show the tree for. Defaults to the default environment.
--platform
string
The platform to show the tree for. Defaults to the current platform.
--invert
boolean
Invert the tree and show what depends on the given package (requires a regex argument).
--frozen
boolean
Use the lockfile as-is without updating it.
--locked
boolean
Check if the lockfile is up-to-date. Errors if the lockfile is out-of-date.
--no-install
boolean
Don’t install the environment before showing the tree.

Examples

Show full dependency tree

pixi tree
Output:
python 3.12.0
├── libffi 3.4.4
├── openssl 3.1.4
└── zlib 1.2.13
numpy 1.26.2
├── libblas 3.9.0
└── python 3.12.0
    ├── libffi 3.4.4
    ├── openssl 3.1.4
    └── zlib 1.2.13

Show dependencies of a specific package

pixi tree numpy

Show reverse dependencies (what depends on a package)

pixi tree --invert numpy
Output:
numpy 1.26.2
└── pandas 2.1.3
    └── my-analysis-tool 1.0.0

Show tree for a specific environment

pixi tree --environment production

Show tree for a different platform

pixi tree --platform linux-64

Display Format

Color Coding

Dependency names are color-coded:
  • Green: Packages that are explicitly specified in the manifest
  • Yellow: Conda package versions
  • Blue: PyPI package versions

Tree Symbols

  • ├── - Package has more siblings
  • └── - Last package in the list

Understanding Dependencies

Direct Dependencies

Packages you explicitly add to your project are shown in green.

Transitive Dependencies

Packages that are installed because they’re required by your direct dependencies.

Example

# pixi.toml
[dependencies]
pandas = ">=2.0"
Running pixi tree shows:
pandas 2.1.3  ← Green (explicit dependency)
├── numpy 1.26.2  ← Transitive dependency
├── python 3.12.0  ← Transitive dependency
└── pytz 2023.3  ← Transitive dependency

Inverted Tree

The --invert flag shows reverse dependencies - which packages depend on a given package:
pixi tree --invert python
Output:
python 3.12.0
├── numpy 1.26.2
│   └── pandas 2.1.3
├── requests 2.31.0
└── pip 23.3.1
This shows:
  • numpy depends on python
  • pandas depends on numpy (which depends on python)
  • requests depends on python
  • pip depends on python
The --invert flag requires a package name or regex to specify which package’s dependents you want to see.

Filtering

By Package Name

pixi tree numpy
Shows only the numpy package and its dependencies.

By Regex Pattern

pixi tree "^py.*"
Shows all packages starting with “py” and their dependencies.

Use Cases

Debugging Dependency Conflicts

# Find out why a package is installed
pixi tree --invert problematic-package

Understanding Package Size

# See what dependencies a large package brings
pixi tree large-package

Auditing Dependencies

# Check what depends on a specific version
pixi tree --invert python

Cross-Platform Dependencies

# Check Linux dependencies from macOS
pixi tree --platform linux-64

Package Sources

The tree distinguishes between:
  • Conda packages: Version numbers in yellow
  • PyPI packages: Version numbers in blue

Differences from pixi list

Featurepixi treepixi list
OutputHierarchical treeFlat list
Shows relationshipsYesNo
Inverted viewYesNo
SortingNoYes
JSON outputNoYes
Field selectionNoYes
You can use pixi t as a shorthand for pixi tree.

Understanding the Output

Explicit vs Transitive

pixi tree
requests 2.31.0  ← Explicit (in green)
├── charset-normalizer 3.3.2  ← Transitive
├── idna 3.6  ← Transitive
├── urllib3 2.1.0  ← Transitive
└── certifi 2023.11.17  ← Transitive

Circular Dependencies

If circular dependencies exist, the tree will show them but avoid infinite recursion.

Performance

For large dependency trees:
  • Use filtering to focus on specific packages
  • Consider using pixi list for a simpler overview
  • Use --no-install if you don’t need to update the environment