| Crates.io | dep-insight |
| lib.rs | dep-insight |
| version | 1.0.0 |
| created_at | 2025-10-14 14:11:40.710659+00 |
| updated_at | 2025-11-03 12:06:07.540753+00 |
| description | Dependency analysis, auditing, and visualization tool for Rust projects |
| homepage | https://github.com/TIVerse/dep-insight |
| repository | https://github.com/TIVerse/dep-insight |
| max_upload_size | |
| id | 1882309 |
| size | 468,440 |
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.
cargo install dep-insight
# Analyze current project
cargo dep-insight analyze
# Analyze specific project
cargo dep-insight analyze /path/to/project
# Run with security audit (requires audit feature)
cargo dep-insight analyze --audit
# Output JSON
cargo dep-insight analyze --json report.json
# Generate HTML report
cargo dep-insight analyze --html deps.html
cargo dep-insight duplicates
# Show dependency tree
cargo dep-insight tree
# ASCII-only output
cargo dep-insight tree --ascii
# Focus on specific package in workspace
cargo dep-insight tree --package my-crate
# Generate and open HTML visualization
cargo dep-insight visualize
# Save without opening
cargo dep-insight visualize --out report.html --no-open
Requires the audit feature:
cargo install dep-insight --features audit
cargo dep-insight audit
Note: The audit command respects the audit.fetch setting in .depinsight.toml. Set fetch = false to avoid fetching the RustSec database and run in offline mode.
cargo dep-insight config validate
Create a .depinsight.toml in your project root:
[output]
color = true
max_heavy = 10
[audit]
# requires 'audit' feature
fetch = false
[license]
# deny or warn on specific licenses (use SPDX short identifiers)
# Note: SPDX parser normalizes "-only" suffixes (e.g., "GPL-3.0-only" → "GPL-3.0")
deny = ["GPL-3.0", "AGPL-3.0"]
warn = ["LGPL-2.1"]
[online]
# requires 'online' feature
crates_io = false
rate_limit_per_min = 10
The JSON output follows a versioned schema:
{
"schema_version": "1.0",
"tool": {
"name": "dep-insight",
"version": "0.3.0"
},
"workspace_root": "/path/to/project",
"summary": {
"total_dependencies": 56,
"unique_crates": 42,
"duplicate_crates": 4
},
"diagnostics": {
"duplicates": [...],
"vulnerabilities": [...],
"licenses": {...},
"heavy": [...]
},
"graph": {
"nodes": [...],
"edges": [...]
},
"suggestions": [...]
}
dep-insight can also be used as a library:
use dep_insight::{analyze_project, report_to_json};
fn main() -> anyhow::Result<()> {
// Analyze without security audit
let report = analyze_project(".", false)?;
println!("Found {} dependencies", report.summary.total_dependencies);
// Export to JSON
let json = report_to_json(&report)?;
std::fs::write("report.json", json)?;
Ok(())
}
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
cargo install dep-insight --all-features
# Install without web assets
cargo install dep-insight --no-default-features
cargo build --release
cargo test --all
cargo fmt --all
cargo clippy --all-targets -- -D warnings
Cargo.toml and optionally Cargo.lockRun cargo generate-lockfile in your project to create a lockfile for more accurate dependency resolution.
Ensure you're running the command in a valid Cargo project directory.
By default, dep-insight works offline. Enable audit or online features only if you need vulnerability scanning or crates.io queries.
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
git checkout -b feature/amazing-feature)Licensed under the MIT License. See LICENSE for details.
See SECURITY.md for reporting security vulnerabilities.
See CHANGELOG.md for release history.
Eshan Roy - Tonmoy Infrastructure & Vision
--json for stable machine parsingMade with ❤️ by the TIVision team