filezen
v1.0.3
Published
A CLI tool to organize files into categories
Maintainers
Readme
🚀 FileZen - Intelligent File Organizer
Transform your chaotic directories into perfectly organized structures with AI-powered file categorization
FileZen is a cutting-edge command-line tool that revolutionizes file organization through intelligent categorization, advanced features, and seamless user experience. Whether you're a developer, designer, or power user, FileZen makes file management effortless and efficient.
✨ Key Features
🧠 Intelligent Organization
- Smart File Detection: Automatically recognizes 50+ file types and extensions
- AI-Powered Categorization: Uses advanced algorithms to classify files accurately
- Custom Categories: Define your own organization rules and categories
- Recursive Processing: Handles nested directories with ease
⚡ Performance & Speed
- Lightning Fast: Organizes thousands of files in seconds
- Progress Tracking: Real-time visual progress bars and statistics
- Memory Efficient: Optimized for large file collections
- Background Processing: Non-blocking operations for better UX
🎯 Advanced Features
- Preview Mode: See changes before applying them (
--dry-run) - Interactive Mode: Confirm each file move individually
- Undo Functionality: Easily revert any organization operation
- Date-Based Sorting: Organize files by modification date (Year/Month structure)
- Pattern Ignoring: Skip unwanted files and directories
- Verbose Logging: Detailed operation logs for transparency
🌟 Premium Features
- Star Favorite Files: Mark important files with star ratings ⭐
- Zoom Controls: Zoom in/out for detailed file inspection 🔍
- Graph Visualization: Interactive graphs showing file distribution 📊
- Analytics Dashboard: Comprehensive stats on your file organization
- Export Reports: Generate detailed organization reports in multiple formats
🛡️ Safety & Reliability
- Safe Operations: Backup and recovery mechanisms
- Conflict Resolution: Intelligent handling of duplicate files
- Error Recovery: Graceful handling of permission issues
- Cross-Platform: Works seamlessly on Windows, macOS, and Linux
📦 Installation
Quick Start (No Installation)
npx filezen ./your-messy-folderGlobal Installation (Recommended)
npm install -g filezenDevelopment Setup
git clone https://github.com/codewithevilxd/filezen.git
cd filezen
npm install
npm link🎯 Usage Examples
Basic Organization
# Organize current directory
filezen .
# Organize downloads folder
filezen ./Downloads
# Organize with detailed output
filezen ./Documents --verboseAdvanced Usage
# Preview changes first
filezen ./Photos --dry-run
# Interactive confirmation
filezen ./Music --interactive
# Organize by date
filezen ./Archive --by-date
# Skip temporary files
filezen ./Project --ignore "*.tmp,*.log,node_modules"Premium Features
# Star important files
filezen ./Important --star "*.pdf,*.docx"
# Zoom into file details
filezen ./Images --zoom-in --details
# Generate organization graph
filezen ./Data --graph --output report.html
# Export analytics
filezen ./Files --analytics --export jsonUndo Operations
# Undo last organization
filezen undo ./Downloads
# Undo with confirmation
filezen undo ./Documents --interactive🏷️ Smart Categories
FileZen automatically organizes files into these categories:
| Category | File Extensions | Description |
|----------|-----------------|-------------|
| 📸 Images | .jpg, .png, .gif, .webp, .svg, .psd, .ai | Photos, graphics, and design files |
| 📄 Documents | .pdf, .doc, .docx, .txt, .md, .xls, .ppt | Text documents and spreadsheets |
| 🎵 Audio | .mp3, .wav, .flac, .aac, .ogg, .m4a | Music and sound files |
| 🎬 Videos | .mp4, .mkv, .avi, .mov, .wmv, .flv | Video files and movies |
| 💻 Code | .js, .ts, .py, .java, .cpp, .html, .css, .php | Programming files |
| 📦 Archives | .zip, .rar, .7z, .tar, .gz, .bz2 | Compressed files |
| ⚙️ Executables | .exe, .msi, .dmg, .app, .deb, .rpm | Software installers |
| 🔤 Fonts | .ttf, .otf, .woff, .woff2, .eot | Font files |
| 🌐 Web | .html, .css, .js, .json, .xml | Web development files |
| 📂 Others | All other files | Miscellaneous files |
⚙️ Configuration
Create a custom filezen.config.json:
{
"categories": {
"WorkDocs": [".docx", ".xlsx", ".pptx", ".pdf"],
"Photos": [".jpg", ".jpeg", ".png", ".gif", ".webp"],
"Music": [".mp3", ".flac", ".wav", ".aac"],
"Videos": [".mp4", ".mkv", ".avi", ".mov"],
"Code": [".js", ".ts", ".py", ".java", ".cpp"],
"Archives": [".zip", ".rar", ".7z"],
"Design": [".psd", ".ai", ".svg", ".fig"],
"Others": []
},
"options": {
"ignorePatterns": ["node_modules", ".git", "*.tmp"],
"maxDepth": 10,
"backupEnabled": true
}
}📋 Command Reference
| Command | Description | Example |
|---------|-------------|---------|
| filezen <dir> | Organize directory | filezen ./downloads |
| filezen undo <dir> | Undo last operation | filezen undo ./downloads |
| filezen categories | List all categories | filezen categories |
| filezen config | Show current config | filezen config |
| filezen init-config | Create config file | filezen init-config |
| filezen star <files> | Star favorite files | filezen star *.pdf |
| filezen graph <dir> | Generate file graph | filezen graph ./data |
| filezen analytics <dir> | Show analytics | filezen analytics ./files |
🔧 Command Options
| Option | Short | Description | Example |
|--------|-------|-------------|---------|
| --dry-run | -d | Preview without changes | --dry-run |
| --interactive | -i | Confirm each move | --interactive |
| --by-date | -b | Sort by date | --by-date |
| --config <file> | -c | Custom config | --config myconfig.json |
| --ignore <patterns> | | Skip patterns | --ignore "*.log,node_modules" |
| --verbose | -v | Detailed output | --verbose |
| --star | -s | Star files | --star "*.pdf" |
| --zoom-in | -z | Zoom details | --zoom-in |
| --graph | -g | Generate graph | --graph |
| --analytics | -a | Show analytics | --analytics |
🏗️ Project Architecture
filezen/
├── 📁 bin/
│ └── filezen.js # CLI entry point
├── 📁 src/
│ ├── index.js # Main exports
│ ├── categories.js # File categorization logic
│ ├── cli.js # Command-line interface
│ ├── config.js # Configuration management
│ ├── logger.js # Logging utilities
│ ├── organizer.js # Core organization engine
│ ├── utils.js # Helper functions
│ ├── star.js # Star/favorite system
│ ├── graph.js # Graph visualization
│ ├── analytics.js # Analytics dashboard
│ └── index.test.js # Unit tests
├── 📁 docs/
│ └── examples/ # Usage examples
├── package.json # Package configuration
├── README.md # This file
└── LICENSE # MIT License🧪 Testing
# Run all tests
npm test
# Test with coverage
npm run test:coverage
# Watch mode for development
npm run test:watch
# Run specific test
npm test -- categories.test.js🤝 Contributing
We welcome contributions! Here's how to get started:
- 🍴 Fork the repository
- 🌿 Create a feature branch (
git checkout -b feature/amazing-feature) - 💻 Make your changes
- ✅ Add tests for new features
- 📤 Submit a pull request
- 🎉 Celebrate your contribution!
Development Guidelines
- Follow ESLint configuration
- Add unit tests for new features
- Update documentation
- Use conventional commits
📊 Analytics & Insights
FileZen provides detailed analytics about your file organization:
- File Distribution: Pie charts showing category breakdown
- Size Analysis: Largest files and folders
- Organization History: Track changes over time
- Performance Metrics: Speed and efficiency stats
- Usage Patterns: Most common file types
🌟 Star Features
- Favorite Files: Mark files as favorites with ⭐
- Priority Organization: Prioritize starred files
- Quick Access: Fast navigation to important files
- Backup Protection: Extra safety for starred files
🔍 Zoom & Detail View
- Zoom In: Detailed file information
- Metadata Display: EXIF, size, dates, permissions
- Preview Support: Quick file previews
- Deep Analysis: File content insights
📈 Graph Visualization
- Interactive Charts: File distribution graphs
- Directory Trees: Visual folder structure
- Timeline Views: File modification history
- Export Options: Save graphs as images/PDF
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙋♂️ Author & Support
Nishant Gaurav - Creator of FileZen
- 📧 Email: [email protected]
- 🔗 GitHub: @codewithevilxd
- 🐛 Issues: Report Bugs
- 💡 Feature Requests: GitHub Discussions
🙏 Acknowledgments
- Thanks to all contributors and users
- Inspired by the need for better file management
- Built with modern JavaScript and Node.js
Made with ❤️ by Nishant Gaurav
⭐ If FileZen helps you, please star this repo! ⭐
