{"version":"2.1.80","anchor":"bash-tool-output-compressor","canonical_anchor":"bash-tool-output-compressor","heading":"Bash Tool Output Compressor","tier":null,"area":null,"scope":null,"heads_up":null,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.80\/e\/bash-tool-output-compressor","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.80","markdown":"### Bash Tool Output Compressor\n\n**What**\n\nAn intelligent output compression system that recognizes common CLI commands and summarizes their verbose output to save context window space.\n\n**Details**\n\n- Automatically detects command types by parsing the shell command and applies type-specific compression:\n- **git status**: Strips hint lines, collapses clean repos to \"clean\"\n- **git diff\/show**: Summarizes per-file with `+N -N` counts, truncates hunks\n- **git log**: Limits line length and total output\n- **git branch**: Groups local\/remote, deduplicates\n- **git commit\/push\/pull**: Extracts only key status lines\n- **Test runners** (pytest, jest, vitest, cargo test, go test): Extracts pass\/fail summary and failure details\n- **Linters\/type checkers** (tsc, eslint, ruff, mypy, clippy): Keeps only error\/warning lines\n- **Package managers** (npm\/pip\/brew install): Strips download progress noise\n- **grep\/rg**: Restructures into `N matches in M files` with per-file groupings\n- **ls -l**: Strips metadata, shows `dir\/` and `file size` format with extension summary\n- **cat\/file reads**: Truncates long files, keeps definition-like lines\n- **JSON output** (gh api, etc.): Prunes boilerplate URL fields (`followers_url`, `repos_url`, etc.)\n- **Docker\/kubectl logs**: Deduplicates repeated log lines\n- **Tables** (docker ps, kubectl get, psql): Limits row count\n- Handles piped commands (e.g., `cmd | head -5`) and compound commands (`&&`, `;`, `||`)\n- Only compresses when savings exceed a minimum threshold\n\n**Evidence**\n\nCommand classifier and compressor system (search for `\"git-status\"`, `\"git-diff\"`, `\"test\"`, `\"error-only\"` as case labels in the switch statement)"}