the_silver_searcher

Fast code search tool similar to ack, optimized for large codebases.

brewmacoslinux
Try with needOr install directly
Source

About

Code-search similar to ack

Commands

ag

Examples

search for text inside files$ ag 'search_term' /path/to/directory
find files matching a pattern and ignore node_modules$ ag --ignore node_modules 'function_name'
search for text and show results with line numbers$ ag -n 'TODO' .
search for whole word matches only$ ag -w 'class_name' src/
search for code in specific file types only$ ag --python 'import_statement'