A CLI tool to organize files into categories
npm install filezen--dry-run)
bash
npx filezen ./your-messy-folder
`
$3
`bash
npm install -g filezen
`
$3
`bash
git clone https://github.com/codewithevilxd/filezen.git
cd filezen
npm install
npm link
`
๐ฏ Usage Examples
$3
`bash
Organize current directory
filezen .
Organize downloads folder
filezen ./Downloads
Organize with detailed output
filezen ./Documents --verbose
`
$3
`bash
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"
`
$3
`bash
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 json
`
$3
`bash
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:
`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 | Organize directory | filezen ./downloads |
| filezen undo | 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 | Star favorite files | filezen star *.pdf |
| filezen graph | Generate file graph | filezen graph ./data |
| filezen analytics | 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 | -c | Custom config | --config myconfig.json |
| --ignore | | 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
`bash
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:
1. ๐ด Fork the repository
2. ๐ฟ Create a feature branch (git checkout -b feature/amazing-feature`)