Apolo in the terminal.
The apolo command line does what the app does, for scripts and servers: the same engines, the same options and the same presets.
Install
On macOS and Linux, with Homebrew, which also brings the server for AI agents. Otherwise, download your system's archive from the downloads, under “Other downloads”.
brew install webcafeina/apolo/apolo
The usual options
Each format takes the options of its official tool, and gives the same file, byte for byte:
WebP, like cwebp
apolo webp -q 80 photo.png -o photo.webp
AVIF, like avifenc
apolo avif -q 60 photo.png photo.avif
JPEG XL, like cjxl
apolo jxl photo.png photo.jxl -d 1
JPEG, like cjpeg (MozJPEG)
apolo jpeg -quality 80 -outfile photo.jpg photo.png
PNG, like oxipng
apolo png -o 4 photo.png
Whole folders
apolo lote converts folders and images in parallel, with their subfolders, and never overwrites: if a file exists, the new one gets a number.
WebP and AVIF, at the lowest quality that doesn't show
apolo lote photos/ --formato webp,avif --objetivo 80
At 1920 px on the longest side, only the lightest format per photo
apolo lote photos/ --formato webp,avif,jpeg --mas-ligero --lado-mayor 1920
With a preset saved in the app
apolo lote photos/ --preset "For the web"
Measure the loss
SSIMULACRA 2, PSNR and SSIM of a result against its original. At 90 or more you can't tell them apart; at 70, it's high quality; at 50, it shows.
apolo medir photo.png photo.webp
In Spanish
By default, in your system's language. To change it, --idioma es (or en).