🧩 dep-insight
Your Rust Project's Detective Friend!
dep-insight is a powerful dependency analysis, auditing, and visualization tool for Rust projects. It helps you understand your project's dependency graph, find duplicates, check for security vulnerabilities, audit licenses, and visualize everything in an interactive web view.
✨ Features
- 🔍 Dependency Analysis: Understand your complete dependency tree
- ⚠️ Duplicate Detection: Find and consolidate duplicate crate versions
- 🛡️ Security Auditing: Scan for known vulnerabilities via RustSec (optional)
- ⚖️ License Compliance: Track licenses and enforce policies
- ⏱️ Heavy Crate Detection: Identify dependencies with large transitive graphs
- 🎨 Interactive Visualization: Beautiful D3.js-based dependency graphs
- 📊 Multiple Output Formats: Terminal, JSON, and HTML reports
- 🏢 Workspace Support: Works seamlessly with cargo workspaces
🚀 Installation
📖 Usage
Basic Analysis
# Analyze current project
# Analyze specific project
# Run with security audit (requires audit feature)
# Output JSON
# Generate HTML report
Find Duplicates
View Dependency Tree
# Show dependency tree
# ASCII-only output
# Focus on specific package in workspace
Interactive Visualization
# Generate and open HTML visualization
# Save without opening
Security & License Audit
Requires the audit feature:
Configuration Validation
⚙️ Configuration
Create a .depinsight.toml in your project root:
[]
= true
= 10
[]
# requires 'audit' feature
= false
[]
# deny or warn on specific licenses
= ["GPL-3.0-only", "AGPL-3.0-only"]
= ["LGPL-2.1-only"]
[]
# requires 'online' feature
= false
= 10
📊 JSON Schema
The JSON output follows a versioned schema:
📚 Library Usage
dep-insight can also be used as a library:
use ;
🔧 Features
web(default): Enable HTML visualization with embedded assetsaudit: Enable security vulnerability scanning via RustSeconline: Enable online features like crates.io API queries
# Install with all features
# Install without web assets
🛠️ Development
Build
Test
Format & Lint
📋 Requirements
- Rust 1.70+ (MSRV)
- Cargo projects with
Cargo.tomland optionallyCargo.lock
🐛 Troubleshooting
"No Cargo.lock found"
Run cargo generate-lockfile in your project to create a lockfile for more accurate dependency resolution.
"Failed to load cargo metadata"
Ensure you're running the command in a valid Cargo project directory.
Offline Mode
By default, dep-insight works offline. Enable audit or online features only if you need vulnerability scanning or crates.io queries.
🤝 Contributing
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes using conventional commits
- Push to the branch
- Open a Pull Request
📜 License
Licensed under the MIT License. See LICENSE for details.
🔒 Security
See SECURITY.md for reporting security vulnerabilities.
📝 Changelog
See CHANGELOG.md for release history.
👤 Author
Eshan Roy - Tonmoy Infrastructure & Vision
🌟 Acknowledgments
💡 Stability
- Public library API: Follows SemVer strictly
- CLI human-readable output: Best-effort stability; use
--jsonfor stable machine parsing - JSON schema: Versioned and backwards compatible within major versions
Made with ❤️ by the TIVision team