AI terminal co-pilot, destructive command interceptor, and POSIX exit code explainer.
A single typo in a bash terminal (rm -rf /*, chmod -R 777, writing to /dev/sda, or running a fork bomb) can completely destroy a production server or developer workstation. Moreover, cryptic exit codes (137, 139, 126) leave developers guessing what crashed.
ShellVigil safeguards your terminal workflow:
- 🚨 Destructive Command Interceptor: Intercepts dangerous operations (
rm -rf /, rawdddisk writes, unverified curl pipes to bash, fork bombs) and halts execution before damage occurs. - 💬 Plain-English Error Explainer: Translates cryptic POSIX exit codes (
137 OOM,139 Segfault,127 Command Not Found,126 Permission Denied) into understandable explanations and fixes. - 🤖 Natural Language to Bash Synthesizer: Converts human intent (e.g. "find files over 100MB", "kill process on port 3000", "prune docker images") into safe, tested shell commands.
- 📊 Cyber Command Console: Modern dark-mode web console with interactive command risk auditor and exit code dictionary.
- 🚀 Zero External Dependencies: Powered purely by the Python standard library.
┌────────────────────────────────────────────────────────┐
│ ShellVigil Guard │
│ CLI Input / Web Console │
└───────────────────────────┬────────────────────────────┘
│
┌────────────────────┼────────────────────┐
▼ ▼ ▼
┌──────────────┐ ┌─────────────┐ ┌─────────────┐
│ Risk Pattern │ │ Exit Code │ │ Synthesizer │
│ Interceptor │ │ Dictionary │ │ Natural Lang│
│ Fatal/Danger │ │ 137, 139... │ │ to Safe Cmd │
└──────┬───────┘ └──────┬──────┘ └──────┬──────┘
│ │ │
└────────────────────┼────────────────────┘
│
▼
┌───────────────────────────┐
│ Safety Verdict & Fix │
│ SAFE | CAUTION | FATAL │
└─────────────┬─────────────┘
▼
┌───────────────────────────┐
│ Interactive Shell Console │
│ http://localhost:8997 │
└───────────────────────────┘
# Clone the repository
git clone https://github.com/Scempyyy/ShellVigil.git
cd ShellVigil
# Start the dashboard
python3 shellvigil.py serveOpen your browser to http://localhost:8997.
# Check safety of a command
python3 shellvigil.py check "rm -rf /"
# Synthesize a command from natural language
python3 shellvigil.py ask "find files larger than 100M"
# Explain a cryptic exit code
python3 shellvigil.py explain 137python3 -m unittest discover tests -vShellVigil is open-source software licensed under the MIT License. Created by Scempyyy.