Description:
Code searching, linting, rewriting
|
|
Type: Formula
|
Latest Version: 0.40.3@0
|
Tracked Since: Dec 17, 2025
|
|
Links:
Homepage |
formulae.brew.sh
|
|
Category: Developer tools
|
|
Tags:
code-search
refactoring
static-analysis
rust
developer-tools
tree-sitter
|
|
Install:
brew install ast-grep
|
About:
ast-grep is a fast, polyglot code search, linting, and rewriting tool powered by tree-sitter. It allows developers to find and manipulate code patterns across multiple programming languages using structural search and replace (SSR) rules. This enables powerful automated refactoring and custom linting that goes beyond simple regex.
|
Key Features:
- Structural code search and replace (SSR)
- Polyglot support via tree-sitter
- High performance written in Rust
- Custom rule engine for linting and refactoring
- Interactive playground for testing rules
|
Use Cases:
- Automated code refactoring across large codebases
- Enforcing custom coding standards and anti-patterns
- Migrating APIs or syntax across multiple files
- Finding security vulnerabilities or bug patterns
|
Alternatives:
-
semgrep
– semgrep focuses on security and pattern matching with a YAML-based DSL, while ast-grep emphasizes structural rewriting and a more intuitive rule format.
-
comby
– comby is similar in using structural matching but ast-grep leverages tree-sitter for broader language support and faster performance.
|
|
License: MIT
|
|
Bottles available for: arm64_tahoe, arm64_sequoia, arm64_sonoma, sonoma, arm64_linux, x86_64_linux
|
| Detected |
Version |
Rev |
Change |
Commit |
| Dec 11, 2025 7:51am |
|
0 |
VERSION_BUMP |
38387222 |
| Oct 27, 2025 4:53pm |
|
0 |
VERSION_BUMP |
925206b7 |
| Oct 5, 2025 4:49am |
|
0 |
VERSION_BUMP |
b0732f4a |
| Sep 13, 2025 1:10pm |
|
0 |
VERSION_BUMP |
fde84540 |
| Jan 5, 2025 7:49am |
|
0 |
VERSION_BUMP |
8d6297c5 |
| Dec 30, 2024 10:32am |
|
0 |
VERSION_BUMP |
015a520a |
| Dec 30, 2024 7:50am |
|
0 |
VERSION_BUMP |
e0d4e024 |
| Dec 26, 2024 2:21pm |
|
0 |
VERSION_BUMP |
5585d85f |
| Dec 18, 2024 5:13am |
|
0 |
VERSION_BUMP |
46e65e55 |
| Dec 18, 2024 4:49am |
|
0 |
VERSION_BUMP |
f8bf97e8 |
| Dec 17, 2024 7:54am |
|
0 |
VERSION_BUMP |
5b6926fd |
| Nov 26, 2024 7:49pm |
|
0 |
VERSION_BUMP |
23dfd365 |
| Nov 11, 2024 6:25am |
|
0 |
VERSION_BUMP |
d91375bd |
| Oct 30, 2024 10:03am |
|
0 |
VERSION_BUMP |
69e4248a |
| Oct 30, 2024 6:40am |
|
0 |
VERSION_BUMP |
5203c736 |
| Sep 22, 2024 9:22pm |
|
0 |
VERSION_BUMP |
445e9c2b |
|