Configuration
Squeezr is configured via TOML files. The global config lives next to the binary and is deep-merged with an optional per-project config.
Config file locations
Global config: squeezr.toml
Located next to the installed binary (in the npm global prefix). Created automatically with defaults on first run. Use squeezr config to see its resolved path and current values.
Project config: .squeezr.toml
Place this in your project root. Settings here are deep-merged over the global config. Useful for per-repo compression tuning (e.g. more aggressive compression for large monorepos, or skipping specific tools).
Full configuration reference
[proxy]
[proxy]
port = 8080 # HTTP proxy port (Claude Code, Aider, Gemini CLI)
mitm_port = 8081 # MITM proxy port (Codex) — defaults to port + 1[compression]
[compression]
threshold = 800 # min chars to trigger compression
keep_recent = 3 # last N tool results left uncompressed
compress_system_prompt = true
compress_conversation = false # compress assistant messages too (aggressive)
# skip_tools = ["Read"] # never compress these tools
# only_tools = ["Bash"] # only compress these tools[cache]
[cache]
enabled = true
max_entries = 1000[adaptive]
Adaptive pressure scales compression aggressiveness with context window usage.
[adaptive]
enabled = true
low_threshold = 1500 # < 50% context: only compress results > 1500 chars
mid_threshold = 800 # 50–75% context: standard compression
high_threshold = 400 # 75–90% context: aggressive
critical_threshold = 150 # > 90% context: compress everything[local]
Configure a local model for compression (used when your coding tool is Ollama, or as a fallback compression backend).
[local]
enabled = true
upstream_url = "http://localhost:11434"
compression_model = "qwen2.5-coder:1.5b"Environment variable overrides
| Variable | Default | Description |
|---|---|---|
SQUEEZR_PORT | 8080 | HTTP proxy port |
SQUEEZR_MITM_PORT | 8081 | MITM proxy port (Codex) |
SQUEEZR_THRESHOLD | 800 | Min chars to compress |
SQUEEZR_KEEP_RECENT | 3 | Recent results to skip compression |
SQUEEZR_DISABLED | false | Disable all compression |
SQUEEZR_DRY_RUN | false | Log savings without compressing |
SQUEEZR_LOCAL_UPSTREAM | http://localhost:11434 | Ollama/LM Studio URL |
SQUEEZR_LOCAL_MODEL | qwen2.5-coder:1.5b | Local compression model |
Per-command skip
Add # squeezr:skip anywhere in a Bash command to bypass compression for that specific result:
cat my-file.json # squeezr:skipExample: project config
# .squeezr.toml — in your project root
[compression]
threshold = 400 # more aggressive for this large monorepo
compress_conversation = true
skip_tools = ["WebFetch"] # never compress web fetches in this project
[adaptive]
critical_threshold = 100 # push harder when context is nearly full