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.1
head ⚡️ HEAD

Depends on when building from source:

rust 1.99.1 Safe, concurrent, practical language

Binaries: ast-grep, sg

GitHub Packages downloads:

Last 30 days60,368
Downloads487,920
Analytics install events (30 days)13,700
Downloads / install events (30 days)4.4×

Source: GitHub Packages, fetched 2026-11-07T00:49:12Z. Analytics dates: 2026-10-08 to 2026-11-07. 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,68430,21491,931
Installs (--HEAD)1633124
Installs on Request13,66430,15891,671
Installs on Request (--HEAD)1633124
Build Errors7
Build Errors (--HEAD)1