[email protected]:~$ man ast-grep

← cd ..
ast-grep logo

ast-grep

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

★ 16.6K▲ 41MIT0.51.3RustDevelopment Tools

INSTALLATION

$ apk add ast-grep
ast-grep demo

DESCRIPTION

ast-grep is a blazing-fast AST-based tool for code structural search, linting, and rewriting that goes beyond traditional regex by understanding programming language syntax.

It uses a intuitive pattern-matching syntax that looks like real code, allowing developers to query and refactor complex codebases across multiple languages effortlessly.

Featuring high performance and seamless CI integration, it is ideal for enforcing custom architectural rules, automating large-scale migrations, and maintaining code quality.

DETAILS

Repository
ast-grep/ast-grep (2026-11-19)
Website
ast-grep.github.io/
Author
ast-grep
License
MIT
Category
Development Tools
Language
Rust
Platforms
Linux, macOS, Windows
Version
0.51.3 (2026-11-16)
Repo Age
4 years old

STAR HISTORY

Star history chart for ast-grep/ast-grep

TAGS

SEE ALSO

BADGE

Maintain ast-grep? Add this badge to your README: listings that link back are marked verified and ranked first in the directory. It's checked once a day.

ast-grep on The Terminal Index

[+] show code[−] hide code
Markdown
[![ast-grep on The Terminal Index](https://cli.masoko.net/badge/ast-grep.svg)](https://cli.masoko.net/tools/ast-grep/)
HTML
<a href="https://cli.masoko.net/tools/ast-grep/"><img src="https://cli.masoko.net/badge/ast-grep.svg" alt="ast-grep on The Terminal Index"></a>

RELATED TOOLS