Sandboxed system administration for LLM agents
Project description
Shannot
Human-in-the-loop execution for LLM agents.
Shannot lets you see what AI agents want to do before they do it. Scripts run in a supervised environment that captures all commands and file writes. You review in a TUI, approve what's safe, and only then do changes apply.
No more --dangerously-skip-permissions.
How It Works
flowchart LR
A[🤖 Agent writes script] --> B[shannot run]
B --> C[📋 Intent captured]
C --> D[shannot approve]
D --> E[👤 Human reviews]
E -->|✓| F[✅ Executes]
E -->|✗| G[🚫 Blocked]
Quick Start
# Install
pip install shannot
# Run a script (captures what it wants to do)
shannot run fix-nginx.py
# Review and approve
shannot approve
That's it. Two commands.
Features
Supervised Execution
- All system calls intercepted via PyPy sandbox
- Commands captured during dry-run, executed only after approval
- File writes captured with full content, committed only after approval
- Diff preview for every file modification
Remote Execution
- Run scripts on remote Linux servers via SSH
- Zero dependencies on target — binary deployment
- Same approval workflow, regardless of where code runs
shannot run fix-nginx.py --target admin@prod.example.com
shannot approve
Zero Dependencies
- Pure Python stdlib — nothing to install beyond Python 3.11+
- PyPy sandbox runtime auto-downloads on first use
- Works out of the box on any Linux system
Danger Classification
- Commands color-coded by risk in TUI
- Auto-approve safe operations (ls, cat, df)
- Always-deny destructive patterns (rm -rf /)
- Everything else requires human review
Installation
# Recommended
pip install shannot
# Or with uv
uv tool install shannot
# Or with pipx
pipx install shannot
Requirements:
- Python 3.11+ (host system)
- Linux (sandbox execution) or macOS (remote execution only)
Note: Scripts run in Python 3.6 (the PyPy sandbox version).
CLI Reference
# Core workflow
shannot run <script.py> # Capture intent
shannot run -c "print(1+1)" # Inline code
shannot approve # Review and execute
# Execute specific session
shannot run --session <id> # Execute approved session
shannot run --session <id> --json-output # Machine-friendly
# Remote execution
shannot run <script.py> --target user@host
# Setup
shannot setup # Interactive menu
shannot setup runtime # Install PyPy sandbox
shannot setup remote add prod admin@prod.example.com
shannot setup remote test prod
shannot setup mcp install # Claude Desktop integration
# Status
shannot status # Runtime, config, pending sessions
Configuration
Single TOML file: ~/.config/shannot/config.toml (or .shannot/config.toml per-project)
[profile]
auto_approve = [
"ls", "cat", "head", "tail", "df", "ps", "grep", "find",
"systemctl status", "journalctl",
]
always_deny = [
"rm -rf /", "rm -rf ~", "dd if=", "mkfs",
"curl | sh", "wget | bash",
]
[audit]
enabled = true
rotation = "daily"
max_files = 30
[remotes.prod]
host = "prod.example.com"
user = "admin"
[remotes.staging]
host = "staging.local"
user = "deploy"
Why Not Just Use a Container?
| Approach | Trade-off |
|---|---|
| VM/Container | Agent can't do real work — isolated from your actual system |
| WASM | Capability-restricted — limited to what you expose |
| Policy sandbox | Static rules — can't adapt to context |
| Shannot | Agent does real work, with human approval |
Shannot is collaborative, not adversarial. The agent helps you. You stay in control.
Use Cases
LLM-assisted sysadmin — Let Claude diagnose and fix server issues, with you approving each change
Safe exploration — Run unfamiliar scripts knowing you'll see exactly what they want to do
Audited automation — Every command and file write logged, nothing happens without approval
Teaching — Show students what scripts do before execution
Security Model
Shannot provides supervised execution, not absolute isolation.
What it provides:
- System call interception via PyPy sandbox
- Virtual filesystem — scripts see only what you expose
- Command and file write approval workflow
- Conflict detection for file modifications
- Audit logging
What it doesn't provide:
- Memory/CPU limits (use cgroups separately)
- Network filtering (sockets are disabled entirely)
- Protection against PyPy sandbox escapes
For production, combine with:
- Dedicated service accounts (least privilege)
- Resource limits (systemd, cgroups)
- Network segmentation
See SECURITY.md for details.
MCP Integration
Shannot includes an MCP server for Claude Desktop:
shannot setup mcp install
This lets Claude propose scripts directly, which you review and approve through the standard workflow.
License
Apache 2.0 — See LICENSE
Contributing
See CONTRIBUTING.md
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file shannot-0.10.3.tar.gz.
File metadata
- Download URL: shannot-0.10.3.tar.gz
- Upload date:
- Size: 124.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b2055454d5997c8655cdc56566493be57efacd699045060beccf7bb53215b16
|
|
| MD5 |
7507a469a0b17ab88089ffc4335f2fbd
|
|
| BLAKE2b-256 |
a775384ff1057b4920b62b8faedb9e0fc5ec3e2e22e948b6de09026e0f0c38e7
|
Provenance
The following attestation bundles were made for shannot-0.10.3.tar.gz:
Publisher:
release.yml on corv89/shannot
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
shannot-0.10.3.tar.gz -
Subject digest:
0b2055454d5997c8655cdc56566493be57efacd699045060beccf7bb53215b16 - Sigstore transparency entry: 802285242
- Sigstore integration time:
-
Permalink:
corv89/shannot@84f20d2bce46ea7f941d6a7545053f64825c38dd -
Branch / Tag:
refs/tags/v0.10.3 - Owner: https://github.com/corv89
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@84f20d2bce46ea7f941d6a7545053f64825c38dd -
Trigger Event:
release
-
Statement type:
File details
Details for the file shannot-0.10.3-py3-none-any.whl.
File metadata
- Download URL: shannot-0.10.3-py3-none-any.whl
- Upload date:
- Size: 120.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da1383bdbe2849176653aa3018b9e01013899d9544b284eb22e14e7d7cd402f2
|
|
| MD5 |
01d6c3c4ef4d16739a3e0937e7b2f191
|
|
| BLAKE2b-256 |
2bf937c474ec1d7e0802e9e14ecb72d63e5930815d3f2a7a34fc6b6d1a213499
|
Provenance
The following attestation bundles were made for shannot-0.10.3-py3-none-any.whl:
Publisher:
release.yml on corv89/shannot
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
shannot-0.10.3-py3-none-any.whl -
Subject digest:
da1383bdbe2849176653aa3018b9e01013899d9544b284eb22e14e7d7cd402f2 - Sigstore transparency entry: 802285291
- Sigstore integration time:
-
Permalink:
corv89/shannot@84f20d2bce46ea7f941d6a7545053f64825c38dd -
Branch / Tag:
refs/tags/v0.10.3 - Owner: https://github.com/corv89
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@84f20d2bce46ea7f941d6a7545053f64825c38dd -
Trigger Event:
release
-
Statement type: