📦
Version0.44.0
Revision1
LicenseApache-2.0
Confinementstrict
Basecore24

AST based tool to search code by pattern code.


ast-grep is an abstract syntax tree based tool to search code by pattern code. Think of it as your old-friend grep, but matching AST nodes instead of text.
You can write patterns as if you are writing ordinary code. It will match all code that has the same syntactical structure.
You can use $ sign + upper case letters as a wildcard, e.g. $MATCH, to match any single AST node. Think of it as regular expression dot ., except it is not textual.

Try the online playground for a taste! https://ast-grep.github.io/playground.html

Update History

0.44.0 (1)
26 Jun 2026, 18:15 UTC

Published26 Jun 2026, 17:19 UTC

Last updated26 Jun 2026, 17:19 UTC

First seen26 Jun 2026, 18:15 UTC