VisionSqueezer
CLI

Options

Full reference for every VisionSqueezer CLI flag.

Reference

FlagDescription
--model <name>Target model: claude, gpt4o, gpt5, gemini. Drives the resize math.
--format jpeg|webp|avifOutput encoding. AVIF is the default for new pipelines.
--quality 1-100Output quality (default 75).
--auto-quality 0.0..1.0Binary-search quality in [40,95] to hit an SSIM target.
--smart-cropEdge-energy (Sobel-lite) crop. Best for photographic content.
--ops '<JSON>'Execute Sandbox operations.
--output <path>Custom output destination (single-file mode).
--output-dir <path>Output root (batch mode, mirrors structure).
--recursiveWalk subdirectories in batch mode.
--max-tiles <N>Hard cap on the token budget.
--jsonMachine-readable JSON output (single-file or batch aggregate).
--dry-runRun the full pipeline without writing to disk or updating the stats DB.

Quality vs. auto-quality

--quality is a fixed encoder setting. --auto-quality is smarter: it binary-searches the quality range and lands on the smallest file that still passes a perceptual SSIM threshold.

Terminal
# Fixed quality
vision-squeezer image.png --quality 80

# Target perceptual fidelity, minimize bytes
vision-squeezer image.png --auto-quality 0.95

Use --auto-quality 0.95 when bandwidth matters and you can tolerate slight perceptual loss.

Crop strategy

  • Default (corner-tolerance): strips solid-color padding. Best for screenshots with uniform borders.
  • --smart-crop: keeps the high-information region using gradient energy. Best for photos and saliency-heavy content.

Estimate before writing

Terminal
vision-squeezer image.png --model gpt4o --json --dry-run

--json --dry-run reports token impact with zero side effects — ideal for pipelines that gate on savings before committing.