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.

Metadata

Release files for autoheal-ai 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for autoheal-ai 0.1.1
File Size Uploaded Provenance
autoheal_ai-0.1.1.tar.gz 34.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for autoheal-ai 0.1.1
File Interpreter ABI Platform
autoheal_ai-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 84.1 kB

Release files / autoheal_ai-0.1.1.tar.gz

Download URL autoheal_ai-0.1.1.tar.gz
Size 34.0 kB
Tags Source
SHA-256 checksum
How to use checksums
654529ffc0849624441261a05d701bcf6673e83057e99297d225bb7c7fd0a72a
BLAKE2b-256 checksum
How to use checksums
3bc18209381aa74a09e5c8d3c9089f9d6ae522893e15ea6ef049cdf3ab34d0ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.1 CPython/3.14.6 Darwin/25.5.0

Release files / autoheal_ai-0.1.1-py3-none-any.whl

Download URL autoheal_ai-0.1.1-py3-none-any.whl
Size 50.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
09e552d432c0a128c2cd9a642040b288fbddb48b493f2e498bd8bc3747614510
BLAKE2b-256 checksum
How to use checksums
b699445f75c56c47549fa7b8ec29de9596d358cc316239b02a066877087f7c1f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.1 CPython/3.14.6 Darwin/25.5.0

Security for autoheal-ai 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page