UsageTrim
A local CLI and MCP server for compacting verbose test and build output.
Filters use format-specific rules to retain diagnostic context; cached output is
recoverable after recognized secrets are redacted, while the entry remains stored.
Integrations are available for Claude Code, Codex, Cursor,
and Claude Desktop; the macOS companion is optional.
Website ·
Install ·
Demo ·
Features ·
Connect ·
Pet ·
Guide
Install
Requires Python 3.11+ and uv (pipx works too).
uv tool install git+https://github.com/00200200/usagetrim
usagetrim demo
Try without installing: uvx --from git+https://github.com/00200200/usagetrim usagetrim demo.
Add it inside your app
| App | Install |
|---|
| Claude Code | /plugin marketplace add 00200200/usagetrim, then /plugin install usagetrim@usagetrim — MCP tools, Bash and MCP output hooks, Haiku agents |
| Claude Desktop | Customize → Plugins → add the marketplace 00200200/usagetrim, or double-click usagetrim-<version>.mcpb from Releases (Settings → Extensions) |
| Codex app & CLI | codex plugin marketplace add 00200200/usagetrim, then codex plugin add usagetrim@usagetrim (or pick it under Plugins in the app) |
| Cursor, Windsurf | usagetrim install --cursor or usagetrim install --windsurf |
Plugins run the pinned release wheel through uvx, so they need uv on PATH. The .mcpb extension installs its own copy through Claude Desktop.
verbose tool text → keep the failure → recover the rest by reference
See it cut
usagetrim demo runs authored fixtures with no model calls. It checks failure retention and exact recovery for those fixtures, which contain no recognized secrets. These checks do not guarantee preservation of every diagnostic in arbitrary output.
| Fixture | Tokens |
|---|
docker build BuildKit | 18,360 → 107 (99.4%) |
go test + goroutine dump | 3,281 → 64 (98.0%) |
terraform plan refresh/read | 6,409 → 276 (95.7%) |
cargo test + backtrace | 3,795 → 197 (94.8%) |
| pytest noisy (xdist + I/O) | 5,111 → 349 (93.2%) |
kubectl describe pod | 8,127 → 595 (92.7%) |
| pytest recovery demo | 1,562 → 174 (88.9%) |
vitest / eslint / tsc | up to 98.8% / 79% |
Local o200k_base estimate — not billing, quality, or subscription-limit claims. Full matrix: usagetrim demo --json.
usagetrim run -- pytest -v
usagetrim run -- docker build -t app .
usagetrim run -- docker compose logs
usagetrim run -- cargo test
usagetrim run -- go test ./...
usagetrim run -- kubectl describe pod api-7d8f9c-xk2m9
usagetrim run -- terraform plan
usagetrim run -- npx eslint . --format codeframe
What you get