ouch
CLI tool for compressing and decompressing files across 14+ formats with automatic format detection
ouch (Obvious Unified Compression Helper) is a command-line compression tool that handles compression, decompression, and listing operations across multiple archive formats. The tool automatically detects file formats based on extensions and can handle format chaining like .tar.gz.xz.zst.gz.lz4.sz. It supports 14 different formats including tar, zip, 7z, gz, zst, xz, lzma, bz2, bz3, lz4, rar, and br, with some formats supporting parallel compression.
The tool provides three main commands: compress (or c), decompress (or d), and list (or l). Users can decompress multiple files at once, redirect output to specific directories, and view archive contents with optional tree formatting. For compression, ouch determines the output format based on the specified output file's extensions, allowing users to create complex nested compressions by chaining format extensions.
ouch includes accessibility features, shell completions, and man pages. When file extensions are absent, it attempts format detection using file signatures and prompts for user confirmation. The tool is designed for developers and system administrators who frequently work with various archive formats and need a unified interface that eliminates the need to remember format-specific command syntax for different compression tools.
Installation
# via Homebrew
brew install ouch
# via Arch Linux
pacman -S ouch
# via Cargo
cargo install ouch
# via Scoop
scoop install ouch
Alternatives & related tools
viu
Rust command-line image viewer for the terminal using the iTerm or Kitty graphics protocols, with a half-block fallback and animated GIF support.
xplr
Terminal-based file explorer with Lua scripting, keyboard controls, and plugin system for command-line integration
xleak
Excel file viewer and interactive TUI for terminal with multi-sheet support and export capabilities
hazelnut
Terminal-based automated file organizer that watches folders and applies rules to move, copy, rename, or delete files based on patterns
notox
CLI tool for renaming files to remove toxic or problematic characters from filenames
add a badge to your README
Maintain ouch? Show that it's featured on trmn. The badge links back to this page.
[](https://www.trmn.sh/tools/ouch?utm_source=badge)<a href="https://www.trmn.sh/tools/ouch?utm_source=badge"><img src="https://www.trmn.sh/badge/ouch.svg" alt="Featured on trmn" height="20"></a>