ojuschugh1Developer tools

sqz

A Rust-based CLI and MCP tool that compresses command output and deduplicates context to cut LLM token costs.

  • CLI
  • IDE plugin
  • Browser extension
  • Library/framework
  • Windows
  • macOS
  • Linux
  • Browser
  • Self-hostable
  • Runs locally
  • Docker supported
sqz screenshot
Popularity
624 Stars
GitHub stars
Recent activity
9/15/2026
Updated in the last 30 days
License
NOASSERTION
Review the terms yourself

Why it matters

We look beyond stars: what problem it solves, whether it creates real utility, and what makes its approach worth noticing.

Last 90 days

Problem

AI coding agents repeatedly read identical files and console logs across context turns, leading to rapid token consumption and higher API costs.

Practical value

Provides a single Rust binary and MCP server that intercepts tool outputs, substituting repeated file reads with 13-token reference keys.

Innovation / differentiation

Combines command-level structured compression with session-level deduplication that replaces repeated content at the tool hook layer.

Leverage potential

Built on a Rust engine with automated hook configuration for various AI editors and agents, enabling low-friction distribution.

Why now

The rise of CLI agents like Claude Code and OpenCode has intensified context growth from tool outputs, making compression timely.

Community activity

In the last 90 days there were 8 new issues and 3 pull requests; the bounded issue/PR samples include 8 issue authors and 3 PR contributors, with 5 releases.

Maintainer responsiveness

The 8-issue window sample had a 100% close rate, and the 3-pull-request sample had a 100% merge rate. Maintainer-comment observations covered only 100% of that issue sample, so response rate and first-response speed are not reported.

3 contributors in PR sample5 releasesPR merge rate 100% · 3 sampled in window

Key highlights

  • Single Rust binary that intercepts and compresses command outputs
  • Session deduplication reducing repeated file reads to 13-token references
  • Automatic hook setup for Claude Code, Cursor, Windsurf, Gemini, OpenCode, and Codex

Quick start

How it is installed, how hard it is, and where to start.

Where it runs

To be confirmed

Difficulty

To be confirmed

Docker supportedSelf-hostableRuns locally
  1. 01Download and install sqz binary using the installation script.
  2. 02Initialize sqz hooks globally across all AI agent session configs on your machine.
  3. 03Limit hook configuration to specific agents using the --only flag.
  4. 04Run the gain analysis command to review total token savings and reduction percentages.

Best for

  • Teams that want data on their own servers
  • Developers who want to try it on their machine
  • People who prefer Docker deploys

More about it

sqz is an open-source context compression tool written in Rust, designed to minimize LLM token consumption during AI agent workflows. During coding sessions, agents frequently re-read the same source files or generate repetitive command outputs; sqz intercepts these outputs before they reach the language model. Its key mechanism is session-level deduplication: when a file is read multiple times in one session, sqz sends full contents once and converts subsequent reads into 13-token reference markers. It also compresses test logs, JSON structures, and git diffs on a per-command basis. The tool integrates directly into popular agent environments including Claude Code, Cursor, Windsurf, OpenCode, and Codex.

Sources

Each field shows its status and source — expand to review.

15 · Expand
  • capability tags

    Verified

    Source: admin_cms · cms editor · 8/30/2026

  • editor note

    Verified

    {"en":"When running AI coding agents like Claude Code or Cursor, repeated file reads and verbose logs quickly exhaust your context window. sqz intercepts CLI outputs, compresses log streams, and replaces cached file contents with 13-token reference tags. It installs as a single Rust binary and merges into existing agent configurations.","zh":"在运行 Claude Code、Cursor 等 AI 编程助手时,大量日志与重复读取同一文件会快速消耗上下文额度。sqz 通过 Rust 单文件可执行程序拦截终端输出,对于重复读取的文件仅保留 13 个 Token 的引用标识。配置过程直接且支持自动注入配置文件,能有效控制 AI 开发中的 Token 消耗。"}

    Source: admin_cms · cms editor · 8/30/2026

  • how to use

    Verified

    {"steps":[{"en":"Download and install sqz binary using the installation script.","zh":"使用一键安装脚本下载并安装 sqz 可执行文件。"},{"en":"Initialize sqz hooks globally across all AI agent session configs on your machine.","zh":"在全局范围初始化 sqz 钩子,将其应用于本机的 AI Agent 配置文件中。"},{"en":"Limit hook configuration to specific agents using the --only flag.","zh":"如果仅需要向特定 Agent(如 OpenCode 或 Codex)添加钩子,可以使用限定参数。"},{"en":"Run the gain analysis command to review total token savings and reduction percentages.","zh":"运行收益统计命令,查看最近 7 天内节省的 Token 数量与压缩比例。"}],"installAt":"unknown","difficulty":"unknown"}

    Source: admin_cms · cms editor · 8/30/2026

  • intro

    Verified

    {"en":"sqz is an open-source context compression tool written in Rust, designed to minimize LLM token consumption during AI agent workflows. During coding sessions, agents frequently re-read the same source files or generate repetitive command outputs; sqz intercepts these outputs before they reach the language model. Its key mechanism is session-level deduplication: when a file is read multiple times in one session, sqz sends full contents once and converts subsequent reads into 13-token reference markers. It also compresses test logs, JSON structures, and git diffs on a per-command basis. The tool integrates directly into popular agent environments including Claude Code, Cursor, Windsurf, OpenCode, and Codex.","zh":"sqz 是一款基于 Rust 语言开发的 LLM 上下文压缩工具,专门处理 AI Agent 在执行代码任务时产生的多余 Token。在代码编写或调优过程中,AI Agent 往往会多次读取相同的文件或产生大量冗余日志,sqz 能够在命令行输出传入模型之前进行拦截与优化。 其核心功能是会话级的去重机制。当相同文件被多次读取时,sqz 仅在首次发送完整内容,后续读取替换为 13 个 Token 的轻量级引用。此外,sqz 还能针对 JSON 接口返回值、测试日志和 Git diff 进行内容压缩。用户可通过命令行将配置关联至 Claude Code、Cursor、Windsurf 等 Agent 工具。"}

    Source: admin_cms · cms editor · 8/30/2026

  • Latest release

    Verified

    v1.6.1

    Source: GitHub API · latest_release=v1.6.1 · 9/19/2026

  • License

    Verified

    NOASSERTION

    Source: GitHub API · license.spdx_id=NOASSERTION · 9/19/2026

  • needs api key

    Verified

    No

    Source: admin_cms · cms editor · 8/30/2026

  • One-liner

    Verified

    {"en":"A Rust-based CLI and MCP tool that compresses command output and deduplicates context to cut LLM token costs.","zh":"基于 Rust 的 LLM 上下文压缩与去重工具,降低命令行与 AI Agent 的 Token 支出。"}

    Source: admin_cms · cms editor · 8/30/2026

  • Platforms

    Verified

    windows, macos, linux, browser

    Source: admin_cms · cms editor · 8/30/2026

  • Category hint

    Inferred from materials

    ai-apps

    Source: Project README · hint=ai-apps · 8/16/2026

  • product forms

    Verified

    cli, ide_plugin, browser_extension, library_framework

    Source: admin_cms · cms editor · 8/30/2026

  • role tags

    Verified

    Source: admin_cms · cms editor · 8/30/2026

  • supports docker

    Verified

    Yes

    Source: Repository file · dockerfile=true; compose=false · 9/19/2026

  • supports local

    Verified

    Yes

    Source: admin_cms · cms editor · 8/30/2026

  • supports self host

    Verified

    Yes

    Source: admin_cms · cms editor · 8/30/2026

Other verified projects matched by category, capabilities, and intended roles.