squeez CLI

squeez compresses bash output by up to 95 percent in the hooks of seven AI CLIs and preserves exact identifiers

  • 231 ★ on the repository
  • Last commit
  • Apache-2.0
CLI

Extended access

Why this level

  • Hooks wrap bash commands and change what the agent sees, and `squeez init` appends blocks to memory files such as `CLAUDE.md`.
All reasons and checks

claudioemmanuel/squeez

Install

Manual install

curl -fsSL https://raw.githubusercontent.com/claudioemmanuel/squeez/main/install.sh | sh

Then `squeez setup`. npm variant: `npm install -g squeez`, Cargo variant: `cargo install squeez`.

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • Hooks wrap bash commands and change what the agent sees, and `squeez init` appends blocks to memory files such as `CLAUDE.md`.

This is third-party code. Review the repository files before installing.

What it does

squeez is an end-to-end token optimizer for seven AI CLIs: Claude Code, GitHub Copilot CLI, OpenCode, Gemini CLI, Codex CLI, Pi and Hermes. It plugs into hooks, compresses bash output, collapses redundant repeat calls and preserves exact identifiers in summaries. It refuses compressions that would be a net loss. There is a signature mode for code reads and cross-call deduplication. A terse persona for prompts is added to the work and makes the agent answer concisely. An MCP server and a self-teaching protocol are included. There are no runtime dependencies. The `squeez setup` command finds installed CLIs and registers hooks in each, while `squeez setup --host=<slug>` limits registration to one host. `squeez uninstall` removes them and keeps session data and `config.ini`. Settings are read and written with `squeez config get`, `set`, `list` and `reset`. At session start `squeez init` writes the previous session summary and the persona into the host memory file such as `~/.claude/CLAUDE.md`.

Who it is for. People who work with Claude Code, Copilot CLI, Gemini CLI or Codex CLI in large repositories and want to spend fewer tokens on noisy command output.

Good fit when

  • A build or tests print thousands of lines and the agent spends context on the log.
  • The agent keeps reading the same files or repeating identical commands.
  • You want one solution on several installed CLIs at once.
  • You need a short memory of the previous session in the agent memory file.

Not a fit when

  • You need full command output with no trimming: compression changes what the agent sees.
  • You work in PowerShell or CMD on Windows: install requires Git Bash.
  • You prefer not to change host memory files such as `CLAUDE.md`: `squeez init` appends a block to them.

Example request

Install squeez, run `squeez setup` and show which CLIs it found and where it registered hooks.

Limitations

squeez changes host behavior through hooks: it wraps bash commands and appends a persona and summary block to host memory files. Integration depth differs by host: for Codex CLI and Gemini CLI part of read budgeting goes the soft way through `AGENTS.md` and `GEMINI.md`, Hermes has no budget surface and OpenCode MCP calls skip hooks. After `squeez setup` restart Claude Code, Copilot CLI or Pi, otherwise hooks are not picked up. On Windows only Git Bash is supported. The up to 95 percent compression figure is the best case and in practice depends on the command.

How to disable. Run `squeez uninstall`: hooks are removed while session data and `config.ini` stay. Delete the binary by hand or with `npm uninstall -g squeez`.

FAQ

How do I install squeez?

With `curl -fsSL https://raw.githubusercontent.com/claudioemmanuel/squeez/main/install.sh | sh`, or `npm install -g squeez`, or `cargo install squeez`. Then `squeez setup`.

Which CLIs does it work with?

Claude Code, GitHub Copilot CLI, OpenCode, Gemini CLI, Codex CLI, Pi and Hermes. `squeez setup` finds installed ones itself.

How do I register only one host?

With `squeez setup --host=<slug>`, where the slug names the needed host.

How do I change settings?

With `squeez config get`, `set`, `list` and `reset`: they validate the schema and keep comments in `config.ini`.

How do I remove the hooks?

With `squeez uninstall`. Session data and `config.ini` stay, so reinstalling loses nothing.

Discussion

No questions or reviews yet.

CLI tools

Brig runs Claude Code and other coding agents inside an isolated microVM on your machine with access to one project only.

CLIExtended access266Repository stars

A drop-in bash.exe for coding agents on Windows: a Bash interpreter with no Git, MSYS2 or WSL, an MCP server and a Windows adapter

CLIBroad access271Repository stars

tokenjuice runs noisy commands and returns short, deterministic output to the agent by JSON rules for listings, tests, build logs

CLIExtended access543Repository stars

A CLI that runs Claude Code and Codex in isolated Docker containers with a firewall, worktrees and a no-Dockerfile image.

CLIExtended access59Repository stars
Needs a VPN

Local proxy between Claude Code and Anthropic that fixes prompt-cache misses, stabilizes the request prefix and shows quota use in the status line

CLIBroad access451Repository stars

Claude Code Tools

claude-code-tools

A set of practical tools for Claude Code, Codex CLI and similar agents: utilities, skills, agents, hooks and plugins for terminal work

CLIExtended access2KRepository stars

README in short

The README lists updates, three install methods, a host table with memory files and limitations, configuration, the MCP server and a command list. Apache-2.0 license, packages on npm and crates.io.

README badge

Report a problem