๐ฅ 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.
โจ 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) โ
โโโโโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโโโโโ
- Sentinel watches your process output for errors
- CECE builds full context (source code, environment, dependencies)
- Diagnostics determines root cause via pattern matching + AI
- Resolution generates the appropriate fix
- Harness checks safety gates before applying
- 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 |
| 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
654529ffc0849624441261a05d701bcf6673e83057e99297d225bb7c7fd0a72a
|
|
| MD5 |
7e89e32f5103803296a4eb1791c6ca05
|
|
| BLAKE2b-256 |
3bc18209381aa74a09e5c8d3c9089f9d6ae522893e15ea6ef049cdf3ab34d0ac
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
09e552d432c0a128c2cd9a642040b288fbddb48b493f2e498bd8bc3747614510
|
|
| MD5 |
9527bf6df6250b7bd20dcc2f4ba1328e
|
|
| BLAKE2b-256 |
b699445f75c56c47549fa7b8ec29de9596d358cc316239b02a066877087f7c1f
|