Skip to content

About

A fast and lightweight CLI tool in Rust for finding and cleaning up developer junk (node_modules, target, .cache, etc.).

Topics

Resources

Stars

7 stars

Watchers

1 watching

Forks

Latest commit

 

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧹 cleaner-cli

A blazing-fast, lightweight CLI tool written in Rust to reclaim disk space by hunting down developer junk.

Crates.io Crates.io Downloads License: MIT Rust

Features • Installation • Usage • Target Directories • License


✨ Overview

Every developer's disk eventually fills up with abandoned node_modules, heavy Rust target build artifacts, .cache, and dist folders scattered across the filesystem.

cleaner-cli searches through your workspace, calculates the exact disk space you can save, and gives you safe, interactive control to wipe the junk away.


🚀 Key Features

  • ⚡ Blazing Fast: Powered by Rust for high-speed recursive file scanning with minimal RAM usage.
  • 🛡️ Safe by Default (Dry-Run): Always operates in simulation mode unless explicitly told to delete. No accidental data loss!
  • ⚠️ Interactive Confirmation: Prompts for explicit (y/N) user confirmation before purging any files.
  • 📊 Detailed Storage Analysis: Displays exact disk space to be reclaimed per directory and in total.
  • 📝 Report Exporting: Generate clean summary reports (cleaner-report.txt) for audit logs or tracking.

📦 Installation

Option 1: Cargo (Recommended)

If you have Rust installed, simply run:

cargo install cleaner-cli

Option 2: From Source

# Clone the repository
git clone https://github.com/weaztoven/cleaner-cli.git
cd cleaner-cli

# Build and install locally
cargo install --path . --force

💡 Usage & Examples

1. Safe Scan (Default / Simulation Mode)

Scans your current directory recursively and lists all matching folders without deleting anything. The dry-run table shows each target's full path, matched rule, and safety note. The summary distinguishes rules considered safe to recreate from .cache folders that should be reviewed; contents are not individually verified, and no custom exclusions are configured.

cleaner-cli

Example dry-run output:

Full Path                                      | Matched Rule | Status / Safety Note
-----------------------------------------------+--------------+-----------------------------------------------------------
C:\work\project\target                         | target       | Safe to recreate; contents are not individually checked
C:\work\project\.cache                         | .cache       | Review contents; may contain tool-specific data

Dry-run breakdown
   Targets matching rules : 2
   Safe to recreate       : 1
   Review before deleting : 1
   Custom exclusions      : None configured

“Safe to recreate” describes the matched directory rule, not a guarantee about its contents. Review the listed paths before running with --execute.

2. Execute & Clean

Scans for junk, asks for confirmation, and permanently removes the selected folders upon approval.

cleaner-cli --execute

3. Generate Summary Report

Exports a detailed report file (cleaner-report.txt) alongside your scan or deletion.

# Export report in dry-run mode
cleaner-cli --report

# Export report during active deletion
cleaner-cli --execute --report

🛠️ Target Directories

cleaner-cli automatically targets heavy build artifacts and caches, including:

Folder Ecosystem
node_modules Node.js / JavaScript / TypeScript
target Rust / Cargo build artifacts
.cache General package manager & tool caches
dist / build Web bundlers (Vite, Webpack, Next.js)

🤝 Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check out the Issues page if you want to request features or report bugs.


📄 License

Distributed under the MIT License. See LICENSE for more information.

Made with ❤️ and 🦀 Rust by weaztoven

About

A fast and lightweight CLI tool in Rust for finding and cleaning up developer junk (node_modules, target, .cache, etc.).

Topics

Resources

Stars

7 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages