# rga

> Line-oriented search tool that extends ripgrep to search inside PDFs, archives, documents, and multimedia files

Stars: 9.9k · Language: Rust · Categories: Search

- Repository: https://github.com/phiresky/ripgrep-all
- Page: https://www.trmn.sh/tools/rga

## Install

- Homebrew: `brew install rga`
- Arch Linux: `pacman -S ripgrep-all`
- Chocolatey: `choco install ripgrep-all`
- Cargo: `cargo install --locked ripgrep_all`

## Overview

rga (ripgrep-all) is a line-oriented search tool that wraps ripgrep to enable regex searches across a wide range of file formats. While ripgrep excels at searching plain text files, rga extends this capability to PDFs, Office documents (docx, odt), e-books (epub), archives (zip, tar.gz), databases (sqlite), and multimedia files with embedded text like subtitles.

The tool uses specialized adapters to extract searchable text from different file formats. It includes adapters for pandoc (Office documents, HTML, epub), poppler (PDF text extraction), ffmpeg (video metadata and subtitles), and various archive formats. rga recursively descends into nested archives and applies the appropriate adapter based on file extensions or MIME types when using the --rga-accurate flag.

rga implements caching to store extracted text in a local database, significantly speeding up repeated searches on the same files. The cache uses ZSTD compression and can be configured or disabled entirely. The tool integrates with fzf for interactive file searching and supports all of ripgrep's standard options and patterns. It's particularly useful for developers, researchers, and system administrators who need to search across heterogeneous file collections including documentation, archives, and multimedia content.

### Installation

```bash
# via Homebrew
brew install rga
```

```bash
# via Arch Linux
pacman -S ripgrep-all
```

```bash
# via Chocolatey
choco install ripgrep-all
```

```bash
# via Cargo
cargo install --locked ripgrep_all
```

![rga search output](https://media.trmn.sh/cached/3ebadcf75eb02dc21579430d244e1e2fcbc29c507432b88f4cc180abac180ca6.png)

![rga-fzf integration](https://media.trmn.sh/cached/91a3d32ae836e8350bc361e869810a13e4f14bf0a46c6e615569b3f8745ce44c.gif)

## Alternatives

- [skim](https://www.trmn.sh/tools/skim.md): Fuzzy finder written in Rust with interactive search capabilities and shell integration (Rust, 7.0k stars)
- [television](https://www.trmn.sh/tools/television.md): Fuzzy finder for the terminal that searches files, text, git repositories, and custom data sources in real-time (Rust, 6.4k stars)
- [ast-grep](https://www.trmn.sh/tools/ast-grep.md): CLI for structural code search, lint, and rewriting that matches tree-sitter AST nodes using patterns written as ordinary code. Written in Rust. (Rust, 16.4k stars)
- [sad](https://www.trmn.sh/tools/sad.md): Batch file search-and-replace tool that shows a diff preview before writing changes; optional fzf selection of hunks and delta/diff-so-fancy colorizing. (Rust, 2.0k stars)
- [fd](https://www.trmn.sh/tools/fd.md): Fast filesystem search tool that replaces find with regex patterns and smart defaults (Rust, 44.9k stars)

## Guides

- [Swap ls, cat, find and grep for eza, bat, fd and ripgrep](https://www.trmn.sh/guides/modern-unix-replacements): Install eza, bat, fd and ripgrep, learn the side-by-side commands and flag differences, and alias them without breaking your scripts.
- [Modern Replacements for grep](https://www.trmn.sh/replace/grep): Compare ripgrep, The Silver Searcher (ag) and rga as replacements for grep: defaults, file-type handling, and what each searches.

---

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