Back to the catalog

deployshield

DeployShield is a cross-platform production safety guardrail for Claude Code and Gemini CLI. It intercepts terminal commands before executio

Open source Open in the app JSON README (API)

About

DeployShield is a cross-platform production safety guardrail for Claude Code and Gemini CLI. It intercepts terminal commands before execution and blocks dangerous operations (writes, deletes, etc.) while allowing read-only commands to pass through.

Details

Kind
Plugins
Topic
Developer tools
Publisher
matanryngler
Origin
marketplace
Category
ferramentas
Stars
3
Last push
2026-03-30T12:21:07Z
Repository state
ativo
Language
Python
License
MIT
Added
2026-08-30 01:48:58
Updated
2026-08-30 01:48:58
Origin id
matanryngler/deployshield/deployshield

README

# ๐Ÿ›ก๏ธ DeployShield

[![Tests](https://github.com/matanryngler/deployshield/actions/workflows/test.yml/badge.svg)](https://github.com/matanryngler/deployshield/actions/workflows/test.yml)
[![Release](https://img.shields.io/github/v/release/matanryngler/deployshield)](https://github.com/matanryngler/deployshield/releases)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Python Support](https://img.shields.io/badge/python-3.9%2B-blue.svg)](https://www.python.org/downloads/)

**DeployShield** is a cross-platform production safety guardrail for **Claude Code** and **Gemini CLI**. It intercepts terminal commands before execution and blocks dangerous operations (writes, deletes, etc.) while allowing read-only commands to pass through.

## ๐Ÿš€ Why DeployShield?

Large Language Models (LLMs) are incredibly capable but can accidentally execute destructive commands in production environments. DeployShield provides a **deterministic safety layer** that doesn't rely on probabilistic model instructions.

- **Deterministic Protection**: Uses a curated safe-list of read-only subcommands.
- **Recursive Safety**: Deeply scans subshells, backticks, `sudo`, and `bash -c`.
- **Context-Aware**: Granular controlโ€”block writes in `production` while allowing them in `dev`.
- **Zero-Dependency**: Fast, lightweight, and runs on any system with Python 3.8+.

---

## ๐Ÿ› ๏ธ Supported Providers

| Category | Guarded CLIs |
| :--- | :--- |
| **โ˜๏ธ Cloud** | `aws`, `gcloud`, `az`, `kubectl`, `helm` |
| **๐Ÿ—„๏ธ Databases** | `psql`, `mysql`, `mongosh`, `redis-cli` |
| **๐Ÿ—๏ธ IaC** | `terraform`, `pulumi`, `cdk`, `sam`, `serverless` (`sls`), `ansible-playbook` |
| **๐Ÿ“ฆ Publishing** | `npm`, `yarn`, `pnpm`, `cargo`, `twine`, `gem` |
| **๐Ÿ”ง Other** | `vault`, `gh`, `docker`, `podman` |

---

## ๐Ÿ“ฅ Installation

### **Claude Code**
1. Register the marketplace:
   ```bash
   /plugin marketplace add matanryngler/deployshield
   ```
2. Install the plugin:
   ```bash
   /plugin install deployshield
   ```

### **Gemini CLI**
1. Install directly via GitHub:
   ```bash
   gemini extensions install https://github.com/matanryngler/deployshield
   ```

---

## โš™๏ธ Context-Aware Blocking

By default, DeployShield blocks ALL write operations. Create a `.deployshield.json` file to allow writes in non-production contexts.

### Use Cases

- **๐Ÿ›ก๏ธ Safe Local Development**: Allow destructive commands on your local machine or dev clusters, but keep the guardrails on for anything that touches production.
- **๐Ÿค Team-Wide Guardrails**: Commit a `.deployshield.json` to your project repository to ensure that every developer follows the same safety standards.
- **๐Ÿ—๏ธ CI/CD Migration**: Force changes through PRs by blocking manual applies in production environments.

### Examples

```json
{
  "kubectl": ["prod-cluster", "production", "prod-*"],
  "aws": ["production-profile"],
  "terraform": ["prod-workspace"]
}
```

For detailed configuration options, see the **[Configuration Guide](docs/configuration.md)**.

---

## ๐Ÿ›ก๏ธ Recursive Safety

DeployShield provides deep protection that handles common bypass attempts:
- **Nested Subshells**: `echo $(terraform destroy)` โ†’ **Blocked**
- **Administrative Wrappers**: `sudo kubectl delete ...` โ†’ **Blocked**
- **Execution Wrappers**: `echo pod-id | xargs kubectl delete pod` โ†’ **Blocked**
- **Shell Wrappers**: `bash -c "aws s3 rm ..."` โ†’ **Blocked**
- **Process Substitution**: `cat <(pulumi destroy)` โ†’ **Blocked**

---

## ๐Ÿค Contributing

This project uses **`uv`** for dependency management and **`pre-commit`** for quality control.

To understand how DeployShield works under the hood, check the **[Internals Guide](docs/internals.md)**.

```bash
# Run tests
uv run pytest -v

# Install pre-commit hooks
uv run pre-commit install
```

### License
MIT

More