TL;DR — Quick Summary

ouch compresses and decompresses files by just looking at extensions. No flags to remember — ouch decompress file.tar.gz just works. Supports tar, zip, gz, bz2, xz, zstd, lz4, 7z.

ouch makes compression painless. Decompress anything, compress to anything — the format is the filename.

Installation

# macOS
brew install ouch

# Arch Linux
sudo pacman -S ouch

# Cargo
cargo install ouch

Usage

# Decompress (format auto-detected)
ouch decompress archive.tar.gz
ouch decompress files.zip
ouch decompress data.tar.zst
ouch decompress backup.7z
ouch d archive.tar.xz           # Short alias

# Compress (format from output name)
ouch compress file1.txt file2.txt output.zip
ouch compress src/ project.tar.gz
ouch compress logs/ logs.tar.zst  # Zstandard
ouch c data/ backup.tar.xz       # Short alias

# List contents
ouch list archive.tar.gz
ouch l files.zip

# Decompress to specific directory
ouch decompress archive.zip --dir /tmp/extracted

# Multiple files
ouch decompress *.tar.gz

Supported Formats

FormatExtensions
tar.tar
gzip.gz, .tar.gz, .tgz
bzip2.bz2, .tar.bz2, .tbz2
xz.xz, .tar.xz, .txz
zstd.zst, .tar.zst
lz4.lz4, .tar.lz4
zip.zip
7z.7z

Summary

  • ouch infers compression format from file extensions — no flags to remember
  • Decompress, compress, and list archives with one simple command
  • Supports tar, zip, gz, bz2, xz, zstd, lz4, 7z and all combinations
  • Short aliases: ouch d, ouch c, ouch l
  • Written in Rust — fast, safe, single binary