srgn

last updated: Jun 13, 2025

https://github.com/alexpovel/srgn

grep-like tool which understands source code syntax and allows for manipulation in addition to search.

Like grep, regular expressions are a core primitive. Unlike grep, additional capabilities allow for higher precision, with options for manipulation. This allows srgn to operate along dimensions regular expressions and IDE tooling (Rename allFind all references, ...) alone cannot, complementing them.

srgn is organized around actions to take (if any), acting only within precise, optionally language grammar-awarescopes. In terms of existing tools, think of it as a mix of trsedripgrep and tree-sitter, with a design goal of_simplicity_: if you know regex and the basics of the language you are working with, you are good to go.

Like fastmod, but with tree-sitter instead of regular expressions.

Available on homebrew

see also: comby, tree-grepper, tbsp

↑ up