# The Silver Searcher

> A code-searching tool similar to ack, but faster

Source: https://talira.ai/catalog/the-silver-searcher-rntejqw7
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Command-line tool
- Categories: [developer tools / cli / search](https://talira.ai/categories/developer-tools/cli/search), [developer tools / terminal](https://talira.ai/categories/developer-tools/terminal)
- Platforms: macos, linux, cli[^4]
- Licence: Apache-2.0[^3]
- Pricing: Free and open source[^3]
- Free tier: yes[^3]
- Self-hostable: yes[^4]
- Creator: Geoff Greer

The Silver Searcher (ag) is a command-line tool for searching code, started as a clone of ack with a focus on speed. It skips files matched by .gitignore, .hgignore and its own .ignore file, searches files in parallel with pthreads, memory-maps files, and uses Boyer-Moore for literal strings and PCRE's JIT for regular expressions. Its author, Geoff Greer, describes it as quite stable, with most changes being new features, minor fixes or performance work; the latest release on its site is 2.2.0.

## Links

- Website: https://geoff.greer.fm/ag/
- GitHub: https://github.com/ggreer/the_silver_searcher

## Ways to install

### Package managers

- [Homebrew](https://talira.ai/catalog/homebrew-djy17yn9.md): <https://formulae.brew.sh/formula/the_silver_searcher>[^1]
- [APT](https://talira.ai/catalog/apt-d7essv0z.md): <https://packages.debian.org/stable/silversearcher-ag>[^2]

## Problems it solves

- ack is too slow when I search my whole code directory
- search a repo for a string but skip everything in .gitignore
- grep keeps matching minified JavaScript and vendored files I don't care about
- find every place a function is called across a big codebase from the terminal
- search code with a regular expression faster than grep -r
- exclude extra paths from code search with an ignore file

## Features

- ignores patterns from .gitignore, .hgignore and .ignore
- parallel search with pthreads
- mmap()ed file reading
- Boyer-Moore literal string search
- PCRE JIT regular expressions
- editor integrations such as ack.vim and ag.el

## Capabilities

- Has a command line tool: plan not known

## Trust

Overall: 0.41 out of 1.
Signals: maintenance 0.06, adoption 0.89, momentum 0.66, community 0.96, backing 0.20, extensibility 0.20.

- 27.1k GitHub stars
- 245 contributors
- created by Geoff Greer

Warnings:

- last commit 2.4 years ago

## Alternatives

- [ripgrep](https://talira.ai/catalog/ripgrep-q15ax1wq.md): Searches directories recursively for a regex pattern, skipping gitignored files
- [ast-grep](https://talira.ai/catalog/ast-grep-5ehppe4z.md): A CLI tool for code structural search, lint and rewriting
- [fd](https://talira.ai/catalog/fd-k5xwn7n9.md): A simple, fast and user-friendly alternative to 'find'

## Sources

[^1]: https://formulae.brew.sh/api/formula.json (checked 21 Nov 2026)
[^2]: https://deb.debian.org/debian/dists/stable/main/source/Sources.xz (checked 21 Nov 2026)
[^3]: https://github.com/ggreer/the_silver_searcher/blob/master/LICENSE (checked 19 Nov 2026)
[^4]: https://github.com/ggreer/the_silver_searcher (checked 19 Nov 2026)
