CodeBrowser / github / ast-grep/ast-grep
ast-grep/ast-grep
# ⚡A CLI tool for code structural search, lint and rewriting. Written in Rust
$ git clone https://github.com/ast-grep/ast-grep.git
stars
15,139
forks
416
language
Rust
license
MIT License
What is ast-grep/ast-grep?
ast-grep is a command-line tool that lets you search, lint, and refactor code based on its syntax structure rather than text patterns. It uses tree-sitter to understand code across multiple languages and works with JavaScript, TypeScript, Python, and more. Developers use it to find and fix code patterns at scale, enforce coding standards, and automate large refactoring tasks more reliably than regex-based tools.
Topics
#ast #babel #codemod #codereview #command-line #command-line-tool #grep #linter #refactoring #rust #search #static-analysis #structural-search #tree-sitter #typescript
Activity
53 open issues · last updated Jul 21, 2026