ast-grep

v 0.30.0 Updated: 1 week, 2 days ago

A CLI tool for code structural search, lint and rewriting.

ast-grep is a AST-based tool to search code by pattern code. Think it as your old-friend grep but it matches 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 wildcard, e.g. $MATCH, to match any single AST node. Think it as REGEX dot ., except it is not textual.

https://ast-grep.github.io/

To install ast-grep, paste this in macOS terminal after installing MacPorts

sudo port install ast-grep

Add to my watchlist

Installations 2
Requested Installations 2