From ce32b43ba642d463d085a8563428dd1fa019d172 Mon Sep 17 00:00:00 2001 From: mace Date: Sun, 12 Apr 2026 13:10:32 +0200 Subject: [PATCH] Added README.md --- README.md | 95 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..cc1b32e --- /dev/null +++ b/README.md @@ -0,0 +1,95 @@ +# cargo-cleanup + +**A fast, recursive `cargo clean` tool for saving disk space across multiple Rust projects.** + +--- + +## Overview + +`cargo-cleanup` is a Cargo subcommand that recursively cleans build artifacts from Rust projects, helping you reclaim disk space. Instead of running `cargo clean` in each project manually, you can clean entire directory trees in a single command. + +--- + +## Features + +- **Recursive cleaning**: Clean build artifacts across all Cargo projects in a directory tree +- **Dry-run mode**: Preview what would be deleted without actually removing files +- **Simple CLI**: Intuitive subcommand interface integrated with Cargo +- **Multi-path support**: Clean multiple directories in one command + +--- + +## Installation + +Add this to your `Cargo.toml`: + +```toml +[dependencies] +# or install with: cargo install cargo-cleanup +``` + +Or install directly from source: + +```bash +cargo install --path . +``` + +--- + +## Usage + +### Basic usage + +Clean the current directory and all subdirectories: + +```bash +cargo slim +``` + +### Clean specific directories + +```bash +cargo slim path/to/project1 path/to/project2 +``` + +### Preview changes with dry-run + +```bash +cargo slim --dry-run +``` + +### Get help + +```bash +cargo slim --help +``` + +--- + +## How it works + +`cargo-cleanup` recursively searches for `Cargo.toml` files in the specified paths (or current directory by default) and runs `cargo clean` in each project found. This removes `target/` directories and other build artifacts, freeing up disk space. + +--- + +## Examples + +```bash +# Clean current project and any nested workspaces +cargo slim + +# Clean your entire ~/projects directory +cargo slim ~/projects + +# See what would be deleted without actually deleting +cargo slim ~/projects --dry-run + +# Clean multiple locations at once +cargo slim ~/work ~/hobby-projects +``` + +--- + +## License + +MIT