---
title: Install SG Ast-Grep on Linux | Snap Store
description: Get the latest version of SG Ast-Grep for Linux - AST based tool to search
  code by pattern code.
url: https://snapcraft.io/ast-grep
---

# SG Ast-Grep (ast-grep)

[Mehdi Bendriss (medib)](https://snapcraft.io/publisher/medib "View all snaps from Mehdi Bendriss (medib)")

* [Mehdi Bendriss (medib)](https://snapcraft.io/publisher/medib "View all snaps from Mehdi Bendriss (medib)")

latest/edge 0.44.0

Install latest/edge of SG Ast-Grep

---

**Install using the command line**

```
sudo snap install ast-grep --edge
```

Don't have snapd? [Get set up for snaps](https://snapcraft.io/docs/installing-snapd).

SG Ast-Grep is only available on the unstable edge channel. It could break and change often.

---

### Package name

* ast-grep

---

### License

* Apache-2.0

---

### Last updated

* 26 June 2026 - latest/edge

---

##### Report a Snap Store violation

* [Report this Snap](https://snapcraft.io/ast-grep#report-snap-modal)

---

* [Description](https://snapcraft.io/ast-grep#tab-description)
* [Security](https://snapcraft.io/ast-grep#tab-security)

#### 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>

---

## 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](https://snapcraft.io/docs/installing-snapd).

[### Arch Linux](https://snapcraft.io/install/ast-grep/arch)

[### CentOS](https://snapcraft.io/install/ast-grep/centos)

[### Debian](https://snapcraft.io/install/ast-grep/debian)

[### elementary OS](https://snapcraft.io/install/ast-grep/elementary)

[### Fedora](https://snapcraft.io/install/ast-grep/fedora)

[### KDE Neon](https://snapcraft.io/install/ast-grep/kde-neon)

[### Kubuntu](https://snapcraft.io/install/ast-grep/kubuntu)

[### Manjaro](https://snapcraft.io/install/ast-grep/manjaro)

[### Pop!\_OS](https://snapcraft.io/install/ast-grep/pop)

[### openSUSE](https://snapcraft.io/install/ast-grep/opensuse)

[### Red Hat Enterprise Linux](https://snapcraft.io/install/ast-grep/rhel)

[### Ubuntu](https://snapcraft.io/install/ast-grep/ubuntu)

[### Raspberry Pi](https://snapcraft.io/install/ast-grep/raspbian)
