yaknet/medikit
Composer 安装命令:
composer require yaknet/medikit
包简介
A self-healing runtime for PHP that uses AI to diagnose and suggest fixes for errors.
README 文档
README
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
truefor 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
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 12
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-05-13