CLI Output Compressor for AI Agents

Stop Feeding Your AI Agent Terminal Noise

chop intercepts verbose CLI output before it reaches your AI's context window - compressing up to 90% of tokens without losing signal.

$ curl -fsSL .../install.sh | sh
View on GitHub
terminal - bash
typing...
tokens: -
0%
Token reduction
on typical commands
0+
Built-in command filters
out of the box
200K
Token threshold avoided
per API call
The Problem

Your context window is drowning in noise

Every verbose tool output your AI agent sees - every stack trace, every test line, every docker table - gets tokenized and sent on every single API call. The waste compounds silently.

  • Up to 90% of context filled with redundant terminal lines
  • Crossing 200K tokens doubles your input token cost
  • Bloated history degrades the agent's reasoning quality
Token waste per command - before vs after chop
git (status, log, diff…) 90% saved - 783 real calls tracked
npx 89% saved - 68 real calls tracked
npm (install, test, list…) 71% saved - 58 real calls tracked
docker (ps, build, logs…) 72% saved - 161 real calls tracked
gh (pr, issue, run…) 62% saved - 133 real calls tracked
Without chop With chop
How It Works

One binary. Zero config required.

chop sits between your terminal and your AI agent as a transparent hook. Install once, compress forever.

01
Hook into your agent

Run chop init --global to register a PreToolUse hook. Claude Code, Gemini CLI, Codex - all supported. One command per agent.

02
Intercept every command

Every time your agent runs a shell command, chop intercepts the output before it hits the context window. Pattern-matched against 50+ known command signatures.

03
Deliver compressed signal

A dense, semantically faithful summary replaces the verbose output. Unknown commands auto-detected via JSON, CSV, log-pattern, or table heuristics.

Features

Everything a context-efficient agent needs

50+ built-in command filters

git, docker, kubectl, npm, npx, nx, gh, terraform, aws, az, gcloud, cargo, pytest, rspec, tsc, biome, eslint, and more. Run chop list to see all.

Zero config
Side-by-side diff mode

Run chop diff <cmd> to see raw output vs. compressed output side-by-side. Great for auditing and writing custom filters.

Debug
Auto-detection fallback

Unknown commands handled via heuristic detection for JSON, CSV, tabular data, and structured logs. Compresses what it doesn't know too.

Smart fallback
SQLite token tracking

Every compression is logged locally. Run chop gain to see your savings over time with session history.

Persistent
Per-project .chop.yml

Customize rules, disable commands, or add custom filters per repository. Checked in with your project for team-wide consistency.

Configurable
Multi-agent support

Works with Claude Code, Gemini CLI, Codex CLI, and Antigravity IDE via dedicated init commands. One binary, all agents.

Universal
Installation

Up in 30 seconds

Download the binary, run one init command for your agent. That's it - chop starts working silently from the next command forward.

Single binary, no runtime dependencies
Automatic shell config update
Works with existing projects immediately
MIT licensed, open source
# Download and install
curl -fsSL https://raw.githubusercontent.com/AgusRdz/chop/main/install.sh | sh

# Init for Claude Code
chop init --global
# PowerShell - download and install
irm https://raw.githubusercontent.com/AgusRdz/chop/main/install.ps1 | iex

# Init for Claude Code
chop init --global
# Add tap and install
brew install AgusRdz/tap/chop

# Init for Claude Code
chop init --global
# Install via Go toolchain
go install github.com/AgusRdz/chop@latest

# Init for Claude Code
chop init --global

Binary lands in ~/.local/bin (macOS/Linux) or %LOCALAPPDATA%\Programs\chop (Windows)

Agent Setup

One command per agent

chop installs a transparent hook that intercepts tool output before your agent's context is updated.

Claude Code
PreToolUse hook - hooks into Bash tool calls
$ chop init --global copy
Gemini CLI
Shell wrapper integration
$ chop init --gemini copy
Codex CLI
OpenAI Codex CLI integration
$ chop init --codex copy
Antigravity IDE
IDE-level hook integration
$ chop init --antigravity copy
Token Gain

See exactly what you're saving

chop tracks every compression in a local SQLite database. Run chop gain to inspect cumulative savings across sessions.

chop gain # today / week / month / total
chop gain --history # recent commands with savings
chop gain --summary # per-command savings breakdown
chop gain --since 7d # filter to a time window
chop gain --unchopped # find commands with no filter yet
chop gain --export json # export history as JSON or CSV
chop gain + chop gain --summary
$ chop gain
chop - token savings report

today: 34 commands 5,449 tokens saved (84.7% compression)
week: 555 commands 93,776 tokens saved (77.3% compression)
total: 1,536 commands 357,900 tokens saved

$ chop gain --summary
per-command savings:
COMMAND CALLS SAVED AVG
git 783 233,538 90%
npx 68 44,396 89%
npm 58 18,142 71%
docker 161 12,247 72%
gh 133 14,741 62%

$ chop gain --history --limit 3
recent commands:
2026-03-17 12:02:47 docker compose build 97.3% (5647 -> 150 tokens)
2026-03-17 12:02:48 git diff --stat 85.0% (120 -> 18 tokens)
! 2026-03-17 10:48:28 git log -5 --oneline 0.0% (64 -> 64 tokens)
! = 0% savings (filter may need improvement)