# VisionSqueezer

> Fits images to a vision-LLM token budget before they reach the model. A library, CLI and MCP server for code, agents and pipelines. It cannot shrink images pasted or attached in a chat window: the client sends those before any tool runs.

## Key Features
- **Provider-Aware Resizing:** Current Claude 28px patches, OpenAI GPT-6/GPT-5.6 32px patches, legacy OpenAI tiling, and Gemini 768px tiles.
- **Padding Stripping:** Aggressive background/solid-color border cropping to minimize wasted pixel area.
- **Think in Code (Sandbox):** Execute atomic operations (crop, grayscale, binarize, resize) locally before sending to LLM.
- **Persistent Analytics:** Track token and USD savings in a local SQLite database (`~/.vision-squeezer/stats.db`).
- **Universal MCP:** One-liner integration for Claude Code, Cursor, Zed, and VS Code via `npx -y vision-squeezer`.

## Core Commands
- `vision-squeezer <image> [options]`: Optimize a local image.
- `vision-squeezer stats`: View cumulative savings analytics.
- `vision-squeezer setup-hook`: Print shell integration (eval) script for Zsh/Bash.

## Detailed Documentation
- [Full LLM Documentation](llms-full.txt)
- [Project README](README.md)
- [Mission Statement](MISSION.md)
