Skip to content

About

AI terminal co-pilot, destructive command interceptor, and POSIX exit code explainer.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

🛡️ ShellVigil

CI License: MIT Python: 3.8+ Zero External Dependencies

AI terminal co-pilot, destructive command interceptor, and POSIX exit code explainer.


⚡ What is ShellVigil?

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 /, raw dd disk 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.

🏗️ Architecture

┌────────────────────────────────────────────────────────┐
│                   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   │
              └───────────────────────────┘

🚀 Quickstart

1. Launch Web Dashboard

# Clone the repository
git clone https://github.com/Scempyyy/ShellVigil.git
cd ShellVigil

# Start the dashboard
python3 shellvigil.py serve

Open your browser to http://localhost:8997.

2. Terminal CLI Commands

# 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 137

🧪 Testing

python3 -m unittest discover tests -v

📄 License

ShellVigil is open-source software licensed under the MIT License. Created by Scempyyy.

About

AI terminal co-pilot, destructive command interceptor, and POSIX exit code explainer.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages