CLI Commands
The Squeezr CLI manages the proxy lifecycle. All commands are available after installing with npm install -g squeezr-ai.
squeezr setup
One-time setup that configures everything automatically: env vars, shell wrapper, auto-start, and TLS certificates. Run once after installation.
squeezr setupWhat it does:
- Sets
ANTHROPIC_BASE_URLandGEMINI_API_BASE_URLin your user environment. - Installs a shell wrapper in PowerShell
$PROFILE(Windows) or~/.bashrc/~/.zshrc(Linux/macOS/WSL) that auto-refreshes env vars without restarting the terminal. - Registers auto-start (Task Scheduler on Windows, systemd on Linux, launchd on macOS).
- Generates and installs the MITM CA certificate for Codex support.
squeezr start
Starts the proxy as a background daemon.
squeezr startStarts both the HTTP proxy (port 8080) and the MITM proxy (port 8081). If a version mismatch is detected after an update, it restarts automatically with the correct binary.
squeezr stop
Stops the running proxy daemon.
squeezr stopsqueezr status
Shows whether the proxy is running, on which ports, and the PID.
squeezr statussqueezr update
Kills the running proxy, installs the latest version from npm, and restarts automatically. Also runs setup to refresh env vars and shell wrappers.
squeezr updatesqueezr logs
Shows the last 50 log lines.
squeezr logssqueezr config
Prints the current resolved configuration.
squeezr configsqueezr ports
Interactive prompt to change the HTTP proxy port and MITM proxy port. Updates env vars automatically.
squeezr portssqueezr gain
Estimates token savings for a directory by analysing the files in it.
squeezr gainOptions:
--session— Show savings from the current live session instead of estimating from files.--details— Show per-request breakdown with individual compression ratios.
squeezr gain --session --detailssqueezr tunnel
Opens a secure tunnel (via Cloudflare) that exposes your local Squeezr proxy to the internet. Useful for tools like Cursor IDE that cannot connect to localhost directly.
squeezr tunnelPrints a public https:// URL that you can use as your API base URL in tools that don't support localhost. The tunnel stays open until you press Ctrl+C or stop the proxy.
squeezr bypass
Toggles bypass mode. When enabled, all requests pass through uncompressed but are still logged for stats. Runtime-only — resets on proxy restart.
squeezr bypass # toggle bypass on/off
squeezr bypass --on # enable bypass (disable compression)
squeezr bypass --off # disable bypass (resume compression)Use this when you suspect compression is affecting AI responses. The proxy continues recording request counts and token sizes, so you can compare sessions with and without compression active.
squeezr discover
Detects which AI CLIs are installed on your system.
squeezr discoversqueezr uninstall
Removes everything Squeezr installed: env vars, CA certificates, auto-start entries, and log files. Run npm uninstall -g squeezr-ai afterwards to remove the package.
squeezr uninstallsqueezr version
Prints the installed version.
squeezr versionCommand summary
| Command | Description |
|---|---|
squeezr setup | Configure env vars, shell wrapper, auto-start, CA trust |
squeezr start | Start the proxy daemon |
squeezr stop | Stop the proxy daemon |
squeezr status | Show proxy status |
squeezr update | Update to latest version and restart |
squeezr logs | Show last 50 log lines |
squeezr config | Print current configuration |
squeezr ports | Change HTTP and MITM proxy ports |
squeezr gain | Estimate token savings (supports --session, --details) |
squeezr tunnel | Open a public tunnel to the local proxy |
squeezr bypass | Toggle bypass mode (skip compression, keep logging) |
squeezr discover | Detect installed AI CLIs |
squeezr mcp install | Register MCP server in Claude Code, Cursor, Windsurf, Cline |
squeezr uninstall | Remove Squeezr completely |
squeezr version | Print version |