Depstree
Dependency analyzer for any project.
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.
Metadata
Release files for depstree 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| depstree-0.1.0.tar.gz | 17.3 kB | Without provenance | Details for depstree-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| depstree-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for depstree-0.1.0-py3-none-any.whl |
Total release size: 37.7 kB
Release files / depstree-0.1.0.tar.gz
| Download URL | depstree-0.1.0.tar.gz |
|---|---|
| Size | 17.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2347378fa38828e2ece393af180f63a56bfe00f8e9ba8401f53a501ceffbdd03
|
|
BLAKE2b-256 checksum How to use checksums |
d6e65f8f35550899cf5d86052bcd0fb30af8fd564f066c2d24516ecb64b49a21
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.13
|
Release files / depstree-0.1.0-py3-none-any.whl
| Download URL | depstree-0.1.0-py3-none-any.whl |
|---|---|
| Size | 20.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1e748a560b5372ff3e90b2059ced79c131476f2c1f7437c1cd40f839d37a2b72
|
|
BLAKE2b-256 checksum How to use checksums |
c27b7152d5da6dd34bf8104ed27924e969fe2422a9241e53468305f6a7462274
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.13
|
Security for depstree 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.