sqz

Context compression for AI coding agents: compresses tool output before it enters the model, dedups repeats to 13-token refs. Claude Code, Cursor, Codex, Kiro,

What is sqz?

Context compression for AI coding agents: compresses tool output before it enters the model, dedups repeats to 13-token refs. Claude Code, Cursor, Codex, Kiro, Zed, any MCP client. Rust, zero LLM calls.

Overview of sqz

What it is

sqz is a context compression tool for AI coding agents. It compresses tool output before it enters the model, deduplicating repeated content into short references (13 tokens). It is written in Rust, uses zero LLM calls, and works offline. The project is hosted at ojuschugh1/sqz and is not affiliated with any other similarly named tool.

Key features

  • Pre-injection context compression: compresses tool output before it enters the context window.
  • Session deduplication: repeated content (e.g., unchanged git status, same file lines) is replaced with a short reference instead of the full content.
  • Per-command formatters: keep agent-critical facts (failing test, assertion, file:line) and drop irrelevant parts.
  • Source code, stack traces, and credential lines are passed through unchanged or never cached.
  • Single Rust binary, deterministic, no LLM calls, works offline.
  • sqz expand can recover compressed results byte-exactly (except credentials, stack traces, migrations).
  • Supports Claude Code, Cursor, Codex, Kiro, Zed, and any MCP client.

Use cases

  • AI coding agents that spend most input tokens on tool output (build logs, test runs, git status, file reads).
  • Reducing token usage in sessions with noisy command output and repeated commands.
  • Compressing output from commands like cargo test, git status, file reads, and JSON responses.
  • Works with any MCP client and can be used as an MCP proxy.

Getting started

sh cargo install sqz-cli sqz-mcp # or: brew install ojuschugh1/sqz/sqz · npm i -g sqz-cli · pipx install sqz sqz init # hooks + MCP server + agent guidance for every client it finds Or use prebuilt binaries: sh # macOS / Linux curl -fsSL https://raw.githubusercontent.com/ojuschugh1/sqz/main/install.sh | sh # Windows (PowerShell) irm https://raw.githubusercontent.com/ojuschugh1/sqz/main/install.ps1 | iex # Any platform via npm npm install -g sqz-cli # macOS / Linux via Homebrew brew tap ojuschugh1/sqz brew install sqz After installation, run sqz init --global or sqz init to set up hooks. Run sqz doctor to check the chain.

License and pricing

Licensed under Apache-2.0. Open source.

Based on the project's public README and repository metadata.

Add this badge to your README

Featured on YunoDB Badge styles & help

Maintain this project? Show that it is featured on YunoDB.

Markdown[![Featured on YunoDB](https://yunodb.com/badge/ojuschugh1sqz.svg)](https://yunodb.com/tools/ojuschugh1sqz?utm_source=github&utm_medium=badge)
HTML<a href="https://yunodb.com/tools/ojuschugh1sqz?utm_source=github&utm_medium=badge"><img src="https://yunodb.com/badge/ojuschugh1sqz.svg" alt="Featured on YunoDB" height="20"></a>