PHPackages                             mathiasgrimm/glimpse-cli - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. mathiasgrimm/glimpse-cli

ActiveProject[CLI &amp; Console](/categories/cli)

mathiasgrimm/glimpse-cli
========================

Convert, optimize, resize, thumbnail and analyze images from your terminal. The first-party CLI for glimpseimg.com, the image API for developers.

v1.4.0(3w ago)0656[1 issues](https://github.com/mathiasgrimm/glimpse-cli/issues)MITPHPPHP ^8.2CI passing

Since Jul 8Pushed 3w agoCompare

[ Source](https://github.com/mathiasgrimm/glimpse-cli)[ Packagist](https://packagist.org/packages/mathiasgrimm/glimpse-cli)[ RSS](/packages/mathiasgrimm-glimpse-cli/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (10)Dependencies (18)Versions (22)Used By (0)

 [![glimpse: ship smaller images, skip the toolchain](art/banner.avif)](https://glimpseimg.com)

 Ship smaller images. Skip the toolchain.
 Convert, optimize, resize, thumbnail and analyze images from your terminal.
 The first-party CLI for [**glimpseimg.com**](https://glimpseimg.com), the image API for developers.

 [![Latest Version on Packagist](https://camo.githubusercontent.com/e9dceb526324b7ce397d1efac596fbaef7f484f7fcbd46f1f1b86b709c3d5f09/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d6174686961736772696d6d2f676c696d7073652d636c693f7374796c653d666c61742d737175617265266c6162656c3d7061636b6167697374)](https://packagist.org/packages/mathiasgrimm/glimpse-cli) [![Tests](https://camo.githubusercontent.com/ea851cd1d952194fda579bb5cce84981481be39af44f3a0a018de98e152c7c3d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6d6174686961736772696d6d2f676c696d7073652d636c692f63692e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/mathiasgrimm/glimpse-cli/actions/workflows/ci.yml) [![Total Downloads](https://camo.githubusercontent.com/f6b1471a3edc0892ef060bbdd1089b39c9ef7721662ebc3af743d73e253aaac2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d6174686961736772696d6d2f676c696d7073652d636c693f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mathiasgrimm/glimpse-cli) [![PHP Version](https://camo.githubusercontent.com/67c1af35e9344a8eac130a43e425f68d8cea91c1ddb5edcb6193c6b9d7a363a5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f6d6174686961736772696d6d2f676c696d7073652d636c692f7068703f7374796c653d666c61742d737175617265266c6162656c3d706870)](https://packagist.org/packages/mathiasgrimm/glimpse-cli) [![License](https://camo.githubusercontent.com/fbc909d38f56b52a9e53c251fb8a3fbddd9a55755e3340bece99f812f0da950b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6d6174686961736772696d6d2f676c696d7073652d636c693f7374796c653d666c61742d737175617265)](LICENSE)

---

Shipping images means wrangling ImageMagick, libvips, mozjpeg, cwebp and avifenc: compiled binaries that differ between your laptop, your teammate's laptop, and CI. **glimpse replaces all of them with one command**, with zero binary dependencies. The heavy lifting happens on the [Glimpse API](https://glimpseimg.com): stateless, nothing stored, your bytes never linger. You install a single CLI and go:

```
composer global require mathiasgrimm/glimpse-cli
glimpse auth
glimpse convert banner.png --format=avif
```

```
Wrote banner.avif (image/avif, 24.2 KB, 3200x840)

```

That's a real session: `banner.png` is a frame of the banner at the top of this page, re-encoded from 360.3 KB down to 24.2 KB. The banner you are actually looking at goes one step further; it is a two-frame animated AVIF (watch the green dot blink) that glimpse converted from a GIF, 40.1 KB in total. Want to know what a conversion will buy you *before* you convert? `glimpse analyze` predicts the output size for every format **without uploading your image**:

 [![glimpse analyze and convert running in a terminal](art/terminal.avif)](art/terminal.avif)

Run `glimpse` with no arguments to see everything it can do:

 [![the glimpse banner and command list printed when running glimpse without arguments](art/cli-banner.avif)](art/cli-banner.avif)

Documentation
-------------

[](#documentation)

The full documentation lives at **[glimpseimg.com/docs/cli](https://glimpseimg.com/docs/cli)**:

- [Installation](https://glimpseimg.com/docs/cli/installation): Composer, the standalone PHAR, and `self-update`.
- [Authentication](https://glimpseimg.com/docs/cli/authentication): `glimpse auth` and the environment variables.
- [Commands](https://glimpseimg.com/docs/cli/commands): convert, optimize, resize, thumbnail, analyze, info, and usage.
- [Project files](https://glimpseimg.com/docs/cli/project-setup): `glimpse init`, `glimpse check`, `.glimpseignore`, and the baseline.
- [Continuous integration](https://glimpseimg.com/docs/cli/continuous-integration): the scaffolded GitHub Actions workflow.
- [Scripting](https://glimpseimg.com/docs/cli/scripting): stdin, stdout, `--json`, and clean pipes.

Adding glimpse to an existing project? Follow [Add Glimpse to Your Project](https://glimpseimg.com/docs/add-to-your-project); it goes from install to a CI gate in about ten minutes.

This repository runs the same gate on itself: see [`.github/workflows/images.yml`](.github/workflows/images.yml).

Development
-----------

[](#development)

```
composer test        # Pint (check), PHPStan, and the Pest suite
```

### Releasing

[](#releasing)

```
make release VERSION=vX.Y.Z
```

This runs the test suite, compiles the PHAR, commits `builds/glimpse`, pushes, and creates the GitHub release with the binary attached, the equivalent of:

```
php glimpse app:build glimpse --build-version=vX.Y.Z
git add builds/glimpse && git commit -m "Build vX.Y.Z" && git push
gh release create vX.Y.Z builds/glimpse --title vX.Y.Z --generate-notes
```

`self-update` discovers versions through Packagist and downloads the `glimpse` PHAR attached to the GitHub release of the matching tag, so the release must carry the binary as an asset under exactly that name. Committing the fresh build keeps `composer global require` working (composer's `bin` points at `builds/glimpse`) and lets pre-0.1.1 installs, which download `builds/glimpse` from the tag itself, still update.

The `--build-version` must be the tag name verbatim, including the `v` prefix. The updater compares the embedded build version against the Packagist tag as plain strings, so a build stamped `0.1.0` never equals the tag `v0.1.0` and `self-update` would keep re-downloading the release it is already running.

License
-------

[](#license)

glimpse-cli is open-source software licensed under the [MIT license](LICENSE).

---

 Every image on this page was converted by glimpse itself, including the animated banner (GIF in, animated AVIF out).
 Grab a free API key at [**glimpseimg.com**](https://glimpseimg.com) (**Settings → API Tokens**).

###  Health Score

47

—

FairBetter than 93% of packages

Maintenance95

Actively maintained with recent releases

Popularity19

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

18

Last Release

26d ago

Major Versions

v0.11.0 → v1.0.02026-07-19

### Community

Maintainers

![](https://www.gravatar.com/avatar/56f4dbd80bb6510bdc2adc49fcf7ec925cb45535b3bfdadf0964a09d678cf8ab?d=identicon)[mathiasgrimm](/maintainers/mathiasgrimm)

---

Top Contributors

[![mathiasgrimm](https://avatars.githubusercontent.com/u/450069?v=4)](https://github.com/mathiasgrimm "mathiasgrimm (153 commits)")

---

Tags

clithumbnailconvertimageresizegifpngjpegjpgWebpavifoptimizeglimpse

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/mathiasgrimm-glimpse-cli/health.svg)

```
[![Health](https://phpackages.com/badges/mathiasgrimm-glimpse-cli/health.svg)](https://phpackages.com/packages/mathiasgrimm-glimpse-cli)
```

###  Alternatives

[intervention/image-laravel

Laravel Integration of Intervention Image

1599.8M228](/packages/intervention-image-laravel)[mehrancodes/laravel-harbor

A CLI tool to Quickly create On-Demand preview environment for your apps.

99100.2k](/packages/mehrancodes-laravel-harbor)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

265.2k](/packages/aedart-athenaeum)[image-charts/image-charts

Official Image-Charts.com API client library

2871.0k](/packages/image-charts-image-charts)[choowx/rasterize-svg

A PHP library for converting SVG to JPEG, PNG, and WEBP

2290.9k](/packages/choowx-rasterize-svg)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
