Skip to main content

๐Ÿฅ AutoHeal AI

Autonomous Self-Healing Software Engine โ€” Install once, self-heal forever.

AutoHeal AI is a language-agnostic CLI tool that wraps any command, detects errors in real-time, and automatically diagnoses and fixes them using AI.

Python 3.11+ License: MIT


โœจ Features

  • ๐Ÿ” Real-time Error Detection โ€” Monitors stdout/stderr for errors across 8+ languages
  • ๐Ÿง  AI-Powered Diagnosis โ€” Uses LLM (GPT-4o, Claude, Gemini, Ollama) for root cause analysis
  • ๐Ÿ”ง Auto-Fix โ€” Restarts crashed processes, installs missing dependencies
  • ๐Ÿ’ก Smart Suggestions โ€” Generates code patches with diff preview (user-approved)
  • ๐Ÿ“š Learning Memory โ€” Remembers past errors and solutions for instant future fixes
  • ๐Ÿ”’ Safety-First โ€” Never auto-applies code changes; secrets redacted before LLM calls
  • ๐ŸŒ Language Agnostic โ€” Works with Python, Node.js, Go, Rust, Java, Ruby, PHP, and more

๐Ÿš€ Quick Start

Install

pip install autoheal-ai

Setup

# Initialize in your project
cd your-project/
autoheal init

# Set your LLM API key
autoheal config set llm.api_key sk-proj-your-key-here

# (Optional) Use a different provider
autoheal config set llm.provider anthropic  # or google, ollama

Run

# Monitor any command
autoheal run "python app.py"
autoheal run "npm start"
autoheal run "go run main.go"
autoheal run "cargo run"

๐Ÿ“– How It Works

You run:  autoheal run "python app.py"

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚  Sentinel    โ”‚โ”€โ”€โ”€โ”€>โ”‚   CECE   โ”‚โ”€โ”€โ”€โ”€>โ”‚ Diagnostics  โ”‚
โ”‚  (Detect)    โ”‚     โ”‚ (Context)โ”‚     โ”‚ (Root Cause) โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                            โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   Memory     โ”‚<โ”€โ”€โ”€โ”€โ”‚ Harness  โ”‚<โ”€โ”€โ”€โ”€โ”‚  Resolution  โ”‚
โ”‚   (Learn)    โ”‚     โ”‚ (Safety) โ”‚     โ”‚    (Fix)     โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
  1. Sentinel watches your process output for errors
  2. CECE builds full context (source code, environment, dependencies)
  3. Diagnostics determines root cause via pattern matching + AI
  4. Resolution generates the appropriate fix
  5. Harness checks safety gates before applying
  6. Memory stores the resolution for future instant fixes

๐Ÿ›  CLI Commands

Command Description
autoheal init [path] Initialize AutoHeal in a project
autoheal run <command> Run and monitor a command
autoheal status Show error statistics
autoheal history [-n 20] Show fix history
autoheal config list Show all configuration
autoheal config set <key> <val> Set a config value
autoheal config get <key> Get a config value
autoheal diagnose <error> Manually diagnose an error
autoheal version Show version

โš™๏ธ Configuration

AutoHeal stores configuration in .autoheal/config.toml:

[llm]
provider = "openai"           # openai, anthropic, google, ollama
model = ""                    # Auto-selects best model per provider
api_key = "sk-proj-..."       # Your API key
temperature = 0.2

[resolution]
confidence_threshold = 0.75   # Min confidence for auto-fix
code_patch_threshold = 0.90   # Min confidence to suggest code patch
create_backup = true          # Git backup before patches

[general]
mode = "auto"                 # auto, suggest, manual
verbose = false

๐Ÿค– Supported LLM Providers

Provider Model Setup
OpenAI (default) GPT-4o autoheal config set llm.api_key sk-...
Anthropic Claude 3.5 Sonnet autoheal config set llm.provider anthropic
Google Gemini 2.0 Flash autoheal config set llm.provider google
Ollama (local) Llama 3.1 autoheal config set llm.provider ollama

๐Ÿ“ License

MIT License โ€” see LICENSE for details.

Download files

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

Source Distribution

autoheal_ai-0.1.1.tar.gz (34.0 kB view details)

Uploaded Source

Built Distribution

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

autoheal_ai-0.1.1-py3-none-any.whl (50.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: autoheal_ai-0.1.1.tar.gz
  • Upload date:
  • Size: 34.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.14.6 Darwin/25.5.0

File hashes

Hashes for autoheal_ai-0.1.1.tar.gz
Algorithm Hash digest
SHA256 654529ffc0849624441261a05d701bcf6673e83057e99297d225bb7c7fd0a72a
MD5 7e89e32f5103803296a4eb1791c6ca05
BLAKE2b-256 3bc18209381aa74a09e5c8d3c9089f9d6ae522893e15ea6ef049cdf3ab34d0ac

See more details on using hashes here.

File details

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

File metadata

  • Download URL: autoheal_ai-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 50.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.14.6 Darwin/25.5.0

File hashes

Hashes for autoheal_ai-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 09e552d432c0a128c2cd9a642040b288fbddb48b493f2e498bd8bc3747614510
MD5 9527bf6df6250b7bd20dcc2f4ba1328e
BLAKE2b-256 b699445f75c56c47549fa7b8ec29de9596d358cc316239b02a066877087f7c1f

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