PHPackages                             specula/laravel - 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. [API Development](/categories/api)
4. /
5. specula/laravel

ActiveLibrary[API Development](/categories/api)

specula/laravel
===============

Zero-config Laravel middleware that auto-generates live API docs

v0.1.16(1mo ago)113MITPHPPHP ^8.0

Since Mar 15Pushed 1mo agoCompare

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

READMEChangelogDependencies (1)Versions (15)Used By (0)

specula/laravel
===============

[](#speculalaravel)

> Laravel middleware for [Specula](https://github.com/elvinaqalarov99/specula) — API docs that can't lie.

Captures real HTTP traffic and ships observations to your local Specula server, which builds a live OpenAPI 3.0 spec automatically. Zero annotations required.

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

[](#requirements)

- PHP 8.1+
- Laravel 10 or 11

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

[](#installation)

```
composer require specula/laravel
```

The `SpeculaServiceProvider` is auto-discovered by Laravel — no manual registration needed.

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

[](#configuration)

Publish the config file:

```
php artisan vendor:publish --tag=specula-config
```

This creates `config/specula.php`:

```
return [
    'enabled'        => env('SPECULA_ENABLED', true),
    'endpoint'       => env('SPECULA_ENDPOINT', 'http://localhost:7878'),
    'ignore'         => ['/health', '/metrics', '/telescope'],
    'capture_bodies' => env('SPECULA_CAPTURE_BODIES', true),
];
```

Add to your `.env`:

```
SPECULA_ENABLED=true
SPECULA_ENDPOINT=http://localhost:7878
```

That's it. Open `http://localhost:7878/docs` to see your API docs populate in real time.

Options
-------

[](#options)

KeyDefaultDescription`enabled``true`Toggle observation on/off`endpoint``http://localhost:7878`Specula server URL`ignore``['/health', ...]`Path prefixes to skip`capture_bodies``true`Include request/response bodiesHow it works
------------

[](#how-it-works)

The middleware runs after the response is built, then sends the full request/response pair to the Specula server's `/ingest` endpoint via a non-blocking raw socket. Response time is not affected. If the Specula server is unreachable, the observation is silently dropped.

Starting the Specula server
---------------------------

[](#starting-the-specula-server)

```
# Download the binary
curl -sSL https://github.com/elvinaqalarov99/specula/releases/latest/download/specula-darwin-arm64 -o specula
chmod +x specula

# Start — proxy on :9999, docs on :7878
./specula start --target http://localhost:3000
```

License
-------

[](#license)

MIT © [Elvin Agalarov](https://github.com/elvinaqalarov99)

###  Health Score

38

—

LowBetter than 84% of packages

Maintenance95

Actively maintained with recent releases

Popularity10

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 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

14

Last Release

54d ago

PHP version history (2 changes)v0.1.0PHP ^8.1

v0.1.1PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/6c179413866673cc414bdbdb937a45296b291c74ec9e4be9969979fa0b53b4f0?d=identicon)[elvinaqalarov99](/maintainers/elvinaqalarov99)

---

Top Contributors

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

---

Tags

laravelswaggeropenapiapi-docsspecula

### Embed Badge

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

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

###  Alternatives

[darkaonline/l5-swagger

OpenApi or Swagger integration to Laravel

2.9k34.0M110](/packages/darkaonline-l5-swagger)[darkaonline/swagger-lume

OpenApi or Swagger integration to Lumen

3372.3M3](/packages/darkaonline-swagger-lume)[kirschbaum-development/laravel-openapi-validator

Automatic OpenAPI validation for Laravel HTTP tests

581.1M5](/packages/kirschbaum-development-laravel-openapi-validator)[scalar/laravel

Render your OpenAPI-based API reference

6183.9k2](/packages/scalar-laravel)

PHPackages © 2026

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