AI-powered image editing command-line tool for advanced image processing operations.
- Upload & Manage: Upload images and track them locally
- Resize & Transform: Resize, crop to aspect ratio, and rotate images
- Color Adjustments: Convert to B&W, RGB, adjust contrast and brightness
- AI-Powered Cleanup: Remove backgrounds, objects, and noise
- Advanced Editing: Replace backgrounds, edit with AI prompts, add watermarks
cd pxForge
pip install -e .cd pxForge
pip install -e ".[dev]"By default, pxForge connects to the hosted API at:
https://shlokarora2709-ai-image-editor.hf.space
To use a custom API endpoint, set the environment variable:
export PXFORGE_API_URL="https://your-api-endpoint.com"pxforge upload path/to/image.jpgpxforge listpxforge delete <image-id>pxforge download <url> output/path.jpgpxforge resize <image-id> --width 800 --height 600
pxforge resize <image-id> -w 1920 -h 1080pxforge aspect-ratio <image-id> --ratio 16:9
pxforge aspect-ratio <image-id> -r 4:3pxforge rotate <image-id> --angle 90
pxforge rotate <image-id> -a 180pxforge to-bw <image-id>pxforge to-rgb <image-id>pxforge contrast <image-id>pxforge brightness <image-id>pxforge remove-bg <image-id>pxforge remove-object <image-id> --x 100 --y 150 --radius 50pxforge remove-noise <image-id>pxforge replace-bg <image-id> path/to/new-background.jpgpxforge prompt-edit <image-id> --prompt "make the sky more blue"
pxforge prompt-edit <image-id> -p "add a sunset in the background"pxforge watermark <image-id> --text "Copyright 2025" --position bottom-right
pxforge watermark <image-id> -t "My Photo" -p top-leftWatermark positions: top-left, top-right, bottom-left, bottom-right
Commands are organized into 5 categories for easy discovery:
- Basic Commands: upload, list, delete, download
- Resize & Transform: resize, aspect-ratio, rotate
- Color Adjustments: to-bw, to-rgb, contrast, brightness
- AI-Powered Cleanup: remove-bg, remove-object, remove-noise
- Advanced Editing: replace-bg, prompt-edit, watermark
# General help (shows all commands grouped by category)
pxforge --help
# Command-specific help
pxforge upload --help
pxforge resize --help
pxforge prompt-edit --helppxforge --version
- Create a new function in the appropriate command module
- Add Click decorators for arguments and options
- Include comprehensive docstring
- Register the command in
cli.py
Example:
@click.command()
@click.argument("image_id")
@click.option("--param", "-p", help="Parameter description")
def my_command(image_id, param):
"""
Command description.
IMAGE_ID: Description of argument
"""
# Implementation (keep under 30 lines)
pass- AI-powered operations (background removal, noise reduction, prompt editing) may take several minutes
- All processed images are returned as URLs from the cloud storage
- Local registry only stores image IDs, not the actual images
- Network timeouts are set to 10 minutes for heavy AI operations
Make sure you've uploaded the image first using pxforge upload and the image ID is in your local registry.
Some AI operations take time. The CLI automatically handles longer timeouts for heavy operations.