PHPackages                             cybernerdie/laravel-glint - 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. cybernerdie/laravel-glint

ActiveLibrary

cybernerdie/laravel-glint
=========================

Laravel-native LLM observability with local traces, generations, cost tracking, latency, errors, and alerts.

v1.0.0(today)00MITPHPPHP ^8.3CI passing

Since Aug 1Pushed todayCompare

[ Source](https://github.com/cybernerdie/laravel-glint)[ Packagist](https://packagist.org/packages/cybernerdie/laravel-glint)[ Docs](https://github.com/cybernerdie/laravel-glint)[ RSS](/packages/cybernerdie-laravel-glint/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (9)Versions (2)Used By (0)

Laravel Glint
=============

[](#laravel-glint)

[![Tests](https://github.com/cybernerdie/laravel-glint/actions/workflows/tests.yml/badge.svg)](https://github.com/cybernerdie/laravel-glint/actions/workflows/tests.yml)[![PHPStan](https://github.com/cybernerdie/laravel-glint/actions/workflows/phpstan.yml/badge.svg)](https://github.com/cybernerdie/laravel-glint/actions/workflows/phpstan.yml)[![Code Style](https://github.com/cybernerdie/laravel-glint/actions/workflows/pint.yml/badge.svg)](https://github.com/cybernerdie/laravel-glint/actions/workflows/pint.yml)[![License](https://camo.githubusercontent.com/f8df3091bbe1149f398a5369b2c39e896766f9f6efba3477c63e9b4aa940ef14/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e)](LICENSE.md)

Laravel Glint is an LLM observability package for Laravel applications. It records LLM calls in your application database and provides a local dashboard for traces, generations, cost, latency, errors, users, and alerts.

Glint is designed for teams that want Laravel-native observability without sending prompts, completions, or usage data to a third-party service.

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

[](#requirements)

- PHP 8.3+
- Laravel 11, 12, or 13
- A configured queue worker when using the default `queue` recording mode

Supported instrumentation
-------------------------

[](#supported-instrumentation)

Glint can record LLM calls through:

- Laravel HTTP client requests to configured LLM hosts
- [Prism](https://github.com/echolabsdev/prism)
- [Laravel AI](https://github.com/laravel/ai)
- [Neuron AI](https://docs.neuron-ai.dev/)
- Manual tracing with the `Glint` facade

SDKs or transports that do not use one of the supported instrumentation paths should be wrapped with manual tracing.

Features
--------

[](#features)

- Local dashboard for traces, generations, costs, users, latency, and alerts
- Automatic instrumentation for supported drivers
- Manual tracing API for custom or unsupported LLM clients
- Token and cost tracking from a published pricing registry
- App-level pricing overrides for private models or provider price changes
- Alert rules for cost, error rate, latency, and token usage
- Privacy redaction before data is stored
- Retention and pruning commands
- Queue and sync recording modes
- `Glint::fake()` testing utilities
- Optional Laravel Pulse card

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

[](#installation)

Install the package and run the installer:

```
composer require cybernerdie/laravel-glint
php artisan glint:install
```

The installer publishes the config, pricing registry, migrations, and application service provider, then runs the migrations.

Enable recording:

```
GLINT_ENABLED=true
GLINT_DRIVERS=http
```

Visit `/glint` to open the dashboard.

By default, Glint records asynchronously through Laravel's queue. If your application already runs queue workers, no separate worker is required. To isolate Glint recording jobs, set a dedicated queue and run a worker for it:

```
GLINT_QUEUE=glint
```

```
php artisan queue:work --queue=glint
```

HTTP request traces
-------------------

[](#http-request-traces)

LLM generations are recorded without middleware. To group generations under the HTTP request that triggered them, register `GlintMiddleware` globally:

```
// bootstrap/app.php
->withMiddleware(function (Middleware $middleware) {
    $middleware->append(\Cybernerdie\Glint\Middleware\GlintMiddleware::class);
})
```

Manual tracing
--------------

[](#manual-tracing)

Use manual tracing when auto-instrumentation cannot see a call or when you want to add application-specific context:

```
use Cybernerdie\Glint\Facades\Glint;

$trace = Glint::trace('chat.pipeline', [
    'user_id' => (string) auth()->id(),
]);

try {
    $generation = Glint::generation('summarise', 'openai', 'gpt-4o');
    $generation
        ->prompt($prompt)
        ->options(temperature: 0.7, maxTokens: 1024, topP: 0.9);

    $response = $client->chat($prompt);

    $generation->finish(
        completion: $response->text,
        promptTokens: $response->promptTokens,
        completionTokens: $response->completionTokens,
    );
} catch (\Throwable $e) {
    isset($generation) && $generation->fail($e);

    throw $e;
} finally {
    $trace->end();
}
```

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

[](#configuration)

The main configuration file is published to `config/glint.php`.

Common options:

- `GLINT_ENABLED` — enable or disable recording
- `GLINT_DRIVERS` — comma-separated instrumentation drivers
- `GLINT_MODE` — `queue` or `sync`
- `GLINT_QUEUE` — queue name for recording jobs
- `GLINT_STORE_BODIES` — store prompts and completions; set `false` for metadata-only recording
- `GLINT_STORE_IP` — opt in to storing requester IP addresses
- `GLINT_RETENTION_TRACES` — raw trace/generation retention
- `GLINT_RETENTION_AGGREGATES` — aggregate retention
- `GLINT_RETENTION_ALERTS` — alert event retention

See [Configuration](docs/configuration.md) for the full reference.

Documentation
-------------

[](#documentation)

- [Configuration](docs/configuration.md)
- [Drivers](docs/drivers.md)
- [Auto-Instrumentation](docs/auto-instrumentation.md)
- [Manual Tracing](docs/manual-tracing.md)
- [Background Jobs](docs/background-jobs.md)
- [Dashboard](docs/dashboard.md)
- [Alerts](docs/alerts.md)
- [Exporting](docs/exporting.md)
- [Testing](docs/testing.md)
- [Privacy &amp; Redaction](docs/privacy.md)
- [Laravel Pulse Integration](docs/pulse.md)

Testing
-------

[](#testing)

```
composer test
composer stan
composer pint
```

License
-------

[](#license)

Laravel Glint is open-sourced software licensed under the [MIT license](LICENSE.md).

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance100

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

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

Unknown

Total

1

Last Release

0d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/52431939?v=4)[Joshua Paul](/maintainers/cybernerdie)[@cybernerdie](https://github.com/cybernerdie)

---

Top Contributors

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

---

Tags

aiclaudelaravelllmllmsneuronobservabilityopenaiphpprismatelescopelaravelaitracingopenaiobservabilityllmanthropic

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/cybernerdie-laravel-glint/health.svg)

```
[![Health](https://phpackages.com/badges/cybernerdie-laravel-glint/health.svg)](https://phpackages.com/packages/cybernerdie-laravel-glint)
```

###  Alternatives

[laravel/ai

The official AI SDK for Laravel.

1.1k4.6M275](/packages/laravel-ai)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.4M352](/packages/psalm-plugin-laravel)[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.2k99.8M338](/packages/laravel-horizon)[illuminate/database

The Illuminate Database package.

2.8k55.8M12.6k](/packages/illuminate-database)[moonshine/moonshine

Laravel administration panel

1.3k268.2k86](/packages/moonshine-moonshine)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

78727.1M205](/packages/laravel-mcp)

PHPackages © 2026

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