sortify AhmedSamy
winget install --id=AhmedSamy.Sortify -e High-performance folder organizer. Go binary, safety-first, cross-platform.
winget install --id=AhmedSamy.Sortify -e High-performance folder organizer. Go binary, safety-first, cross-platform.
Sortify ๐๏ธ is a fast, safety-first CLI tool that automatically organizes files in a directory into categorized folders (Images, Documents, Videos, Archives, Code, etc.). Written in Go, it compiles to a single static binary with no runtime dependencies. Supports dry-run previews, filename sanitization, real-time watch mode, and custom configuration.
go install github.com/ahmedthebest31/sortify@latest
Make sure $GOPATH/bin is in your PATH.
Download the pre-built binary for your platform from the Releases page.
sortify_Linux_x86_64.tar.gzsortify_Darwin_x86_64.tar.gz or sortify_Darwin_arm64.tar.gz (Apple Silicon)sortify_Windows_x86_64.exewinget install AhmedSamy.Sortify
sortify [flags]
sortify --dir
sortify watch --dir
sortify --version
sortify --help
| Command | Description |
|---|---|
sortify | Run interactive mode (prompts for directory) |
sortify --dir ./Downloads | Organize a specific directory |
sortify --dir ./Downloads --dry-run | Preview changes without moving files |
sortify watch --dir ./Downloads | Watch a directory and organize files in real time |
| Flag | Description |
|---|---|
--dir string | Target directory to organize |
--dry-run | Preview changes without moving files |
--verbose | Show detailed per-file logging |
--config string | Path to a custom config.json |
--version | Show version information |
-h, --help | Show help |
# Organize Downloads (interactive)
sortify --dir ~/Downloads
# Preview what would happen
sortify --dir ~/Downloads --dry-run --verbose
# Keep watching Desktop and auto-organize
sortify watch --dir ~/Desktop
# Use a custom config
sortify --dir ~/Downloads --config ~/my-config.json
Sortify reads config.json from the current directory (or a custom path via --config). If no file is found, sensible defaults are used.
{
"categories": {
"images": [".jpg", ".jpeg", ".png", ".gif", ".bmp", ".webp", ".svg"],
"documents": [".pdf", ".docx", ".txt", ".xlsx", ".pptx", ".csv", ".md"],
"code": [".go", ".py", ".js", ".ts", ".html", ".css", ".java", ".rs", ".cpp", ".h"]
},
"ignore": [".tmp", ".DS_Store", "thumbs.db"],
"sanitizeNames": true,
"sanitizeOptions": {
"removeEmojis": true,
"collapseSpaces": true,
"normalizeCase": "lower"
},
"patchNumbers": false,
"numberWidth": 3,
"numberPatchingMode": "first",
"dryRun": false,
"logLevel": "info",
"logPath": "organizer.log",
"printSummary": true,
"verboseOutput": false
}
| Field | Type | Default | Description |
|---|---|---|---|
categories | object | go, py, js, etc. | Map of folder names to file extension lists |
ignore | array | .tmp, .DS_Store | Filenames/patterns to skip |
sanitizeNames | bool | true | Clean up filenames (remove emojis, collapse spaces) |
sanitizeOptions.removeEmojis | bool | true | Strip emoji characters |
sanitizeOptions.collapseSpaces | bool | true | Replace multiple spaces with one |
sanitizeOptions.normalizeCase | string | "lower" | "lower", "upper", or "none" |
patchNumbers | bool | false | Zero-pad numbers in filenames |
numberWidth | int | 3 | Width for number patching (e.g. 3 -> 001) |
numberPatchingMode | string | "first" | "first", "all", or "none" |
dryRun | bool | false | Preview without moving |
logLevel | string | "info" | "silent", "info", or "debug" |
logPath | string | "organizer.log" | Path for the log file (relative to working dir) |
printSummary | bool | true | Print summary after organization |
verboseOutput | bool | false | Per-file output to stdout |
Contributions are welcome. Open an issue or submit a pull request on GitHub.
MIT License. See LICENSE.