ouch stands for Obvious Unified Compression Helper and is a CLI tool to help you compress and decompress files of several formats.
- Easy to use.
- Accessibility mode (A11Y) via
--accessibilityorACCESSIBILITYenv var (see wiki page). - Automatic formats detection.
- Same usage syntax for all formats.
- Uses encoding and decoding streams to improve performance.
- No runtime dependencies (for Linux x86_64).
- Can list archive contents with pretty tree formatting.
- Shell completions (soon!).
Use the decompress subcommand and pass the files.
# Decompress a file
ouch decompress a.zip
# Decompress multiple files
ouch decompress a.zip b.tar.gz c.tar
# Short alternative
ouch d a.zipThe -d/--dir flag can be used to redirect decompression results to another directory.
# Decompress 'summer_vacation.zip' inside of new folder 'pictures'
ouch decompress summer_vacation.zip --dir picturesUse the compress subcommand, pass the files and the output file at the end.
# Compress four files
ouch compress 1 2 3 4 archive.zip
# Short alternative
ouch c file.txt file.zipouch detects the extensions of the output file to decide what formats to use.
| Format | .tar |
.zip |
.bz, .bz2 |
.gz |
.lz4 |
.xz, .lzma |
.sz |
.zst |
|---|---|---|---|---|---|---|---|---|
| Supported | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
And the aliases: tgz, tbz, tbz2, tlz4, txz, tlzma, tsz, tzst.
Formats can be chained:
.tar.gz.tar.gz.gz.gz.gz.tar.gz.gz.gz.gz.zst.xz.bz.lz4
Compiled for x86_64 on Linux, Mac OS and Windows, run with curl or wget.
| Method | Command |
|---|---|
| curl | curl -s https://raw.githubusercontent.com/ouch-org/ouch/master/install.sh | sh |
| wget | wget https://raw.githubusercontent.com/ouch-org/ouch/master/install.sh -O - | sh |
The script will copy the latest binary to /usr/local/bin.
Check the wiki guide.
If you installed ouch using the download script, you will need no dependencies (static MUSL binary).
Otherwise, you'll need these libraries installed on your system:
These are available on all mainstream Linux distributions and on macOS.
Comparison made decompressing linux.tar.gz and measured with
Hyperfine and the values presented are the average (wall clock) elapsed time.
| Tool | ouch |
tar |
bsdtar |
|---|---|---|---|
| Average time | 911 ms | 1102 ms | 829 ms |
Note: ouch focuses heavily on usage ergonomics and nice error messages, but
we plan on doing some optimization in the future.
Versions used:
ouch is made out of voluntary work, contributors are very welcome! No contribution is too small and all contributions are valued.
- Open an issue.
- Package it for your favorite distribution or package manager.
- Open a pull request.
- Share it with a friend!