The Snap Store will undergo scheduled database maintenance on July 5, 2026 22:00 to July 6, 02:00 UTC. During this time, you will not be able to install or update snaps. No user action is required and services will automatically resume once maintenance is complete.
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.
Enable snaps on Raspberry Pi and install SG Ast-Grep
Snaps are applications packaged with all their dependencies to run on all popular Linux distributions from a single build. They update automatically and roll back gracefully.
Snaps are discoverable and installable from the Snap Store, an app store with an audience of millions.
Enable snapd
On a Raspberry Pi running the latest version of Raspbian snap can be installed directly from the command line:
sudo apt update
sudo apt install snapd
You will also need to reboot your device:
sudo reboot
After this, install the snapd snap in order to get the latest snapd:
sudo snap install snapd
Install SG Ast-Grep
To install SG Ast-Grep, simply use the following command: