ast-grep

Install command:
brew install ast-grep

Code searching, linting, rewriting

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

License: MIT

Development: Pull requests

Formula JSON API: /api/formula/ast-grep.json

Formula code: ast-grep.rb on GitHub

Bottle (binary package) installation support provided for:

macOS on
Apple Silicon
golden gate ✅
tahoe ✅
sequoia ✅
Linux ARM64 ✅
x86_64 ✅

Current versions:

stable ✅ 0.51.3
head ⚡️ HEAD

Depends on when building from source:

rust 1.100.0 Safe, concurrent, practical language

Binaries: ast-grep, sg

GitHub Packages downloads:

Last 30 days65,060
Downloads533,627
Analytics install events (30 days)13,026
Downloads / install events (30 days)5.0×

Source: GitHub Packages, fetched 2026-11-27T00:54:24Z. Analytics dates: 2026-10-28 to 2026-11-27. Totals exclude downloads from Bintray before the migration to GitHub Packages. Downloads and install attempts measure different things; the difference does not count analytics opt-outs. Definitions and limitations.

Analytics:

30 days90 days365 days
Installs13,00631,18697,847
Installs (--HEAD)2038132
Installs on Request12,98631,13397,573
Installs on Request (--HEAD)2038132
Build Errors2