Ast Grep
⚡A CLI tool for code structural search, lint and rewriting. Written in Rust
By ast-grep. Free and open source for Windows, macOS, Linux. Latest version 0.51.3, released 2026-11-16.
Is Ast Grep safe?
Trust score 72/100: Good. A solid project with a few gaps. Download from the official release and keep it updated.
- Very widely used: 16,626 GitHub stars
- 53 people have contributed code
- Actively developed: code changed in the last 30 days
- Downloads come straight from the project's own GitHub releases
- Around since 2022
Things to watch:
- No OpenSSF Scorecard report yet, so security practices are unverified
- No checksums or signatures published: you can't verify the download
16,626 GitHub stars · 4.6M downloads · 53 contributors.
Download Ast Grep
- app-aarch64-apple-darwin.zip (macOS, 8.4 MB)
- app-aarch64-pc-windows-msvc.zip (Windows, 15.1 MB)
- app-aarch64-unknown-linux-gnu.zip (Linux, 8.3 MB)
- app-aarch64-unknown-linux-musl.zip (Linux, 8.3 MB)
- app-i686-pc-windows-msvc.zip (Windows, 15.0 MB)
- app-x86_64-apple-darwin.zip (macOS, 8.5 MB)
- app-x86_64-pc-windows-msvc.zip (Windows, 15.8 MB)
- app-x86_64-unknown-linux-gnu.zip (Linux, 8.7 MB)
- app-x86_64-unknown-linux-musl.zip (Linux, 8.7 MB)
Downloads come straight from github.com/ast-grep/ast-grep.
About Ast Grep
ast-grep(sg) is a CLI tool for code structural search, lint, and rewriting.
ast-grep is an abstract syntax tree based tool to search code by pattern code. Think of it as your old-friend grep, but matching AST nodes instead of text. You can write patterns as if you are writing ordinary code. It will match all code that has the same syntactical structure. You can use $ sign + upper case letters as a wildcard, e.g. $MATCH, to match any single AST node. Think of it as regular expression dot ., except it is not textual.
You can install it from npm, pip, cargo, cargo-binstall, homebrew, scoop, mise or MacPorts!
Or you can build ast-grep from source. You need to install rustup, clone the repository and then
Similar apps
- zoxide: A smarter cd command. Supports all major shells. (Good, 70/100)
- Miniserve: 🌟 For when you really just want to serve some files over HTTP right now! (Use caution, 58/100)
- Pueue: :stars: Manage your shell commands. (Good, 60/100)
- Television (tv): A very fast, portable and hackable fuzzy finder. (Good, 69/100)
- erdtree (erd): A modern, cross-platform, multi-threaded, and general purpose filesystem and disk-usage utility that is aware of .gitignore and hidden file (Use caution, 43/100)
- Episode-ReName: 电视剧/番剧自动化重命名工具, 一键批量改名. 可配合QBittorrent下载后自动重命名, 方便Emby自动刮削. 支持Windows, Linux, MacOS, Docker 和 群晖套件环境运行 (Low trust, 41/100)
Compare: Ast Grep vs zoxide · Ast Grep vs Miniserve
Questions
Is Ast Grep safe to download?
Ast Grep has an OpenShelf trust score of 72/100 (Good). A solid project with a few gaps. Download from the official release and keep it updated. Main thing to watch: No OpenSSF Scorecard report yet, so security practices are unverified.
Is Ast Grep free?
Yes. Ast Grep is free and open source under the MIT license. The source code is public at github.com/ast-grep/ast-grep.
Does Ast Grep work on Windows, macOS and Linux?
Ast Grep is available for Windows, macOS, Linux. Ready-made downloads exist for Windows, macOS, Linux.
How do I install Ast Grep?
Download the official file from the project's GitHub releases (for example app-aarch64-apple-darwin.zip) and run it.
What are alternatives to Ast Grep?
Similar open-source apps: zoxide (trust 70/100), Miniserve (trust 58/100), Pueue (trust 60/100), Television (tv) (trust 69/100).