Optimist CLI

Zero-config asset optimizer for WebP and WebM.

Overview

Optimist CLI compresses image and video assets with sensible defaults so you do not have to wire up FFmpeg or Sharp flags every time. Point it at a folder, get WebP and WebM output — one command, every asset, smaller.

Most asset pipelines start the same way: a folder of PNGs and MP4s, a ticket about Lighthouse, and a half-remembered set of CLI flags. Optimist is the shortcut I wanted for that moment — defaults that are good enough for shipping, with overrides when you need control.

Why a CLI

Design handoffs and marketing sites still ship oversized media. A GUI compressor is fine once; a CLI fits scripts, CI, and “just run this before deploy.” Optimist stays boring on purpose: discover files, convert them, report what changed.

What I built

  • Batch conversion for common image and video inputs
  • Sensible defaults tuned for web delivery (WebP for images, WebM for video)
  • Optional overrides via CLI flags when a project needs different quality or sizing
  • npm-publishable CLI with install, usage, and help commands
  • Clear console output for converted, skipped, and failed files

Typical usage

Install the package, point it at a directory of assets, and let it write optimized output beside or into a destination folder. The happy path needs no config file. When a project needs different quality settings, pass flags instead of editing a shared preset.

Stack

Node.js, Sharp for images, FFmpeg bindings for video, and a minimal CLI wrapper for argument parsing and help text. Published on npm as optimist-cli.

What I learned

Defaults matter more than features. People will forgive a missing advanced option; they will not forgive a tool that produces blurry hero images or corrupt video. The useful work was choosing quality settings that stay visually close while still cutting weight.

What's next

Watch mode for local design folders, optional config file support for teams, and clearer reporting when a file is skipped because it is already small enough.