VisionSqueezer
Getting Started

Installation

Install VisionSqueezer via cargo, npm, or pip.

VisionSqueezer ships across three registries. Pick whichever fits your workflow — they all expose the same core pipeline.

The npm wrapper downloads the platform-correct prebuilt binary on install. Best path if you want the MCP server in an AI editor.

Terminal
npm install -g vision-squeezer

Or run it zero-install via npx:

Terminal
npx -y vision-squeezer image.png --model claude

Cargo (Rust source)

Terminal
cargo install vision-squeezer

This builds the vision-squeezer CLI and vision-squeezer-mcp server from source.

Python (pip)

Native wheels via pyo3 + maturin for Linux, macOS, and Windows.

Terminal
pip install vision-squeezer
import vision_squeezer as vs

report = vs.optimize_image(
    "screenshot.png",
    model="claude",
    auto_quality=0.95,
    output_path="screenshot.optimized.jpg",
)
print(report["tokens_saved"], report["size_reduction_pct"])

See Python Bindings for the full API.

Verify

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

--dry-run runs the full pipeline without writing to disk or touching the stats database — a safe way to confirm the install works and preview token impact.

Token savings are dimensional only. The --format flag (JPEG / WebP / AVIF) affects file size and upload latency, not API token count.