⚡️
Performant
Blazing fast search and replace across thousands of source code files, powered by parallel Rust.
ast-grep(sg) is a fast and polyglot tool for code structural search, lint, rewriting at large scale.

ast-grep is a versatile and flexible tool for linting code with AST patterns. You can easily add new customized rules with intuitive syntax and enjoy pretty error reporting out of box.
ast-grep scan

ast-grep also provides node-js binding to access syntax trees programmatically. You can use jQuery like utility methods to traverse syntax tree nodes. Node API also has opt-in type safety.
npm install @ast-grep/napi

⚡️
Blazing fast search and replace across thousands of source code files, powered by parallel Rust.
📚
Supports many programming languages out of box! You can also register your own tree-sitter parsers by dynamic loading.
👟
Supports multiple forms of usages from one-line command to fully programmatic interface, scaling to different scenarios.
🛠️
Not a toy but a batteries-included tool with interactive codemod, language server and testing tool.