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
[](https://github.com/matanryngler/deployshield/actions/workflows/test.yml)
[](https://github.com/matanryngler/deployshield/releases)
[](https://opensource.org/licenses/MIT)
[](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