| Crates.io | cargo-sleek |
| lib.rs | cargo-sleek |
| version | 1.1.0 |
| created_at | 2025-03-28 07:19:15.485195+00 |
| updated_at | 2025-03-29 18:03:22.57722+00 |
| description | ๐ A sleek CLI tool to track and optimize Cargo commands. |
| homepage | |
| repository | https://github.com/Arunmadhavan28/sleek |
| max_upload_size | |
| id | 1609330 |
| size | 45,964 |
Cargo-Sleek is a lightweight, intelligent Cargo command tracking and optimization tool that enhances the Rust development experience by providing command insights, dependency analysis, and build performance tracking.
Cargo.toml and Cargo.lock for unused dependencies.cargo build and cargo clean directly.Cargo-Sleek is built for Rust developers who want to:
โ
Optimize their Cargo workflow by analyzing command usage patterns.
โ
Keep their projects clean from unnecessary dependencies.
โ
Improve compile times with build performance tracking.
โ
Have a single tool to execute and analyze Cargo operations.
To install Cargo-Sleek, clone the repository and build it manually:
git clone https://github.com/your-repo/cargo-sleek.git
cd cargo-sleek
cargo build --release
Move the binary to a location in your $PATH for global access:
mv target/release/cargo-sleek /usr/local/bin/
Now, you can use cargo-sleek from anywhere in your terminal.
๐ Usage Guide
๐ 1. Track Most Used Commands
cargo-sleek stats
Description: Displays a ranked list of your most frequently used Cargo commands.
๐ 2. Reset Command Usage Statistics
cargo-sleek reset
Description: Clears all tracked Cargo command usage data.
๐ 3. Check for Unused Dependencies
cargo-sleek check-deps
Description: Scans Cargo.toml and Cargo.lock to find dependencies that are no longer needed.
โฑ๏ธ 4. Analyze Build Performance
cargo-sleek build-time
Description: Runs cargo build, records build time, and saves a detailed report in build_timings.log.
๐จ 5. Build the Project
cargo-sleek build
Description: Runs cargo build to compile your Rust project.
๐งน 6. Clean the Project
cargo-sleek clean
Description: Runs cargo clean to remove the target directory and free up space.
๐ How it Works
Cargo-Sleek wraps around the Cargo command-line tool and tracks executed commands. It stores command statistics in command_stats.json and provides insights through JSON parsing, execution tracking, and build performance analysis.
Core Working Modules
Command Tracking โ Logs how often each Cargo command is used.
Dependency Analysis โ Reads Cargo.toml and Cargo.lock to find unused dependencies.
Build Timing Analysis โ Measures cargo build execution time and stores logs.
๐ Dual Licensing: Apache-2.0 & MIT
Cargo-Sleek is licensed under a dual Apache-2.0 and MIT license, allowing users and contributors maximum flexibility.
What This Means for You
You can use, modify, and distribute this software under either the Apache-2.0 OR MIT license.
You are free to use Cargo-Sleek in both open-source and commercial projects.
If you modify and distribute the project, attribution is required.
For more details, check out:
Apache License 2.0 MIT License ๐จโ๐ป Contributing
We welcome contributions to Cargo-Sleek! To get started:
Fork the repository
Create a new branch
git checkout -b feature-your-feature-name
Make your changes and commit
git commit -m "Added new feature"
Push to your branch
git push origin feature-your-feature-name
Create a Pull Request on GitHub.
Contribution Guidelines
โ
Keep code clean and well-documented.
โ
Follow Rust best practices and formatting (cargo fmt).
โ
Test your changes before submitting (cargo test).
๐ Future Improvements
๐ง Customizable configuration file for tracking preferences.
๐ More in-depth performance insights on Cargo builds.
๐ Support for benchmarking and cache optimization.
๐ Add automatic dependency removal for unused dependencies.
๐ License
This project is dual-licensed under both Apache-2.0 and MIT, giving you the flexibility to choose the license that works best for your project.
๐ฌ Feedback & Support
Weโd love to hear your feedback! If you encounter issues or have feature suggestions:
Submit an issue on GitHub.
Join discussions in the community forums.
โญ Enjoy using Cargo-Sleek?
Give the project a star โญ on GitHub and help spread the word!
๐ Happy Coding with Rust! ๐ฆ