Skip to content

kef01/bruh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 BRUH - Bulk Renamer Ultimate Handler 🦀

BRUH Logo

Bulk Renamer Ultimate Handler (BRUH) is a fast, safe, and interactive command-line tool written in Rust for mass-renaming files in a directory. Whether you want to append dates, add prefixes/suffixes, or sequentially number your files, bruh handles it elegantly while keeping your data safe.

✨ Features

  • Sequential Renaming: Automatically rename files with an auto-padded incrementing number (e.g., 01, 02) and a custom string (or the current date).
  • Prefix & Suffix Support: Easily add strings to the beginning or end of existing filenames without changing the core name.
  • Casing Formats: Intelligently convert existing filenames into --camel-case, --snake-case, --kebab-case, or --pascal-case.
  • Custom Sorting: Control the file processing order using --sort time (chronologically) or --sort ext (by extension, then chronologically), and optionally --reverse.
  • Extension Filtering (-e): Target specific file types (e.g., only rename .jpg and .mp4 files) while ignoring the rest.
  • Safety First (--dry-run): See exactly what would happen without actually changing any files on your disk.
  • Crash Recovery: Power went out during mass rename? Breathe easy! Two-pass algorithm ensures that no files were lost! With --recover you can recover your files.
  • Interactive Overwrite Protection: If a rename operation would overwrite an existing file, bruh pauses and asks for your confirmation via an interactive prompt.
  • Undo Functionality (--undo): Made a mistake? bruh creates a hidden .bruh_history file during operations, allowing you to instantly revert the last batch of renames.
  • Beautiful User Interface: Features smooth progress bars (indicatif) and interactive terminal prompts (dialoguer).
  • Cross-Platform: bruh can be compiled and used on Windows, macOS, and Linux.

📦 Installation

Since bruh is built with Rust, you can compile and install it directly using Cargo.

  1. Ensure you have Rust installed.
  2. Clone this repository:
git clone https://github.com/kef01/bruh.git
cd bruh
  1. Install the binary:
cargo install --path .

💻 Platform Compatibility

  • Linux: Primary development platform. Fully tested and supported.
  • macOS: Should work flawlessly out of the box, as it shares a UNIX-based architecture similar to Linux.
  • Windows: While Rust provides excellent cross-platform compilation, bruh has not been extensively tested on Windows. Due to fundamental differences in how Windows handles filesystems (e.g., file locking, hidden files), some unexpected behaviors might occur. Windows users are highly encouraged to use the --dry-run flag before running large batches and report any issues!

💡 Usage Examples

Here's how to use bruh:

1. Standard Rename (Number + Date) Renames all files in ./images to 01_DD-MM-YYYY.jpg, 02_DD-MM-YYYY.jpg, etc. (auto-pads based on total files).

bruh ./Images

2. Standard Rename (Number + Custom String) Renames all files in ./images to 01_vacation.jpg, 02_vacation.jpg, etc. (auto-pads based on total files).

bruh ./Images "vacation"

3. Add a Prefix and Suffix Keeps the original filename but adds text to the start and end (e.g., document.pdf becomes 2024_document_v2.pdf).

bruh ./Work_Docs --prefix "2024_" --suffix "_v2"

4. Filter by Extension Only rename specific files, ignoring everything else. You can filter out multiple extensions.

bruh ./My_Photos "holiday" -e jpg pdf mp3 #or other extensions

5. Sort by Creation Time (Chronological) By default, bruh sorts files alphabetically. If you want to rename them in the order they were created (from oldest to newest), use --sort time. Perfect for organizing vacation photos!

bruh ./Trip "summer_trip" --sort time

6. Sort by Extension (File Type) With --sort ext group files by their extension (e.g., all .jpg first, then all .mp4, etc.), and within those groups sort them chronologically.

bruh ./Misc "media" --sort ext

7. Reverse Sorting You can combine any sorting method with the --reverse (or -r) flag. For example, if you want to rename files by time, but from newest to oldest:

bruh ./Downloads "recent_files" --sort time --reverse

8. Undo the Last Action Revert the most recent batch of renames in the specified folder.

bruh ./Images --undo

9. Change Filename Casing Converts filename casings like My summer vacation 2023.png to my_summer_vacation_2023.png.

bruh ./Vacation_2023 --snake-case #or --camel-case, --kebab-case, --pascal-case

10. Dry Run (Test Mode) Simulate the renaming process without touching your files. Highly recommended before running large batches!

bruh ./Backup_Files "backup" --dry-run

11. Recover orphaned files If a massive rename operation was forcefully stopped, recover the temporary .bruh files back to their original state.

bruh ./Very_Important_Files --recover

12. In case you need help You don't have to memorize commands and what they do. --help (or -h flag) will remind you of everything you need to know!

bruh --help

🛠️ Built With

⚠️ PLEASE NOTE

This project is originally built to satisfy my own needs, so please use it at your own risk, as I am not responsible for any possible damages. This is by no means a finished product, and I am by no means an experienced programmer so any contributions, help and guidances are more than welcome!

☕ Ko-fi

If you want to support me and my project, as I am doing this for free (not complaining btw lol) buy me a Ko-fi. THANK YOU!

📄 License

BRUH is licensed under the GNU General Public License v3.0 - see the LICENSE file for details. Copyright © 2026, Stefan Peković.

About

Bulk Renamer Ultimate Handler (BRUH)-CLI tool to rename all files within a directory. Bulit with Rust!

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages