Depclean
Depclean is a Rust command-line tool to analyze and optimize project dependencies by parsing Cargo.lock, building dependency graphs, detecting duplicates, and suggesting version alignments.
Installation
Via Cargo
Verify installation:
From Source
- Clone the repository:
- Build and run:
Usage
Analyze dependencies in a Cargo project:
Output includes:
- Dependency graph visualization
- Duplicate dependency detection
- Version alignment suggestions
Example Output
[+] Found 12 duplicate dependencies:
- `serde` (versions: 1.0.152, 1.0.155)
- `tokio` (versions: 1.25.0, 1.27.0)
[!] Suggested alignments:
- Upgrade `serde` to 1.0.155 (used by 8 crates)
- Unify `tokio` to 1.27.0 (compatible with all features)
Contributing
- Fork the repository
- Create a feature/bugfix branch
- Add tests for changes
- Submit a PR with
[FEAT]/[FIX]/[DOCS]prefix
License
MIT License - See LICENSE for details.