Skip to main content

Dependency analyzer for Python, Node, Rust, Go, Java, Ruby, and PHP projects.

Project description

Depstree

Dependency analyzer for any project.

PyPI Python License Stars


Depstree scans real project manifests, normalizes dependencies across ecosystems, and turns them into readable terminal reports, dependency trees, audits, diffs, exports, and graph artifacts. It supports Python, Node.js, Rust, Go, Java Maven/Gradle, Ruby, and PHP projects without requiring the target project to install anything first.

  • Multi-ecosystem scanning - detects pyproject.toml, requirements*.txt, package.json, Cargo.toml, go.mod, pom.xml, Gemfile, composer.json, and more.
  • Readable dependency trees - renders grouped runtime, dev, optional, peer, build, and transitive dependency views with Rich.
  • Risk audits - flags unpinned versions, wildcard specs, local path dependencies, git/url dependencies, duplicate specs, and prerelease usage.
  • Project diffs - compares two directories or manifests and shows added, removed, and changed dependencies.
  • Portable exports - writes JSON, CSV, CycloneDX-style SBOM, HTML reports, DOT, SVG, and graph JSON.
  • Registry checks - checks latest versions for Python and npm dependencies when network access is available.

Installation

pip install depstree

For local development:

python3 -m venv .venv
. .venv/bin/activate
pip install -e .

Usage

Scan the current project:

depstree scan .

Print a dependency tree:

depstree tree .

Audit for risky dependency declarations:

depstree audit . --strict

Export an SBOM:

depstree export . --format sbom --output sbom.json

Create an SVG graph:

depstree graph . --format svg --output deps.svg

Compare two project states:

depstree diff ./before ./after

Commands

Command Description
depstree scan <path> Detect manifests and summarize dependencies.
depstree tree <path> Render a grouped dependency tree.
depstree audit <path> Report risky specs and duplicate declarations.
depstree licenses <path> Show dependency license metadata when manifests or lockfiles expose it.
depstree diff <old> <new> Compare two projects or manifests.
depstree export <path> Export dependency data as JSON, CSV, SBOM, or HTML.
depstree graph <path> Generate DOT, SVG, HTML, or JSON graph output.
depstree explain <package> <path> Show where a dependency is declared and under which scope.
depstree outdated <path> Check latest registry versions for Python and npm packages.

Configuration

Depstree works without a config file. It skips noisy generated directories such as .git, .venv, node_modules, dist, build, and target. Use command options to choose export formats, include or hide transitive dependencies, filter outdated checks by ecosystem, or make audits fail CI with --strict.

License

MIT License. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

depstree-0.1.0.tar.gz (17.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

depstree-0.1.0-py3-none-any.whl (20.5 kB view details)

Uploaded Python 3

File details

Details for the file depstree-0.1.0.tar.gz.

File metadata

  • Download URL: depstree-0.1.0.tar.gz
  • Upload date:
  • Size: 17.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for depstree-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2347378fa38828e2ece393af180f63a56bfe00f8e9ba8401f53a501ceffbdd03
MD5 2ba7705ceba9a893c4f1fd40db1331ca
BLAKE2b-256 d6e65f8f35550899cf5d86052bcd0fb30af8fd564f066c2d24516ecb64b49a21

See more details on using hashes here.

File details

Details for the file depstree-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: depstree-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 20.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for depstree-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1e748a560b5372ff3e90b2059ced79c131476f2c1f7437c1cd40f839d37a2b72
MD5 d8aab10af5bd71573576449d24f52a24
BLAKE2b-256 c27b7152d5da6dd34bf8104ed27924e969fe2422a9241e53468305f6a7462274

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page