AI-powered image processing CLI tool for modern workflows.
English | ζ₯ζ¬θͺ
A fast, efficient, and user-friendly command-line tool for image processing, built with Go and optimized for Apple Silicon.
- Resize - Maintain aspect ratio or specify exact dimensions
- Convert - Transform between JPEG, PNG, and WebP formats
- Quality Control - Adjust compression for optimal file size
- Parallel Processing - Leverage goroutines for maximum performance
- Progress Bar - Visual feedback for batch operations
- Glob Patterns - Process multiple files with
*.jpgpatterns
- EXIF Reading - View camera settings, GPS, and metadata
- EXIF Removal - Strip all metadata for privacy protection
- Dry-Run Mode - Preview operations before execution
- Error Handling - Detailed error messages and recovery
- Automatic Naming - Smart output filename generation
- Go 1.21 or higher
- macOS (Apple Silicon optimized) / Linux / Windows
git clone https://github.com/hiroki-abe-58/imgai.git
cd imgai
go build -o imgai# Make it executable and move to PATH
chmod +x imgai
sudo mv imgai /usr/local/bin/
# Verify installation
imgai --version# Use in Japanese
export IMGAI_LANG=ja
imgai resize photo.jpg --width 800
# Use in English (default)
export IMGAI_LANG=en
imgai resize photo.jpg --width 800# Resize to 800px width (maintain aspect ratio)
imgai resize photo.jpg --width 800
# Resize to 600px height
imgai resize photo.jpg --height 600
# Resize to exact dimensions
imgai resize photo.jpg --width 1920 --height 1080
# Batch resize with progress bar
imgai resize *.jpg --width 800
# Preview before resizing
imgai resize *.jpg --width 800 --dry-run
# Use 8 parallel workers for faster processing
imgai resize *.jpg --width 800 --workers 8# Convert to PNG
imgai convert photo.jpg --format png
# Convert to JPEG with custom quality
imgai convert image.png --format jpg --quality 85
# Convert to WebP (modern format)
imgai convert photo.jpg --format webp
# Batch convert all PNGs to JPEGs
imgai convert *.png --format jpg --quality 90
# Preview before converting
imgai convert *.png --format jpg --dry-run# View EXIF data
imgai exif photo.jpg
# Remove all metadata (privacy mode)
imgai strip photo.jpg
# Strip metadata and save to new file
imgai strip photo.jpg --output clean.jpg
# Batch strip metadata
imgai strip *.jpg --workers 8
# Preview metadata removal
imgai strip *.jpg --dry-runimgai/
βββ cmd/ # CLI commands
β βββ root.go # Root command with Cobra
β βββ resize.go # Resize command
β βββ convert.go # Format conversion
β βββ exif.go # EXIF reading
β βββ strip.go # EXIF removal
βββ pkg/ # Core packages
β βββ image/ # Image processing logic
β βββ batch/ # Batch processing with goroutines
β βββ metadata/ # EXIF handling
β βββ i18n/ # Internationalization
βββ main.go # Entry point
- DRY - Don't Repeat Yourself
- SOLID - Object-oriented design principles
- Separation of Concerns - Clear module boundaries
- Error Handling - Comprehensive error messages
- Cross-Platform - Works on macOS, Linux, and Windows
go build -o imgaigo test ./...# Create feature branch
git checkout -b feature/new-feature
# Make changes and commit
git add .
git commit -m "feat: add new feature"
# Push and create PR
git push origin feature/new-feature- Parallel Processing - Up to 8x faster with multiple workers
- Memory Efficient - Streaming image processing
- Apple Silicon Optimized - Native ARM64 support
- Goroutines - Concurrent processing for batch operations
- Project initialization
- CLI framework (Cobra)
- Image resize functionality
- Format conversion (JPEG/PNG/WebP)
- Batch processing with goroutines
- EXIF metadata reading
- Progress bar for batch operations
- Dry-run mode
- EXIF metadata removal
- Japanese language support (i18n)
- AI-powered features (future)
- Cross-platform binaries (releases)
MIT License - see LICENSE for details
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'feat: add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Hiroki Abe
- GitHub: @hiroki-abe-58
- Repository: imgai
Built with:
- Cobra - CLI framework
- imaging - Image processing
- goexif - EXIF handling
- progressbar - Progress visualization
β If you find this project useful, please consider giving it a star!