PHPackages                             blaspsoft/forerunner - 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. blaspsoft/forerunner

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

blaspsoft/forerunner
====================

A Laravel package that provides an elegant, migration-inspired API for defining JSON schemas that ensure your LLM responses are perfectly structured every time.

v0.2.1(7mo ago)501.5k↓30.6%3[1 issues](https://github.com/Blaspsoft/forerunner/issues)[1 PRs](https://github.com/Blaspsoft/forerunner/pulls)MITPHPPHP ^8.2|^8.3|^8.4CI passing

Since Oct 17Pushed 7mo agoCompare

[ Source](https://github.com/Blaspsoft/forerunner)[ Packagist](https://packagist.org/packages/blaspsoft/forerunner)[ RSS](/packages/blaspsoft-forerunner/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (7)Dependencies (7)Versions (8)Used By (0)

 [![Forerunner Logo](assets/icon.png)](assets/icon.png)

 [![Tests](https://camo.githubusercontent.com/e97d1a1466085dfd3db08c3195a3bbda5cca70838bebdc13f3534d28e15359fc/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f626c617370736f66742f666f726572756e6e65722f6d61696e2e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/blaspsoft/forerunner/actions?query=workflow%3Amain+branch%3Amain) [![Total Downloads](https://camo.githubusercontent.com/a9856d76af6471dc9848a8347260796d592a2aa085da40fc7192a10b3b8462e1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f626c617370736f66742f666f726572756e6e65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/blaspsoft/forerunner) [![Latest Version on Packagist](https://camo.githubusercontent.com/7f9a778d214a14a7544754b3d971159f6e22fc21960394bb22a9d0960201f632/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f626c617370736f66742f666f726572756e6e65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/blaspsoft/forerunner) [![License](https://camo.githubusercontent.com/8afc5d12ced73f4da5dc3ddc2955f0cde02d4b8bcf7dc0dc49f6d7027dccc34d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f626c617370736f66742f666f726572756e6e65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/blaspsoft/forerunner) [![CodeRabbit Pull Request Reviews](https://camo.githubusercontent.com/dd14077ba4e0b80cef80ce12ccc36c72bef0cbe5bcfc01d57421fc0415d08a06/68747470733a2f2f696d672e736869656c64732e696f2f636f64657261626269742f7072732f6769746875622f426c617370736f66742f666f726572756e6e65723f75746d5f736f757263653d6f73732675746d5f6d656469756d3d6769746875622675746d5f63616d706169676e3d426c617370736f6674253246666f726572756e6e6572266c6162656c436f6c6f723d31373137313726636f6c6f723d464635373041266c6162656c3d436f64655261626269742b52657669657773)](https://coderabbit.ai)

Forerunner - Build structured LLM outputs the Laravel way
=========================================================

[](#forerunner---build-structured-llm-outputs-the-laravel-way)

A Laravel package that provides an elegant, migration-inspired API for defining JSON schemas that ensure your LLM responses are perfectly structured every time.

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

[](#installation)

You can install the package via composer:

```
composer require blaspsoft/forerunner:^0.2
```

> **Note**: This is a pre-release version (0.x). The API may change as we gather feedback and iterate towards 1.0.0.

The package will automatically register its service provider.

### Upgrading from 0.1.x

[](#upgrading-from-01x)

If you're upgrading from version 0.1.x, please note there are breaking changes. See the [v0.2.0 release notes](https://github.com/Blaspsoft/forerunner/releases/tag/v0.2.0) for a complete migration guide.

Quick Start
-----------

[](#quick-start)

### Using the Artisan Command

[](#using-the-artisan-command)

Generate a new structure class:

```
php artisan make:struct UserProfile
```

This creates a structure class at `app/Structures/UserProfile.php`:

```
