Skip to content

nydevel/rust_cleaner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust Cleaner

Rust Cleaner is a small command-line tool that recursively scans a base directory, finds Rust projects, and cleans their target directories.

A directory is treated as a Rust project when it contains a Cargo.toml file. The scanner walks the full directory tree, so nested Rust projects are also detected. When a Rust project has a target directory, Rust Cleaner removes the contents of that directory while keeping the target directory itself.

Features

  • Recursively scans from any base directory.
  • Detects Rust projects by Cargo.toml.
  • Handles Rust projects nested inside other Rust projects.
  • Skips scanning inside target directories.
  • Shows an interactive TUI with scan progress, events, counters, and cleaned project results.
  • Supports plain console output for scripts and CI.

Installation

Build from source:

cargo build --release

The compiled binary will be available at:

target/release/rust_cleaner

Usage

Run with the interactive TUI:

cargo run -- /path/to/base/directory

Or run the compiled binary directly:

./target/release/rust_cleaner /path/to/base/directory

Use plain console output instead of the TUI:

cargo run -- --plain /path/to/base/directory

Show help:

cargo run -- --help

Release Builds

GitHub Actions builds release archives for:

  • Linux x86_64
  • macOS x86_64
  • macOS aarch64

Push a version tag to create a GitHub release:

git tag v0.1.0
git push origin v0.1.0

Safety Notes

Rust Cleaner removes files and directories inside each matched target directory. It does not remove the target directory itself and does not clean target directories in folders that are not detected as Rust projects.

License

This project is licensed under the MIT License. See LICENSE.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages