Skip to content

Tokimorphling/cargo-mop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧹 cargo-mop

Crates.io License

The ultimate disk reclamation tool for Rust developers.

cargo-mop is a high-performance, recursive cleaning utility that deep-scans your filesystem to find and mop up bloated target directories. It's designed to be fast, safe, and beautiful.

✨ Features

🚀 High-Performance Core

  • Parallel Mop: Turbocharge cleanup using rayon-powered multi-threading.
  • Recursive Discovery: Deep-scans directory trees while intelligently identifying Workspace roots.
  • Selective Clean: Choose exactly what to sweep with an elegant Interactive TUI.

🧠 Intelligence & Analytics

  • Ghost Hunter: Detect and report orphaned target directories (where Cargo.toml is missing).
  • Stale Analysis: Pinpoint "dusty" projects by cross-referencing Git history and filesystem metadata.
  • Disk Health Insight: Real-time disk usage rating to visualize your reclamation impact.

🛡️ Precision & Safety

  • Temporal Filtering: Target only the old stuff with precise duration filters (e.g., --older-than 2w).
  • Flexible Exclusions: Support for glob patterns and .mopignore for surgical precision.
  • Registry Deep-Clean: Optionally wipe the global ~/.cargo/registry cache to free up gigabytes.

🤖 Automation Ready

  • Agent Friendly: Full --json support for seamless integration with AI Agents and scripts.
  • Headless Mode: Automatic TTY detection for clean, log-friendly output in non-interactive environments.

🚀 Installation

cargo install cargo-mop

🛠️ Usage

Standard Mop:

cargo mop

Fast Mop (Parallel):

cargo mop --parallel --jobs 4

Interactive Mop:

cargo mop --interactive

Clean Old Projects (older than 30 days):

cargo mop --older-than 30d

Agent/Automation Mode:

cargo mop --json > result.json

📦 Advanced Options

Option Description
--find-ghosts Detect orphaned target directories with no parent project.
--stale-analysis 6m Analyze projects that haven't been touched in 6 months.
--registry Deep clean the global ~/.cargo/registry cache.
--exclude "*kernel*" Skip projects matching specific glob patterns.
--no-bell Disable the completion sound.

⚖️ License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages