Repository navigation
๐จ imgpt v0.3.0 Release Notes
Release Date: December 26, 2024
Repository: https://github.com/JacobFV/imgpt
๐ Major New Features
๐ง Persistent Configuration System
We've added a comprehensive persistent configuration system that allows you to save your preferences and avoid repeating command-line options:
- API Key Storage - Store your OpenAI API key securely in configuration
- Default Settings - Set default models, sizes, quality, and other generation parameters
- Directory Preferences - Configure default prompt and output directories
- Cross-Platform - Configuration stored in appropriate OS-specific directories
# Set your API key once
imgpt config set openai_api_key "your-key-here"
# Set default preferences
imgpt config set default_model "dall-e-3"
imgpt config set default_size "1024x1024"
imgpt config set default_quality "hd"
imgpt config set default_output_dir "/path/to/images"
# View current configuration
imgpt config show
# Reset to defaults
imgpt config reset๐จ Enhanced CLI with Typer
Complete rewrite of the CLI using Typer for a better user experience:
- Rich Output - Beautiful colored output with progress indicators
- Better Help - Comprehensive help system with examples
- Subcommands - Organized command structure (
imgpt generate,imgpt config) - Auto-completion - Shell completion support for commands and options
- Validation - Better input validation with helpful error messages
# New command structure
imgpt generate "A beautiful sunset" # Direct prompt
imgpt generate --dir ./prompts # Batch processing
imgpt config show # Configuration management
imgpt version # Version information๐ Smart Configuration Management
The configuration system intelligently handles defaults and overrides:
- Precedence Order: Command-line options โ Configuration file โ Built-in defaults
- Validation: All configuration values are validated before saving
- Platform-Aware: Uses OS-appropriate configuration directories
- macOS:
~/Library/Application Support/imgpt/ - Linux:
~/.config/imgpt/ - Windows:
%APPDATA%/imgpt/
- macOS:
๐ก๏ธ Enhanced Validation & Error Handling
Smart Input Validation
- Model-Size Compatibility: Automatic validation of size/model combinations
- Configuration Validation: Pydantic-based validation for all settings
- Directory Validation: Checks for directory existence and permissions
- API Key Handling: Secure storage and retrieval with fallback to environment
Better Error Messages
$ imgpt generate "test" --model dall-e-2 --size 2048x2048
โ Error: Size '2048x2048' is not valid for model 'dall-e-2'
Valid sizes for dall-e-2: 256x256, 512x512, 1024x1024๐ Configuration Options
API Settings
openai_api_key- Your OpenAI API key
Generation Settings
default_model- Default model (gpt-image-1,dall-e-2,dall-e-3)default_size- Default image size (e.g.,1024x1024,1536x1024)default_quality- Default quality (auto,high,medium,low,hd,standard)default_style- Default style for DALL-E 3 (vivid,natural)default_format- Default output format (png,jpeg,webp)
Directory Settings
default_prompts_dir- Default directory for prompt filesdefault_output_dir- Default directory for generated images
Processing Settings
default_delay- Default delay between API calls (seconds)skip_existing- Default setting for skipping existing images
๐ Breaking Changes
Command Structure Changes
The CLI now uses subcommands for better organization:
Old (v0.2.0):
imgpt "A sunset" --output sunset.png
imgpt --dir ./prompts --output ./imagesNew (v0.3.0):
imgpt generate "A sunset" --output sunset.png
imgpt generate --dir ./prompts --output ./imagesRemoved Options
--versionflag moved toimgpt versioncommand- Direct execution requires
generatesubcommand
๐ง Technical Improvements
Dependencies
- Added:
typer[all]for enhanced CLI experience - Added:
pydanticfor configuration validation - Added:
richfor beautiful terminal output - Added:
tomli-wfor TOML configuration file writing
Code Quality
- Type Safety: Enhanced type hints throughout codebase
- Validation: Pydantic models for configuration validation
- Testing: Comprehensive test suite for configuration system
- Documentation: Extensive inline documentation and examples
Performance
- Configuration Caching: Configuration loaded once and cached
- Lazy Loading: Configuration only loaded when needed
- Efficient Validation: Fast validation with detailed error messages
๐ Usage Examples
First-Time Setup
# Install imgpt
pipx install imgpt
# Set up your API key
imgpt config set openai_api_key "your-openai-api-key"
# Set your preferences
imgpt config set default_model "dall-e-3"
imgpt config set default_quality "hd"
imgpt config set default_output_dir "~/Pictures/AI-Generated"
# Generate your first image
imgpt generate "A majestic dragon flying over a medieval castle"Advanced Configuration
# Set up for batch processing
imgpt config set default_prompts_dir "~/Documents/Prompts"
imgpt config set default_output_dir "~/Pictures/Generated"
imgpt config set default_delay 1.0
imgpt config set skip_existing true
# Now batch processing is simple
imgpt generate --dir ~/Documents/PromptsConfiguration Management
# View all settings
imgpt config show
# Update specific settings
imgpt config set default_model "gpt-image-1"
imgpt config set default_size "1536x1024"
# Reset everything to defaults
imgpt config reset
# Find your config file
imgpt config path๐ Bug Fixes
- Fixed output format handling for different models
- Improved prompt length validation and truncation
- Enhanced file extension handling for custom output formats
- Better error handling for configuration file corruption
๐ Performance Improvements
- Reduced startup time through lazy configuration loading
- Optimized validation pipeline
- Improved memory usage for large batch operations
- Better error recovery and retry logic
๐ฆ Installation & Upgrade
New Installation
# Install with pipx (recommended)
pipx install imgpt
# Install with pip
pip install imgptUpgrade from v0.2.0
# Upgrade with pipx
pipx upgrade imgpt
# Upgrade with pip
pip install --upgrade imgpt
# Note: First run will create new configuration file
imgpt config show๐ฎ Migration Guide
From v0.2.0 to v0.3.0
- Update Commands: Add
generatesubcommand to existing scripts - Set Configuration: Use
imgpt config setto save frequently used options - Update Scripts: Replace
--versionwithimgpt version
Example Migration:
# Old
imgpt "A sunset" --model dall-e-3 --quality hd --output sunset.png
# New - one-time setup
imgpt config set default_model "dall-e-3"
imgpt config set default_quality "hd"
# New - simplified usage
imgpt generate "A sunset" --output sunset.png๐ Acknowledgments
- Typer team for the excellent CLI framework
- Pydantic team for robust data validation
- Rich team for beautiful terminal output
- Community feedback that drove these improvements
๐ฎ What's Next?
- Configuration profiles for different use cases
- Batch operation optimization
- Integration with popular design tools
- Advanced prompt templating system
- Configuration import/export functionality
Full Changelog: v0.2.0...v0.3.0
Download: https://github.com/JacobFV/imgpt/releases/tag/v0.3.0
Made with โค๏ธ by Jacob Valdez
๐จ imgpt v0.2.0 Release Notes
Release Date: May 26, 2025
Repository: https://github.com/JacobFV/imgpt
๐ Major New Features
๐ค Multi-Model Support
We've added support for all OpenAI image generation models:
- gpt-image-1 (default) - OpenAI's latest and most advanced image model
- dall-e-3 - High-quality artistic images with style controls
- dall-e-2 - Fast and cost-effective image generation
# Use different models
imgpt "A sunset" --model dall-e-3
imgpt "Quick sketch" --model dall-e-2๐ Multiple Image Dimensions
Generate images in various aspect ratios and sizes:
gpt-image-1:
- Square: 1024x1024
- Landscape: 1536x1024
- Portrait: 1024x1536
dall-e-3:
- Square: 1024x1024
- Landscape: 1792x1024
- Portrait: 1024x1792
dall-e-2:
- Small: 256x256
- Medium: 512x512
- Large: 1024x1024
# Generate in different orientations
imgpt "Landscape photo" --size 1792x1024
imgpt "Portrait painting" --size 1024x1536
imgpt "Thumbnail" --model dall-e-2 --size 256x256๐จ Quality & Style Controls
Fine-tune your image generation:
- Quality levels: auto, high, medium, low, hd, standard
- Style options: vivid, natural (DALL-E 3 only)
- Output formats: PNG, JPEG, WebP (gpt-image-1 only)
# High-quality artistic image
imgpt "Abstract art" --model dall-e-3 --quality hd --style vivid
# Web-optimized JPEG
imgpt "Website banner" --format jpeg --quality medium๐ก๏ธ Enhanced Validation & Intelligence
Smart Model Validation
- Automatic validation of size compatibility with each model
- Model-specific prompt length limits (32K for gpt-image-1, 4K for dall-e-3, 1K for dall-e-2)
- Intelligent default sizes based on selected model
Better Error Messages
$ imgpt "test" --model dall-e-2 --size 2048x2048
โ Error: Size '2048x2048' is not valid for model 'dall-e-2'
Valid sizes for dall-e-2: 256x256, 512x512, 1024x1024๐ Comprehensive Documentation Updates
Updated CLI Help
$ imgpt --help
Options:
--model {gpt-image-1,dall-e-2,dall-e-3} Model to use (default: gpt-image-1)
--size SIZE Image dimensions (e.g., 1024x1024)
--quality {auto,high,medium,low,hd,standard} Image quality (default: high)
--style {vivid,natural} DALL-E 3 style options
--format {png,jpeg,webp} Output format (default: png)Enhanced README
- Detailed model comparison table
- Comprehensive usage examples
- Best practices for each model
- Cost optimization tips
๐ง Technical Improvements
API Integration
- Full support for OpenAI's latest image generation API parameters
- Model-specific parameter handling
- Proper response format handling for each model
Code Quality
- Enhanced type hints and documentation
- Improved error handling and validation
- Extended test coverage for new features
- Backward compatibility maintained
๐ Usage Examples
Single Image Generation
# Default high-quality generation
imgpt "A majestic eagle in flight"
# Artistic style with DALL-E 3
imgpt "Surreal landscape" --model dall-e-3 --style vivid --quality hd
# Fast generation for prototyping
imgpt "Logo concept" --model dall-e-2 --size 512x512
# Custom format and quality
imgpt "Web image" --format jpeg --quality medium --size 1536x1024Batch Processing
# High-quality art generation
imgpt --dir ./art_prompts --model dall-e-3 --quality hd --style natural
# Thumbnail generation
imgpt --dir ./thumbnails --model dall-e-2 --size 256x256
# Web-optimized batch processing
imgpt --dir ./web_images --format webp --quality medium๐ Breaking Changes
None - This release maintains full backward compatibility. All existing commands will continue to work exactly as before.
๐ Bug Fixes
- Fixed output format handling for different models
- Improved prompt length validation
- Enhanced file extension handling for custom output formats
๐ Performance Improvements
- Optimized API parameter building
- Reduced unnecessary API calls through better validation
- Improved error handling reduces retry overhead
๐ฆ Installation & Upgrade
New Installation
# Install with pipx (recommended)
pipx install imgpt
# Install with pip
pip install imgptUpgrade from v0.1.0
# Upgrade with pipx
pipx upgrade imgpt
# Upgrade with pip
pip install --upgrade imgpt๐ Acknowledgments
- OpenAI for their comprehensive image generation API
- Community feedback that drove these feature requests
- Contributors who helped test the new functionality
๐ฎ What's Next?
- Batch size optimization for faster processing
- Image editing and variation capabilities
- Integration with popular design tools
- Advanced prompt templating system
Full Changelog: v0.1.0...v0.2.0
Download: https://github.com/JacobFV/imgpt/releases/tag/v0.2.0
Made with โค๏ธ by Jacob Valdez
๐จ imgpt v1.0.0 Release Notes
Release Date: May 26, 2025
Repository: https://github.com/JacobFV/imgpt
๐ Features
- Generate images from text prompts using OpenAI's image-gpt model
- Supports direct prompt input and batch processing of prompt files
- Output images in PNG format
- Simple CLI interface
๐ Bug Fixes
- Initial release, no known bugs
๐ฆ Installation
pip install imgpt