I use semgrep for semantic search (and replace, sometimes).<p>Their docs and website try very hard to suggest you should use it for some kind of CI process, but so far I haven't found any need to do so. I can maybe see it being useful in a pre-commit hook.<p>It's VERY handy for semantic searches though - in situations where ripgrep would be useless due to multi-line matches.<p>I set up this alias to make it a bit less verbose for Python patterns:<p><pre><code> pygrep () {
pat="$1"
shift
filez="$*"
bash -xc "semgrep --lang=python --pattern '$pat' $filez"
}
</code></pre>
Usage is something like:<p><pre><code> pygrep 'myfunc(..., needle_arg=..., ...)'</code></pre>