UNPKG

@happyvibess/file-organizer

Version:

Simple CLI tool to automatically organize your files by type

117 lines (83 loc) 2.69 kB
# organize-cli A simple command-line tool to automatically organize your files by type. ## Features - 📁 Automatically organizes files into categorized folders - 🎨 Supports common file types (images, documents, audio, video, etc.) - 🔍 Dry-run mode to preview changes - 📝 Detailed logging with verbose mode - ⚡ Fast and efficient file operations - 🛡️ Safe file moves with conflict handling ## Installation ```bash # Install globally npm install -g @happyvibess/file-organizer # Or use with npx npx @happyvibess/file-organizer ``` ## Quick Start ```bash organize # Organize current directory o # Short command to organize current directory organize Downloads # Organize specific directory ``` ## Usage ```bash # Organize current directory organize # or use the short alias o # Organize specific directory organize /path/to/directory # or o /path/to/directory # Preview changes without actually moving files organize --dry-run # or o -d # Show detailed output organize --verbose # or o -v ``` ### Options - `-d, --dry-run`: Preview changes without moving files - `-v, --verbose`: Show detailed output - `--version`: Show version number - `-h, --help`: Show help information ## Supported File Types The organizer creates the following category folders and moves files accordingly: - 📸 **images**: jpg, jpeg, png, gif, bmp, svg, webp - 📄 **documents**: pdf, doc, docx, txt, md, rtf, odt - 🎵 **audio**: mp3, wav, flac, m4a, aac - 🎥 **video**: mp4, avi, mkv, mov, wmv - 📦 **archives**: zip, rar, 7z, tar, gz - 💻 **code**: js, py, java, cpp, html, css, php, rb - 📎 **misc**: all other file types ## Examples ```bash # Organize Downloads folder organize ~/Downloads # Preview organization of Desktop organize ~/Desktop --dry-run # Organize current directory with detailed output organize -v # or use the short commands o ~/Downloads o ~/Desktop -d o -v ``` ## Requirements - Node.js >= 14.0.0 - npm >= 6.0.0 ## Contributing 1. Fork the repository 2. Create your feature branch (`git checkout -b feature/amazing-feature`) 3. Commit your changes (`git commit -m 'Add amazing feature'`) 4. Push to the branch (`git push origin feature/amazing-feature`) 5. Open a Pull Request ## Support ☕ If you find this tool helpful, you can support its development by buying me a coffee! [!["Buy Me A Coffee"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/happyvibess) [☕ Buy me a coffee](https://www.buymeacoffee.com/happyvibess) ## License This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.