SG Ast-Grep (ast-grep)
Install latest/edge of SG Ast-Grep
Ubuntu 16.04 or later?
Make sure snap support is enabled in your Desktop store.
Install using the command line
sudo snap install ast-grep --edge
Don't have snapd? Get set up for snaps.
Details for SG Ast-Grep
Package name
- ast-grep
License
- Apache-2.0
Last updated
- 26 June 2026 - latest/edge
Report a Snap Store violation
Report SG Ast-Grep for a Snap Store violation
Snap Store Violation Report submitted successfully
Thank you for your report. Information you provided will help us investigate further.
Error submitting report
There was an error while sending your report. Please try again later.
Share this snap
Generate an embeddable card to be shared on external websites.
AST based tool to search code by pattern code.
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.
Try the online playground for a taste! https://ast-grep.github.io/playground.html
| Revision | Channel | Version | Build | Commit | Download SBOM |
|---|
The build and commit information is derived from build infrastructure records.
Install SG Ast-Grep on your Linux distribution
Choose your Linux distribution to get detailed installation instructions. If yours is not shown, get more details on the installing snapd documentation.