ouch
A painless command-line tool for compressing and decompressing files, supporting a wide range of archive formats with a single consistent interface.
ouch stands for Obvious Unified Compression Helper. It is a
single CLI tool that handles compression and decompression for virtually every
common archive format — tar, zip, gz, bz2, xz, zst, 7z, rar, and more — using a
clean, consistent interface so you never have to remember the flags for each
individual format again.
Features
- Format auto-detection — infers the format from the file extension; no need to specify it explicitly
- Wide format support — tar, tar.gz, tar.bz2, tar.xz, tar.zst, zip, gz, bz2, xz, zst, 7z, rar, lz4, lzma, and more
- Consistent interface — the same three subcommands (
compress,decompress,list) work for every format - Smart output naming — automatically names output files based on the input when not specified
- Multiple inputs — compress several files or directories into one archive in a single command
- Progress display — shows progress bars for large archives
- No flags to memorise — the format is determined by the filename, not a
-zvs-jvs-Jdance
Installation
cargo install ouch
Or via your system package manager:
# Debian / Ubuntu (Debian 13+)
apt install ouch
# Fedora
dnf install ouch
# Arch Linux
pacman -S ouch
# macOS
brew install ouch
# Nix
nix-env -iA nixpkgs.ouchUsage
# Compress files into a tar.gz archive
ouch compress src/ README.md project.tar.gz
# Compress into a zip
ouch compress src/ README.md project.zip
# Decompress any archive (format detected automatically)
ouch decompress archive.tar.gz
ouch decompress archive.zip
ouch decompress archive.tar.zst
# Decompress into a specific directory
ouch decompress archive.tar.gz --dir /tmp/output
# List the contents of an archive without extracting
ouch list archive.tar.gz
ouch list archive.zip
# Compress an entire directory as a .zst (fast, modern format)
ouch compress my-project/ my-project.tar.zstWhy not just use tar / gzip / zip?
Each archiving tool has its own flags, its own quirks, and its own mental model.
Remembering that tar -xzf decompresses .tar.gz but you need tar -xJf for
.tar.xz, unzip for .zip, and 7z x for .7z is tedious and error-prone.
ouch replaces all of that with three verbs that work identically regardless of
format.