auto-organize
v1.5.0
Published
CLI tool to organize files in a directory based on their file types.
Maintainers
Readme

Auto Organize CLI
Read this in: English | Spanish
A command-line tool (CLI) to automatically organize files in any directory on your system.
What problem does it solve?
When working with folders that accumulate files (Downloads, Desktop, projects, etc.), things usually get messy:
- Files mixed by type.
- Time wasted manually sorting files.
- Risk of moving or deleting the wrong files.
Auto Organize CLI automates and fixes this process.
Key Features
- Automatic file organization by type (based on file extensions).
- Simulation mode (
--preview) to preview changes. - Type filters (
--only,--exclude). - Only moves files — never deletes them.
- Tested on Windows and Linux (macOS compatibility is expected due to Node.js cross-platform support).
Installation
Requires Node.js >= 16
Option 1: Without installation (For one-time use)
npx auto-organizeOption 2: Global Installation (For regular use)
npm install -g auto-organizeBasic Usage
Navigate to any directory on your system. For example:
cd /Users/DownloadsThen run:
auto-organize || npx auto-organizeDepending on the files present, it will create folders such as:
Images/
Documents/
Audios/
Videos/
Archives/And move files into their corresponding folders.
photo.jpg -> Images/
document.pdf -> Documents/
song.mp3 -> Audios/
video.mp4 -> Videos/
archive.rar -> Archives/Example

Simulation Mode (preview)
Preview the organization before applying real changes:
auto-organize --preview || auto-organize -pExample output:
Images/
photo.jpg
Documents/
contract.pdf
Audios/
song.mp3Example

Available Flags
--only <type>
Organize only the specified file types (if there is more than one type, separate the types with a comma).
auto-organize --only imagesauto-organize --only images,videos--exclude <type>
Excludes the specified file types (if there is more than one type, separate the types with a comma)
auto-organize --exclude archivesauto-organize --exclude archives,documents--help
Display the help guide and available types.
auto-organize --help || auto-organize -hSupported Types
- images
- documents
- spreadsheets
- presentations
- archives
- audios
- videos
- codes
Common Use Cases
- Organizing the Downloads folder
- Quick Desktop cleanup
- Automatically classifying project files (e.g. a
/publicdirectory)
Contributing
Contributions are welcome:
- Fork the project.
- Create a feature branch:
git checkout -b feature/{your-feature} - Commit your changes:
git commit -m 'Add your feature' - Push the branch:
git push origin feature/{your-feature} - Open a pull request.
License
- MIT
Author
LinkedIn: Christian Mathías Rincón
GitHub: @ChristianRincon
