Cgrep is a grep tool suitable for searching in large code repositories. It supports searches with several programming languages that go beyond the simple pattern matching. It enables context-aware filtering and semantic searches through wildcard and combinators.

Fine grained Multi-threading with configurable number of jobs, tasks, and physical cores.

Blazing fast. Running on a single core it is nearly as fast as GNU grep, up to 6x times faster than ack.

Multi-line pattern searches.

Automatic coloring of tokens and strings matching when the output device is a terminal.

Recursive searches. Support of language filters, pruning directories, with local and global configurations (cgreprc).

Classic searches by means of Boyer–Moore, Posix and PCRE regular expressions.

Code Tokenizer. Searches patterns in tokens, as prefix, infix, or suffix sub-strings and by means of the edit distance (Levenshtein).

Context-aware distinction between code, comments and literals for Assembly, Awk, C, CMake, Cabal, Chapel, Clojure, Coffee, Conf, Cpp, Csharp, Css, D, Dart, Elixir, Erlang, Fortran, Fsharp, Go, Haskell, Html, Idris, Java, Javascript, Kotlin, Latex, Lua, Make, Nmap, OCaml, ObjectiveC, PHP, Perl, Python, Ruby, Scala, Shell, Swif, Tcl, Text, VHDL, Verilog, Vim, Yaml.

Semantic searches through wildcards and combinators. _, _1, _2…, $, $1, $2…, ANY, KEY, STR, CHR, NUM, HEX, OCT, OR. E.g. “_1(_1 && $)” search for C++ move constructors, “struct OR class _ { OR : OR <” search for class declarations.