PHPackages                             araminco/laravel-ai-mapper - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. araminco/laravel-ai-mapper

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

araminco/laravel-ai-mapper
==========================

A Laravel package to generate an AI-friendly map of the project structure, database, and dependencies.

v1.2.3(8mo ago)213↓50%MITPHPPHP ^8.1

Since Aug 20Pushed 8mo agoCompare

[ Source](https://github.com/ARaminco/laravel-ai-mapper)[ Packagist](https://packagist.org/packages/araminco/laravel-ai-mapper)[ RSS](/packages/araminco-laravel-ai-mapper/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (4)Versions (6)Used By (0)

Laravel AI Mapper
=================

[](#laravel-ai-mapper)

[![Latest Version on Packagist](https://camo.githubusercontent.com/f6147ae869ed70dffab0ba41888ba754729f3563eeae4b9e97144ead7d06894d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6172616d696e636f2f6c61726176656c2d61692d6d61707065722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/araminco/laravel-ai-mapper)[![Total Downloads](https://camo.githubusercontent.com/f8ce8497a4bed899cb6ef6d39a123b90e8bdf1a947d8b1eec8d475aa664751e9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6172616d696e636f2f6c61726176656c2d61692d6d61707065722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/araminco/laravel-ai-mapper)[![License: MIT](https://camo.githubusercontent.com/1b01ef0024ba0866c115986b895301f657c1b21fc29f05c4844b7f2e8d89204d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e7376673f7374796c653d666c61742d737175617265)](https://opensource.org/licenses/MIT)

A Laravel Artisan command that scans your project and generates a comprehensive, AI-friendly JSON map. This map allows AI models to understand your project's architecture, overcoming context limits and enabling more intelligent, context-aware assistance.

---

✨ Features
----------

[](#-features)

This package extracts and maps the following information into a single JSON file:

- **Project Overview**: App name, Laravel, and PHP versions.
- **Environment Details**: Key configuration values like environment, debug mode, and drivers for cache, queue, and session.
- **Database Schema**: A list of all tables along with their columns, indexes, and foreign keys, with a resilient connection mechanism.
- **Model Structure**: Extracts all Eloquent models, including properties (`$fillable`, `$casts`, etc.) and their defined **Eloquent relationships**.
- **Route List**: All web and API routes, including methods, URIs, and middleware.
- **Scheduled Commands**: A list of all cron jobs defined in your Console Kernel.
- **Event Listeners**: A map of all registered events and their corresponding listeners.
- **Composer Dependencies**: A list of packages used in the project.
- **FilamentPHP Structure (if detected)**: Automatically discovers panels, resources, pages, and widgets.

---

💿 Installation
--------------

[](#-installation)

You can install the package via Composer:

```
composer require araminco/laravel-ai-mapper
```

---

🚀 Usage
-------

[](#-usage)

To generate the project map, run the following Artisan command:

```
php artisan ai:map
```

This will create a file named `ai-project-map.json` in your project's root directory.

### Controlling the Output Size

[](#controlling-the-output-size)

You can control the size and content of the map using the following options.

#### Compact Mode

[](#compact-mode)

Use the `--compact` flag to generate a summarized version that is significantly smaller. This mode simplifies verbose sections like the database schema and routes.

```
php artisan ai:map --compact
```

#### Excluding Sections

[](#excluding-sections)

You can also completely exclude sections from the map:

- `--no-db`: Excludes the database schema.
- `--no-files`: Excludes the directory structure.
- `--no-models`: Excludes the model analysis.
- `--no-routes`: Excludes the route list.
- `--no-deps`: Excludes composer dependencies.
- `--no-filament`: Excludes the Filament structure.
- `--no-env`: Excludes environment details.
- `--no-schedule`: Excludes scheduled commands.
- `--no-events`: Excludes event listeners.

---

📄 Output Sample
---------------

[](#-output-sample)

The generated JSON file will have a structure similar to this:

```
{
    "projectName": "My Laravel App",
    "laravelVersion": "12.0.0",
    "environment": {
        "environment": "local",
        "debug_mode": true,
        "cache_driver": "file",
        "queue_connection": "sync",
        "session_driver": "file"
    },
    "databaseSchema": { "...": "..." },
    "models": [
        {
            "class": "App\\Models\\User",
            "table": "users",
            "relationships": { "...": "..." }
        }
    ],
    "routes": [ "...": "..." ],
    "scheduledCommands": [
        "$schedule->command('inspire')->hourly();"
    ],
    "eventListeners": {
        "Illuminate\\Auth\\Events\\Registered": [
            "Illuminate\\Auth\\Listeners\\SendEmailVerificationNotification"
        ]
    },
    "filament": { "...": "..." }
}
```

---

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

[](#-contributing)

Contributions are welcome! Please feel free to submit a Pull Request.

📜 License
---------

[](#-license)

This package is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance58

Moderate activity, may be stable

Popularity8

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

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

5

Last Release

266d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0df0b8e1080e3393b1df4eadb3adacbee69f366d906d2f78d4db7b249877ed75?d=identicon)[ARaminco](/maintainers/ARaminco)

---

Tags

aiartisan-commandchatgptcode-analysisdeveloper-toolsfilamentphpgeminijson-apilaravelllm

### Embed Badge

![Health badge](/badges/araminco-laravel-ai-mapper/health.svg)

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

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[orchestra/canvas

Code Generators for Laravel Applications and Packages

21017.2M158](/packages/orchestra-canvas)[fumeapp/modeltyper

Generate TypeScript interfaces from Laravel Models

196277.9k](/packages/fumeapp-modeltyper)[zonneplan/laravel-module-loader

Module loader for Laravel

24118.4k](/packages/zonneplan-laravel-module-loader)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[bjuppa/laravel-blog

Add blog functionality to your Laravel project

483.3k2](/packages/bjuppa-laravel-blog)

PHPackages © 2026

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