VisionSqueezer
CLI

CLI Options Reference

Every VisionSqueezer CLI flag, including --max-tokens token budgets, --model provider profiles, --format, --quality, --smart-crop, --json and --dry-run.

Reference

FlagDescription
--model <name>Target model alias; core profiles plus popular families such as kimi, glm, pixtral, gemma, internvl, llava, and minimax.
--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-tokens <N>Token budget. The image is downscaled until the target model's token estimate fits (Claude when no --model is set). 0 disables. The MCP server defaults to 1600; the CLI has no cap unless you pass this.
--max-tiles <N>Hard cap in the target model's own unit (28px patches for Claude, tiles for Gemini/Llama). Prefer --max-tokens (token budget guide).
--mode auto|standard|ocrauto (default) behaves like standard and keeps colour. ocr is the only mode that converts to black and white.
--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 gpt6 --json --dry-run

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