A high-performance, feature-rich image conversion CLI tool built in Go.
Fast. Smart. Efficient. All from the terminal.
About β’ Features β’ Installation β’ Configuration β’ Technologies β’ Contributing β’ License
Welcome to GoPix β a blazing-fast image conversion CLI tool built with Go. GoPix empowers developers, designers, and power users with efficient batch image conversions, intelligent file handling, and performance-oriented architecture. Whether youβre processing thousands of photos or optimizing a single folder, GoPix handles it with speed and precision.
- Multi-format support: PNG, JPG, WebP, JPEG
- Parallel processing: Uses all CPU cores for maximum speed
- Real-time progress bar with ETA
- Smart resume for interrupted conversions
- Custom quality and compression settings
- Enhanced Batch Processing: Process folders and subfolders with advanced options
- Recursive directory traversal with depth control
- Preserve or flatten directory structure
- Custom output directory support
- Group results by source folder
- Skip empty directories
- Follow symbolic links (optional)
- Size and resolution limits
- Configuration profiles with YAML support
- Dry-run mode to preview changes
- Backup of originals
- Rate limiting to prevent system overload
- Detailed post-process stats and reporting
- Path validation to prevent directory traversal
- Safe defaults and permission checking
- Disk space validation before starting jobs
- Robust error handling and auto-retry mechanism
Important
sudo is required for some installation commands on linux. GoPix Only supports x86_64 architecture. macOS will not be supported in the future.
Download the latest pre-built binary for your platform from the Releases page.
Extract the archive
tar -xzf gopix-linux-amd64.vX.Y.Z.tar.gzMove the binary to the local bin directory
sudo mv linux/amd64/gopix /usr/local/binIf you want to install for a specific user
mv linux/amd64/gopix /home/$USER/.local/binThen you can test the tool by running:
gopix -v-
Download
gopix-windows-amd64-vX.Y.Z.zipfrom the Releases page. -
Extract the archive to a folder of your choice.
-
Move the binary located at
windows/amd64/gopix.exeto any folder of your choice orC:\Program Files\GoPix\bin. -
Add that folder to your System PATH:
- Open System Properties β Environment Variables β Path β Edit β Add new.
Then you can test the tool by running:
gopix -v![π Note] GoPix uses a
Makefileto build and install the CLI tool. Make sure you have themakeutilityGoandgitinstalled on your system. The script may adjust environment-specific paths depending on your OS.
sudo pacman -S base-devel mingw-w64-gccsudo apt install build-essential gcc-mingw-w64-x86-64sudo dnf install make mingw64-gccsudo zypper install make mingw64-gcc- Option 1: Install MSYS2 [recommended]
- Option 2: Use Git Bash and run the following command:
pacman -Syu pacman -S make
git clone --depth 1 https://github.com/MostafaSensei106/GoPix.git
cd GoPix
make- This will compile GoPix from source optmized for your os and cpu architecture and install it locally.
- The binary will be placed in your system's executable path (like
/usr/local/binon Linux/macOS). - You can now run:
gopix helpNote
To upgrade GoPix, make sure you have the required development tools installed:
go, make, and git.
To upgrade GoPix to the latest version, simply run
gopix upgrade- Clone or update the latest source from GitHub.
- Rebuild the binary using your current platform and architecture.
- Replace the old version automatically.
get the latest pre-built binary for your platform from Releases page and follow Installation Instructions.
# Convert all images in a directory to PNG
gopix -p ./images -t png# Convert to JPEG with 90% quality and keep originals
gopix -p ./images -t jpg -q 90 --keep# Preview changes without applying them
gopix -p ./images -t webp --dry-rungopix -p ./photos -t webp -q 95gopix -p ./photos -t png --backupgopix -p ./photos -t jpg -w 8 --rate-limit 5
gopix -p ./photos -t png -v --log-file# Process all images recursively with structure preservation
gopix -p ./photos -t webp --recursive --preserve-structure
# Process with custom output directory
gopix -p ./photos -t png --output-dir ./converted --recursive
# Process with depth limit (only 2 levels deep)
gopix -p ./photos -t jpg --recursive --max-depth 2
# Process without preserving structure (flatten all files)
gopix -p ./photos -t webp --recursive --no-preserve-structure
# Process with grouping by folder
gopix -p ./photos -t png --recursive --group-by-folder
# Process following symbolic links
gopix -p ./photos -t jpg --recursive --follow-symlinksGoPix uses a YAML config file located at:
# on Linux
~/Home/$USER/.gopix/config.yamldefault_format: "png"
quality: 85
workers: 8
max_dimension: 4096
log_level: "info"
auto_backup: false
resume_enabled: true
# supported_extensions: ["jpg", "jpeg", "png", "webp"] # Do not add any formats here,
# Batch processing configuration
batch_processing:
recursive_search: true
max_depth: 0 # 0 = unlimited depth
preserve_structure: true
output_dir: "" # Custom output directory (empty = use input directory)
group_by_folder: false
skip_empty_dirs: true
follow_symlinks: falseAll settings can be overridden using CLI flags.
| Technology | Description |
|---|---|
| π§ Golang | go.dev β The core language powering GoPix: fast and efficient |
| π οΈ Cobra (CLI) | spf13/cobra β CLI commands, flags, and UX |
| π¨ Fatih/color | fatih/color β Terminal text styling and coloring |
| π WebP encoder | chai2010/webp β Image conversion to/from WebP |
| π Resize | nfnt/resize β Image resizing utilities |
| π Progress bar | schollz/progressbar β Beautiful terminal progress bar |
| π¦ YAML config | gopkg.in/yaml.v3 β Config file parser |
| π Logrus | sirupsen/logrus β Advanced logging framework |
Contributions are welcome! Hereβs how to get started:
- Fork the repository
- Create a new branch:
git checkout -b feature/YourFeature - Commit your changes:
git commit -m "Add amazing feature" - Push to your branch:
git push origin feature/YourFeature - Open a pull request
π‘ Please open an issue first for major feature ideas or changes.
This project is licensed under the GPL-3.0 License. See the LICENSE file for full details.
Made with β€οΈ by MostafaSensei106