βββββββ ββββββββββββ ββββββββββ βββββββ βββββββ ββββ βββ βββββββββββββββββββββ βββββββββββββββββββββββββββββββββ βββ βββ βββββββββ ββββββ ββββββ ββββββββββββββ βββββββββ βββ βββ βββββββββ βββββββββββββ ββββββββββββββ βββββββββββββ βββββββββββββββββββ βββββββββββββββββ βββββββββββββββ ββββββ βββββββ βββββββββββ ββββββββββββ βββ βββ βββββββ βββ βββββ
A powerful, blazing-fast dependency graph visualizer and analyzer for Rust projects
Features β’ Installation β’ Usage β’ Examples β’ Contributing
- π³ Beautiful Tree Visualization - Color-coded dependency trees with Unicode box drawing
- π Nested Dependencies - Analyze transitive dependencies using
cargo metadata - π Multiple View Modes
- Full dependency tree
- Direct dependencies only
- Depth-limited view
- Compact summary view
- π€ Export Formats
- JSON (pretty & compact)
- DOT (GraphViz compatible)
- π¨ Colorful Output - Syntax highlighting with depth-based coloring
- β‘ Fast & Lightweight - Written in pure Rust for maximum performance
- π Circular Dependency Detection - Identify dependency cycles that could cause issues
- π Duplicate Version Detection - Find packages with multiple versions to reduce bloat
- π Comprehensive Statistics - Detailed metrics about your dependency graph
- π οΈ CLI Friendly - Extensive command-line options for automation
- π« CI/CD Ready - Disable colors for pipeline integration
- π Multi-Project Support - Analyze any Rust project by path
- π Security vulnerability scanning (RustSec integration)
- π License compatibility checker
- π¦ Update checker for outdated dependencies
- π Dependency size analysis
- π Multi-language support (npm, pip, Maven)
git clone https://github.com/Rogue-strider/DENDRON
cd DENDRON
cargo install --path .cargo install dendron-viz- Rust 1.70 or higher
- Cargo
# Analyze current project
dendron
# Analyze specific project
dendron --path /path/to/project
# Show nested dependencies
dendron --nested
# Limit depth
dendron --nested --depth 2# Direct dependencies only
dendron --direct-only
# Compact summary
dendron --summary --nested
# Full tree with depth limit
dendron --nested --depth 3# Check for duplicate versions
dendron --nested --check-duplicates
# Check for circular dependencies
dendron --nested --check-circular
# Combined analysis (recommended for CI/CD)
dendron --nested --check-duplicates
dendron --nested --check-circular# Export to JSON (pretty)
dendron --nested --output json > dependencies.json
# Export to JSON (compact)
dendron --output json-compact > deps.json
# Export to DOT format (GraphViz)
dendron --nested --output dot > deps.dot
# Visualize with GraphViz
dendron --output dot > deps.dot && dot -Tpng deps.dot -o graph.png# Disable colors (for CI/CD)
dendron --no-color
# Combine options
dendron --nested --depth 3 --summary --no-colorπ³ Dependency Tree (Max Depth: 2)
π¦ dendron (0.1.0)
βββ anyhow (1.0.100)
βββ cargo_metadata (0.18.1)
β βββ camino (1.2.2)
β βββ cargo-platform (0.1.9)
β βββ semver (1.0.27)
β βββ serde (1.0.228)
βββ clap (4.5.54)
β βββ clap_builder (4.5.54)
β βββ clap_derive (4.5.49)
βββ colored (2.2.0)
βββ serde (1.0.228)
βββ toml (0.8.23)
π Statistics:
ββ Direct Dependencies: 6
ββ Total Dependencies: 46
ββ Max Depth: 6
β¨ Analysis complete!
π Dependency Summary:
π¦ dendron (0.1.0)
ββ Level 1: 6 packages (showing first 10)
ββ toml (0.8.23)
ββ serde (1.0.228)
ββ anyhow (1.0.100)
ββ clap (4.5.54)
ββ colored (2.2.0)
ββ cargo_metadata (0.18.1)
ββ Level 2: 11 packages (showing first 10)
ββ semver (1.0.27)
ββ camino (1.2.2)
ββ cargo-platform (0.1.9)
ββ 8 more packages...
β οΈ Found 3 packages with multiple versions:
π¦ proc-macro2
ββ v1.0.92 (used 4 times)
ββ v1.0.70 (used 2 times)
π¦ syn
ββ v2.0.90 (used 5 times)
ββ v1.0.109 (used 3 times)
π¦ unicode-ident
ββ v1.0.22 (used 3 times)
ββ v1.0.14 (used 1 time)
π‘ Impact:
β’ 3 duplicate versions increase binary size
β’ Consider updating dependencies to use consistent versions
β’ Run cargo update to update
π Duplicate Statistics:
ββ Packages with duplicates: 3
ββ Total versions: 6
ββ Duplicate versions: 3
β οΈ Found 2 circular dependencies:
Cycle 1:
βββ package-a
βββ package-b
βββ package-c
βββ package-a (completes cycle)
Cycle 2:
βββ package-x
βββ package-y
βββ package-x (completes cycle)
π‘ Impact:
β’ Circular dependencies can cause compilation issues
β’ They may increase build time and binary size
β’ Consider refactoring to break the cycles
π Circular Dependency Statistics:
ββ Total cycles: 2
ββ Packages involved: 5
ββ Longest cycle: 3 packages
{
"package": {
"name": "dendron-viz",
"version": "0.1.1"
},
"dependencies": {
"toml": {
"version": "0.8.23",
"depth": 1,
"dependencies": ["serde", "indexmap", "toml_datetime"]
},
"serde": {
"version": "1.0.228",
"depth": 1,
"dependencies": ["serde_derive"]
}
},
"statistics": {
"direct_dependencies": 6,
"total_dependencies": 46,
"max_depth": 6
}
}dendron [OPTIONS]
Options:
-p, --path <PATH> Path to project directory (default: current)
-d, --depth <NUMBER> Maximum depth to display
-D, --direct-only Show only direct dependencies
-n, --nested Show nested/transitive dependencies
-s, --summary Show compact summary view
-o, --output <FORMAT> Output format: json, json-compact, dot
--check-duplicates Check for duplicate dependency versions
--check-circular Check for circular dependencies
--no-color Disable colored output
-h, --help Print help
-V, --version Print version- Understand Dependencies: Visualize your project's dependency tree
- Optimize Build Size: Find and eliminate duplicate versions
- Detect Issues: Identify circular dependencies before they cause problems
- Documentation: Export dependency graphs for documentation
# In your CI/CD pipeline
dendron --nested --check-duplicates --no-color
dendron --nested --check-circular --no-color
# Export for artifacts
dendron --nested --output json > artifacts/dependencies.json# Generate visual graph
dendron --output dot > deps.dot
dot -Tpng deps.dot -o dependency-graph.png
# Share with team for review# Clone the repository
git clone https://github.com/Rogue-strider/DENDRON
cd DENDRON
# Build the project
cargo build --release
# Run tests
cargo test
# Run locally
cargo run -- --nested --depth 2dendron/
βββ src/
β βββ main.rs # CLI entry point
β βββ parser/
β β βββ mod.rs
β β βββ cargo.rs # Cargo.toml parser
β β βββ metadata.rs # cargo metadata parser
β βββ graph/
β β βββ mod.rs
β β βββ node.rs # Dependency node structure
β β βββ builder.rs # Graph building logic
β β βββ export.rs # Export formats (JSON, DOT)
β βββ analyzer/
β βββ mod.rs
β βββ duplicates.rs # Duplicate version detection
β βββ circular.rs # Circular dependency detection
βββ Cargo.toml
βββ README.md
- Language: Rust 2021 Edition
- CLI Framework: clap 4.x
- Serialization: serde, serde_json
- Parsing: toml, cargo_metadata
- Colors: colored
Contributions are welcome! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- π Security vulnerability scanning (RustSec integration)
- π License compatibility checker
- π¦ Update checker for outdated dependencies
- π Dependency size analysis
- π Multi-language support (npm, pip, etc.)
- π Documentation improvements
- π Bug fixes
- β¨ New features
This project is licensed under the MIT License - see the LICENSE file for details.
- Inspired by tools like
cargo tree,npm ls, and various dependency visualization tools - Built with amazing Rust crates from the community
- Special thanks to all contributors (ofCourse its only meπ₯²) but hoping for others to contribute
Author: Rogue-strider
Repository: github.com/Rogue-strider/DENDRON
Email: satyamjha91064@gmail.com
Made with β€οΈ and π¦ Rust
β Star this repo if you find it useful!