CLI tool for compressing and decompressing various archive formats with automatic format detection
ouch is a CLI compression utility that handles multiple archive formats through three main subcommands: compress, decompress, and list. The tool automatically detects file formats based on extensions and supports chaining multiple compression formats (e.g., .tar.gz.xz.zst). It can compress files into archives, extract files from archives, and list archive contents with optional tree formatting.
The tool supports 14 different compression formats including tar, zip, 7z, gz, zst, xz, lzma, lz4, bzip2, bzip3, and rar (decompression only due to licensing restrictions). Several formats like gz, sz, zst, and lz4 support parallel compression for improved performance. Format aliases are supported for common combinations like tgz for tar.gz.
Built in Rust, ouch includes shell completions, man pages, and accessibility features. The tool provides static binary builds with no runtime dependencies and focuses on clear error messages and ease of use. Users can redirect decompression output to specific directories and compress multiple files into a single archive with format detection based on the output filename extension.
# via Homebrew
brew install ouch
# via Arch Linux
pacman -S ouch
# via Cargo
cargo install ouch