PHPackages                             harlew-dev/laravel-ai-usage - 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. harlew-dev/laravel-ai-usage

ActiveLibrary

harlew-dev/laravel-ai-usage
===========================

Real-time AI usage and token monitoring dashboard for the Laravel AI SDK

v0.1.1(3mo ago)10MITPHPPHP ^8.4

Since Feb 17Pushed 3mo ago1 watchersCompare

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

READMEChangelog (2)Dependencies (7)Versions (3)Used By (0)

[![Dashboard](docs/image.png)](docs/image.png)

Laravel AI Usage
================

[](#laravel-ai-usage)

[![Latest Version on Packagist](https://camo.githubusercontent.com/eb7fb2cf460fee91db2f66c53bd3fb4b19c828d0a5eb15f72e2194e5b552cfd4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6861726c65772d6465762f6c61726176656c2d61692d75736167652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/harlew-dev/laravel-ai-usage)[![Tests](https://camo.githubusercontent.com/93b85f10f21a7317712880f6cd81d13ca936ca62ec702ea226478c2cc9a26770/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6861726c65772d6465762f6c61726176656c2d61692d75736167652f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/harlew-dev/laravel-ai-usage/actions/workflows/run-tests.yml)[![Total Downloads](https://camo.githubusercontent.com/42644ff2514dfba1ef69331085c481b8e7a6f5e057cfaa765ec87e7f47df3bc2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6861726c65772d6465762f6c61726176656c2d61692d75736167652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/harlew-dev/laravel-ai-usage)

Real-time AI usage and token monitoring dashboard for the Laravel AI SDK. Automatically tracks token consumption and usage patterns across all AI providers with a beautiful Livewire-powered dashboard.

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

[](#installation)

You can install the package via composer:

```
composer require harlew-dev/laravel-ai-usage
```

You can publish and run the migrations with:

```
php artisan vendor:publish --tag="ai-usage-migrations"
php artisan migrate
```

You can publish the config file with:

```
php artisan vendor:publish --tag="ai-usage-config"
```

Usage
-----

[](#usage)

Once installed, the package automatically listens to Laravel AI SDK events and records token usage for every AI call your application makes.

Visit `/ai/usage` in your browser to access the dashboard.

### Authorization

[](#authorization)

By default, the dashboard is only accessible in the `local` environment. To configure access in other environments, define an `viewAiUsage` gate in your `AuthServiceProvider`:

```
Gate::define('viewAiUsage', function ($user) {
    return in_array($user->email, [
        // authorized emails
    ]);
});
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](https://github.com/harlew-dev/.github/blob/main/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Harlew](https://github.com/harlew-dev)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance82

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity42

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

2

Last Release

90d ago

### Community

Maintainers

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

---

Top Contributors

[![HarrisonCode](https://avatars.githubusercontent.com/u/18741898?v=4)](https://github.com/HarrisonCode "HarrisonCode (10 commits)")

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/harlew-dev-laravel-ai-usage/health.svg)

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

###  Alternatives

[spatie/laravel-livewire-wizard

Build wizards using Livewire

4061.0M4](/packages/spatie-laravel-livewire-wizard)[kirschbaum-development/commentions

A package to allow you to create comments, tag users and more

12369.2k](/packages/kirschbaum-development-commentions)[livewire-filemanager/filemanager

A simple, friendly and practical Livewire filemanager for your applications

3587.6k1](/packages/livewire-filemanager-filemanager)[calebdw/larastan-livewire

A Larastan / PHPStan extension for Livewire.

43482.4k3](/packages/calebdw-larastan-livewire)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

116.6k](/packages/tomshaw-electricgrid)[a2insights/filament-saas

Filament Saas for A2Insights

161.1k](/packages/a2insights-filament-saas)

PHPackages © 2026

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