PHPackages                             niduranga/laravel-dev-guard - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. niduranga/laravel-dev-guard

ActiveLibrary[Testing &amp; Quality](/categories/testing)

niduranga/laravel-dev-guard
===========================

AI-powered TDD test generator for Laravel Actions

v2.1.0(1mo ago)237↓100%MITPHPPHP ^8.2|^8.3|^8.4|^8.5

Since Apr 17Pushed 1mo agoCompare

[ Source](https://github.com/niduranga/laravel-dev-guard)[ Packagist](https://packagist.org/packages/niduranga/laravel-dev-guard)[ RSS](/packages/niduranga-laravel-dev-guard/feed)WikiDiscussions main Synced 1w ago

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

Laravel DevGuard 🛡️
===================

[](#laravel-devguard-️)

[](https://www.google.com/search?q=https://packagist.org/packages/niduranga/laravel-dev-guard)[](https://www.google.com/search?q=https://packagist.org/packages/niduranga/laravel-dev-guard)[](LICENSE.md)

**Laravel DevGuard** is an AI-powered TDD companion designed specifically for the Laravel Action pattern. It automates the tedious task of writing unit and feature tests by analyzing your business logic and generating production-ready **Pest** or **PHPUnit** tests using Google's Gemini AI.

Stop being a "Balu" developer spending hours on boilerplate tests. Focus on the logic, and let DevGuard handle the coverage.

🚀 Features
----------

[](#-features)

- **Auto-Framework Detection:** Automatically detects whether your project uses **Pest** or **PHPUnit**.
- **Context-Aware Generation:** Analyzes your Action classes and intelligently mocks dependencies.
- **One-Command Setup:** Seamless installation and configuration.
- **Gemini AI Powered:** Uses high-speed, high-accuracy LLMs to understand your code flow.
- **SOLID Compliant:** Generates tests that follow clean architecture and best practices.

📦 Installation
--------------

[](#-installation)

You can install the package via composer:

```
composer require niduranga/laravel-dev-guard
```

After the package is installed, run the installation command to publish the configuration file:

```
php artisan devguard:install
```

⚙️ Configuration
----------------

[](#️-configuration)

1. Get your free API Key from the [Google AI Studio](https://aistudio.google.com/).
2. Add the following key to your `.env` file:

```
GEMINI_API_KEY=your_actual_api_key_here

# Optional: Defaults to gemini-2.5-flash for high performance you can change to other models
GEMINI_MODEL=gemini-3-flash-preview
```

🛠️ Usage
--------

[](#️-usage)

Simply point DevGuard to any Action class in your project.

```
php artisan guard:test Actions/CreateUserAction
```

### What happens next?

[](#what-happens-next)

1. **Scanning:** DevGuard reads your `CreateUserAction` class.
2. **Analysis:** It identifies DB interactions, events, and external API calls.
3. **Generation:** AI generates a comprehensive test suite.
4. **Saving:** The test file is automatically saved in `tests/Feature/` or `tests/Unit/`.

✅ Testing
---------

[](#-testing)

We take testing seriously. This package is fully tested with Pest.

```
composer test
```

🤝 Contributing
--------------

[](#-contributing)

Contributions are welcome! If you have ideas for new features or improvements, feel free to open an issue or submit a pull request.

📄 License
---------

[](#-license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

---

**Developed with ❤️ by [Niduranga Jayarathna](https://www.google.com/search?q=https://github.com/niduranga-jayarathna)**

---

###  Health Score

45

—

FairBetter than 91% of packages

Maintenance90

Actively maintained with recent releases

Popularity13

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

12

Last Release

53d ago

Major Versions

v1.9.0 → v2.0.02026-04-18

### Community

Maintainers

![](https://www.gravatar.com/avatar/139a52bbcc50fb98db10ce630131413e08ce12ab0752f0b195a1e1ca7bdca390?d=identicon)[niduranga](/maintainers/niduranga)

---

Top Contributors

[![niduranga](https://avatars.githubusercontent.com/u/183077965?v=4)](https://github.com/niduranga "niduranga (14 commits)")

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/niduranga-laravel-dev-guard/health.svg)

```
[![Health](https://phpackages.com/badges/niduranga-laravel-dev-guard/health.svg)](https://phpackages.com/packages/niduranga-laravel-dev-guard)
```

###  Alternatives

[larastan/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

6.4k51.0M7.4k](/packages/larastan-larastan)[illuminate/testing

The Illuminate Testing package.

3316.2M134](/packages/illuminate-testing)[christophrumpel/missing-livewire-assertions

This package adds missing livewire test assertions.

150386.1k12](/packages/christophrumpel-missing-livewire-assertions)[calebdw/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

15104.9k4](/packages/calebdw-larastan)

PHPackages © 2026

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