The glimpse CLI is the
first-party command line tool for Glimpse. Every API operation is a
small command, and the project tooling (init, check, the baseline)
turns glimpse into a CI gate for your images:
bash
cpx alias mathiasgrimm/glimpse-cli glimpse
cpx glimpse convert banner.png --format=avif
code
Wrote banner.avif (image/avif, 24.2 KB, 3200x840)
If it runs PHP 8.2, it runs glimpse. There is nothing else to install: no ImageMagick, no libvips, no encoder builds.
In this section
- Installation: cpx, the standalone PHAR, and
self-update. - Authentication:
cpx glimpse authand the environment variables. - Commands: convert, optimize, resize, thumbnail, analyze, info, and usage.
- Project files:
init,check,skip,.glimpseignore, and the baseline. - Add Glimpse to Your Project: set up automatic optimization or check-only CI.
- Scripting: stdin, stdout,
--json, and clean pipes.
Setting up a project from scratch? Follow Add Glimpse to Your Project instead; it walks the whole journey in order.