dngrep.tool is a global tool for syntax-aware search inside C# projects directly from a command line.
Simply install, open any repository or folder containing .sln and/or .csproj, run command dngrep (or dngrep -h to see the available options).
After you have installed DotNet Core, you can install this tool using the following command:
dotnet tool install -g dngrepFor the older versions or preview packages, use:
dotnet tool install -g dngrep --version 0.0.1For installing the package from a local repository:
dotnet pack
dotnet tool install --global --add-source ./dngrep.tool/nupkg dngrepFor uninstalling, use:
dotnet tool uninstall -g dngrepYou can clone this repository and run dngrep inside it.
Let's say you'd like to find all classes that have Extension in their name:
dngrep -t class -c ExtensionOutput:
But what if you don't want to see any tests? Just add the exclude option:
dngrep -t class -r true -c Syntax.*Extension -e TestOutput:
Then assume you'd like to see only classes that also starts with Syntax. Just enable regex and run the following command:
dngrep -t class -r true -c Syntax.*Extension -e TestOutput:
And what if you don't want to see any namespaces and file paths and want a bit cleaner output? Simply add other options:
dngrep -t class --hide-namespaces true -r true -l false -L false -c Syntax.*Extension -e TestOutput:



