# ouch

> CLI tool for compressing and decompressing files across 14+ formats with automatic format detection

Stars: 3.8k · Language: Rust · License: MIT · Categories: File Management

- Repository: https://github.com/ouch-org/ouch
- Website: https://crates.io/crates/ouch
- Page: https://www.trmn.sh/tools/ouch

## Install

- Homebrew: `brew install ouch`
- Arch Linux: `pacman -S ouch`
- Cargo: `cargo install ouch`
- Scoop: `scoop install ouch`

## Overview

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

```bash
# via Homebrew
brew install ouch
```

```bash
# via Arch Linux
pacman -S ouch
```

```bash
# via Cargo
cargo install ouch
```

```bash
# via Scoop
scoop install ouch
```

## Alternatives

- [viu](https://www.trmn.sh/tools/viu.md): Rust command-line image viewer for the terminal using the iTerm or Kitty graphics protocols, with a half-block fallback and animated GIF support. (Rust, 3.3k stars)
- [xplr](https://www.trmn.sh/tools/xplr.md): Terminal-based file explorer with Lua scripting, keyboard controls, and plugin system for command-line integration (Rust, 4.8k stars)
- [xleak](https://www.trmn.sh/tools/xleak.md): Excel file viewer and interactive TUI for terminal with multi-sheet support and export capabilities (Rust, 1.5k stars)
- [hazelnut](https://www.trmn.sh/tools/hazelnut.md): Terminal-based automated file organizer that watches folders and applies rules to move, copy, rename, or delete files based on patterns (Rust, 327 stars)
- [notox](https://www.trmn.sh/tools/notox.md): CLI tool for renaming files to remove toxic or problematic characters from filenames (Rust, 16 stars)

---

Canonical: https://www.trmn.sh/tools/ouch
