Skip to main content

Hybrid, LLM-Centered, System-Aware FixShell

Project description

FixShell AI (System-Aware Diagnostic Engine)

Refining Linux command-line error recovery with a hybrid, LLM-centered approach. FixShell intercepts failed commands, collects system context, and uses a local LLM (Ollama) to diagnose and suggest fixes.

🚀 Features

  • Context-Aware Diagnosis: Analyzes command output, exit codes, and system state (distro, package manager, SELinux).
  • Hybrid Intelligence: Combines deterministic rules (for instant fixes) with LLM reasoning (for complex errors).
  • Safety First: Filters dangerous commands and utilizes a strict safety layer to prevent system damage.
  • Local Privacy: Runs entirely on your machine using Ollama; no data leaves your system.

📦 Installation

pip install fixshell-ai

🛠️ Prerequisites (Ollama)

FixShell requires Ollama to be installed and running locally to perform AI analysis.

  1. Install Ollama: Download from ollama.com
  2. Pull the Model:
    ollama pull qwen2.5:3b
    
  3. Start Ollama Server: Ensure the Ollama server is running (ollama serve).

💻 Usage

Prepend fixshell -- to any command you want to run safely or debug.

fixshell -- <your_command>

Examples:

# Debug a failed docker command
fixshell -- docker run hello-world

# Analyze a missing package
fixshell -- python3 script.py

# Investigate permission errors
fixshell -- cat /etc/shadow

⚠️ Important Warning

FixShell uses a Large Language Model (LLM) for diagnosis. While we have implemented safety filters:

  • Always review suggested commands before execution.
  • Do not run suggested commands blindly.
  • The AI can make mistakes.

🏗️ Architecture

  • Executor: Runs your command and captures output.
  • Context Collector: Gathers system metadata (OS, shell, history).
  • Log Filtering: Extracts relevant error lines to reduce noise.
  • Safety Layer: Scans for dangerous patterns (e.g., rm -rf /, chmod 777).
  • LLM Integration: Queries the local Ollama instance for a diagnosis.

📄 License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fixshell-0.1.1.tar.gz (13.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fixshell-0.1.1-py3-none-any.whl (16.0 kB view details)

Uploaded Python 3

File details

Details for the file fixshell-0.1.1.tar.gz.

File metadata

  • Download URL: fixshell-0.1.1.tar.gz
  • Upload date:
  • Size: 13.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for fixshell-0.1.1.tar.gz
Algorithm Hash digest
SHA256 ce21ca606d112981f3f24210f75dae33b6fc3c7d446e48f67df82869feb7b1d0
MD5 26aee412e749bc1b47b573dbe336363c
BLAKE2b-256 32fabb1cca9fecdb06070ea99253f1894ae0803862db1faffdda6068714d4cb8

See more details on using hashes here.

File details

Details for the file fixshell-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: fixshell-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 16.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for fixshell-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8fe54d73c756849d6e861ca471eb828eafbc24ebe879a99c04366482a7bd9292
MD5 26c52bdcd20c881fc943eb1b7e003771
BLAKE2b-256 1a1d7477a8b341d3e9d29d24f406ed485277c719009f6d0b8da07dd4896184ab

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page