Manual system administration is dead.
ZAI Shell is an autonomous SysOps agent designed to navigate, repair, and secure complex environments. It translates natural language intent into verified system actions, protects you with Sentinel, and enables secure collaboration via P2P Encrypted Mesh.
# 1. Install Dependencies
pip install google-generativeai colorama psutil posthog pyautogui keyboard
# 2. Set Free Gemini API Key
# For Windows (PowerShell):
$env:GEMINI_API_KEY="your_key_here"
# For Linux/macOS (Bash):
export GEMINI_API_KEY="your_key_here"
# 3. Run
git clone https://github.com/TaklaXBR/zai-shell.git
cd zai-shell
python zaishell.pyOptional: pip install cryptography (P2P Encryption), chromadb (Long-term Memory)
- ⏱️ Watch System (
--watch): Set up stateful background monitors (e.g.,--watch if RAM > 80%). ZAI runs lightweight background scripts and alerts you when conditions are met. - 🛠️ Fixer Mode: A dedicated mode focused exclusively on system repair and troubleshooting. It ignores generic chatter and acts as a pure system medic.
- 👁️ Visual Context (Ctrl+Shift+Z): Take an instant screenshot of your screen and send it directly to ZAI's vision model for context-aware debugging.
- 🛡️ Enhanced
--showMode: Before executing a command, ZAI now explicitly explains what the command will do, preventing blind executions.
- Multi-Modal: Analyzes screen content (GUI) and images for error diagnosis.
- Self-Healing: If a command fails, ZAI changes strategy automatically until the task is done.
- P2P Mesh: Collaborate on terminals globally with end-to-end encryption.
Sentinel is a self-preservation system that understands context and learns from mistakes.
- Breaks down actions into Structural, Behavioral, Contextual, and Intent risks.
- Maintains a lightweight memory of past failures that caused actual damage.
- Non-blocking: It warns and explains, but the final decision is yours.
"It is not enough for an AI to write code. It must be able to survive the consequences."
We subjected ZAI to a hostile simulator (KERNEL_PANIC, DELETED_BINARIES, PERMISSION_CHAOS).
- Result: 65.5% Survival Rate (57/87 scenarios resolved autonomously).
- Key Win: Restored a missing
libssl.so.3by manually extracting a.debpackage withoutsudo. - 📄 Read the Full Stress Test Results
| Category | Command | Description |
|---|---|---|
| Sentinel | sentinel status / on/off |
View risk metrics, recent warnings, and health score. |
| P2P Sharing | share start / connect <IP> |
Host or join a secure encrypted terminal session. |
| Watch (NEW) | --watch <condition> |
Create a background system monitor. |
watch list / stop <ID> |
View active monitors or stop them. | |
fix watch |
Pass a triggered watch alert to Fixer mode for auto-resolution. | |
| Core | switch <mode> |
online (Gemini API) or offline (Phi-2 Local). |
gui on/off |
Enable desktop automation tools & Vision. | |
research on/off |
Enable live web search capability. | |
| Modes | normal / eco / lightning |
Balanced / Token-efficient / Maximum speed. |
fixer (NEW) |
Dedicated system repair and troubleshooting. |
ZAI Shell collects anonymous usage data (success rates, error counts) to improve the system. We NEVER collect your code, file contents, command text, or personal data.
To disable telemetry: telemetry off
Made with ❤️ by @TaklaXBR | Turkey 🇹🇷