The Silver Searcher (or Ag) is a tool for searching through directories of text files, primarily designed for searching source code. It has been optimized for speed and uses a multi-threaded design that allows it to leverage multiple CPU cores in parallel. When run from inside a git or mercurial repository, Ag will automatically skip any files listed in ".gitignore" or ".hgignore." Additional files to exclude from searching (e.g., ".min.js" and similar generated files) can also be added to a ".ignore" file. The series of blog posts linked from the main page give technical details on a number of optimizations that the tool incorporates. Windows users can install Ag via Chocolatey or Cygwin. MacOS users can install it using MacPorts, Homebrew, or nixpkgs. Linux and BSD users can locate the software via their system's package manager.
Comments