PHPackages                             dakshraman/laravel-ai-debugger - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. dakshraman/laravel-ai-debugger

ActiveLibrary

dakshraman/laravel-ai-debugger
==============================

AI Debugging Assistant for Laravel using local CLI tools (Claude, Gemini, Copilot, Codex)

v2.0.0(2d ago)13[1 PRs](https://github.com/dakshraman/laravel-ai-debugger/pulls)MITPHPPHP ^8.1CI passing

Since Mar 19Pushed 2d agoCompare

[ Source](https://github.com/dakshraman/laravel-ai-debugger)[ Packagist](https://packagist.org/packages/dakshraman/laravel-ai-debugger)[ RSS](/packages/dakshraman-laravel-ai-debugger/feed)WikiDiscussions main Synced today

READMEChangelog (2)Dependencies (4)Versions (10)Used By (0)

laravel-ai-debugger
===================

[](#laravel-ai-debugger)

[![Latest Version on Packagist](https://camo.githubusercontent.com/43b02b3a115977bf496d92f104760b877a1ad7eee4ee69c391c7b6fd536c0c65/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f64616b736872616d616e2f6c61726176656c2d61692d64656275676765722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/dakshraman/laravel-ai-debugger)[![Tests](https://github.com/dakshraman/laravel-ai-debugger/actions/workflows/tests.yml/badge.svg)](https://github.com/dakshraman/laravel-ai-debugger/actions/workflows/tests.yml)[![License](https://camo.githubusercontent.com/d964670a872c0c0603d9611c41ffae278acca64952cda12bc0af147174fa9243/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f64616b736872616d616e2f6c61726176656c2d61692d64656275676765722e7376673f7374796c653d666c61742d737175617265)](LICENSE)

A local-first AI debugging assistant for Laravel using CLI tools like **Claude**, **Gemini CLI**, **GitHub Copilot**, and **OpenAI Codex**. Zero API cost — everything runs through your locally installed CLI tools.

---

Features
--------

[](#features)

- ✅ Local AI-powered error analysis (no API key required)
- ✅ Works with Claude, Gemini CLI, GitHub Copilot, and OpenAI Codex
- ✅ Plug-and-play Laravel package with auto-discovery
- ✅ Artisan command: `php artisan debug:analyze`
- ✅ Facade for inline usage: `AIDebugger::analyze($trace)`
- ✅ Extensible driver system

---

Requirements
------------

[](#requirements)

- PHP 8.1+
- Laravel 10, 11, or 12
- One of the following CLI tools installed and in your `$PATH`:
    - [claude](https://github.com/anthropics/anthropic-tools) — Anthropic Claude CLI
    - [gemini](https://ai.google.dev/) — Google Gemini CLI
    - [gh copilot](https://docs.github.com/en/copilot/github-copilot-in-the-cli) — GitHub Copilot CLI
    - [codex](https://github.com/openai/codex) — OpenAI Codex CLI

---

Installation
------------

[](#installation)

```
composer require dakshraman/laravel-ai-debugger
```

The service provider and facade are registered automatically via Laravel's package auto-discovery.

### Publish the config file

[](#publish-the-config-file)

```
php artisan vendor:publish --tag=config
```

This publishes `config/ai-debugger.php`.

---

Configuration
-------------

[](#configuration)

Set your preferred AI driver in `.env`:

```
AI_DEBUGGER_DRIVER=claude   # Options: claude, gemini, copilot, codex
```

Or edit `config/ai-debugger.php` directly:

```
return [
    'driver'   => env('AI_DEBUGGER_DRIVER', 'claude'),
    'log_path' => env('AI_DEBUGGER_LOG_PATH', storage_path('logs/laravel.log')),
];
```

---

Usage
-----

[](#usage)

### Artisan Command

[](#artisan-command)

Analyze your Laravel log file:

```
php artisan debug:analyze
```

Point to a specific log file:

```
php artisan debug:analyze --file=/path/to/custom.log
```

### Facade

[](#facade)

```
use AIDebugger;

$result = AIDebugger::analyze($exception->getMessage());

// $result = [
//   'root_cause' => '...',
//   'fix'        => '...',
//   'steps'      => [...],
// ]
```

### Auto-hook (Optional)

[](#auto-hook-optional)

Register in your `AppServiceProvider` to automatically analyze every reported exception:

```
use Illuminate\Support\Facades\Log;

public function register(): void
{
    $this->app->reportable(function (\Throwable $e) {
        Log::info('AI Debug Analysis', app('ai-debugger')->analyze($e->getMessage()));
    });
}
```

---

Extending with a Custom Driver
------------------------------

[](#extending-with-a-custom-driver)

Implement `Dakshraman\AIDebugger\AI\AIInterface`:

```
use Dakshraman\AIDebugger\AI\AIInterface;

class MyCustomDriver implements AIInterface
{
    public function analyze(string $input): string
    {
        // Call your AI tool and return the response string
        return shell_exec('echo ' . escapeshellarg($input) . ' | my-ai-tool');
    }
}
```

Then bind it in a service provider or extend `AIDriverManager`.

---

License
-------

[](#license)

MIT

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance100

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 70.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

2d ago

Major Versions

v1.0.0 → v2.0.02026-03-20

### Community

Maintainers

![](https://www.gravatar.com/avatar/f1de933f1f20fb524eb36c6dcce05f55f8f14997d1ad471be8bc8c55fbc828f4?d=identicon)[dakshraman](/maintainers/dakshraman)

---

Top Contributors

[![Copilot](https://avatars.githubusercontent.com/in/1143301?v=4)](https://github.com/Copilot "Copilot (17 commits)")[![dakshraman](https://avatars.githubusercontent.com/u/120021524?v=4)](https://github.com/dakshraman "dakshraman (7 commits)")

---

Tags

laravelaidebuggingcodexGeminicopilotclaude

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/dakshraman-laravel-ai-debugger/health.svg)

```
[![Health](https://phpackages.com/badges/dakshraman-laravel-ai-debugger/health.svg)](https://phpackages.com/packages/dakshraman-laravel-ai-debugger)
```

###  Alternatives

[vizra/vizra-adk

Vizra Agent Development Kit - A comprehensive Laravel package for building intelligent AI agents.

28621.7k](/packages/vizra-vizra-adk)[sbsaga/toon

🧠 TOON for Laravel — a compact, human-readable, and token-efficient data format for AI prompts &amp; LLM contexts. Perfect for ChatGPT, Gemini, Claude, Mistral, and OpenAI integrations (JSON ⇄ TOON).

589.9k](/packages/sbsaga-toon)[claude-php/claude-php-sdk-laravel

Laravel integration for the Claude PHP SDK - Anthropic Claude API

505.5k](/packages/claude-php-claude-php-sdk-laravel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
