yaknet/medikit

A self-healing runtime for PHP that uses AI to diagnose and suggest fixes for errors.

Maintainers

Package info

github.com/yakistir98/yaknet-medikit

pkg:composer/yaknet/medikit

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

dev-main 2026-05-13 16:10 UTC

This package is auto-updated.

Last update: 2026-05-13 16:14:06 UTC


README

PHP Version License

YakNet Medikit is a revolutionary "Self-Healing" runtime library for PHP. It intercepts runtime exceptions, analyzes the failing code using Google Gemini AI, and provides instant diagnostics and fix suggestions through a premium UI or CLI report.

🚑 Why Medikit?

Traditional logging tells you what happened. Medikit tells you why it happened and how to fix it. It acts as a "resident doctor" for your application, providing immunity against unhandled crashes.

🚀 Features

  • AI-Powered Diagnostics: Uses Gemini 3.1 Flash Lite to understand code logic and intent.
  • Context Awareness: Automatically extracts relevant code snippets surrounding the error for deep analysis.
  • Premium Reporting: Beautiful, dark-themed HTML diagnostic pages for web errors and colorized CLI output.
  • Zero-Config Integration: One-line registration to protect your entire application.

📦 Installation

composer require yaknet/medikit

🛠 Usage

Simply register Medikit at the entry point of your application.

use YakNet\Medikit\Medikit;

// This will only activate if .env has MEDIKIT_DEBUG=true
Medikit::register(); 

⚙️ Environment Variables (.env)

Medikit respects your development workflow. Create a .env file in your root:

GEMINI_API_KEY=your_key_here
MEDIKIT_DEBUG=true
  • MEDIKIT_DEBUG: Must be true for Medikit to intercept errors. In production (false), it stays silent.
  • Interactive Mode: In CLI, Medikit will ask if you want to attempt a repair when a fix is found.

📄 License

The MIT License (MIT). Please see License File for more information.

Developed with ❤️ by YakNet