PHPackages                             oxhq/oxcribe - 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. oxhq/oxcribe

ActiveLibrary[API Development](/categories/api)

oxhq/oxcribe
============

Runtime-first Laravel package that enriches routes with Oxinfer static analysis

v0.1.4(3mo ago)016MITPHP ^8.2CI passing

Since Mar 26Compare

[ Source](https://github.com/oxhq/oxcribe)[ Packagist](https://packagist.org/packages/oxhq/oxcribe)[ RSS](/packages/oxhq-oxcribe/feed)WikiDiscussions Synced 3w ago

READMEChangelog (5)Dependencies (12)Versions (6)Used By (0)

Oxcribe
=======

[](#oxcribe)

`Oxcribe` is a runtime-first Laravel package for generating and publishing API docs from the routes, middleware, bindings, and responses your app actually serves.

It boots Laravel, captures the real route graph, sends a strict `AnalysisRequest` to `oxinfer`, and merges runtime truth with static analysis before emitting OpenAPI and docs payloads.

Status
------

[](#status)

`v0.1.4` is the current public preview release of `oxcribe`.

This release is aimed at Laravel teams that already ship APIs and want accurate docs without hand-maintained OpenAPI files. It is ready for real-world preview use on Laravel API projects, but it should still be treated as an early release: validate the output on your own routes before rolling it into a production docs workflow.

Why Oxcribe
-----------

[](#why-oxcribe)

- use Laravel runtime as the source of truth for routes, middleware, guards, and bindings
- enrich runtime truth with `oxinfer` static analysis for request fields, resources, examples, and response overlays
- publish the same normalized docs payload to a local viewer or to `oxcloud`

The intended launch path is simple:

1. Install `oxcribe` inside the Laravel app.
2. Install or point to an `oxinfer` binary.
3. Issue one project-scoped publish token from Oxcribe Cloud.
4. Run `php artisan oxcribe:doctor`.
5. Run `php artisan oxcribe:publish`.
6. Open the hosted docs, explorer, and changelog for that version.

What It Owns
------------

[](#what-it-owns)

- boots Laravel and snapshots real routes, middleware, bindings and action references
- keeps runtime auth/security as the source of truth for OpenAPI `security`
- merges static controller analysis, resources, request/response overlays and authorization hints from `oxinfer`
- exports an OpenAPI document with `x-oxcribe.*` metadata for runtime and static provenance

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

[](#requirements)

- PHP `8.2+`
- Laravel `10`, `11`, `12` or `13`
- a local `oxinfer` binary available on `PATH`, placed at `bin/oxinfer` inside the Laravel app, or configured in `config/oxcribe.php`

`oxinfer` is the Rust analysis engine behind `oxcribe`. Build it like this:

```
cargo build --locked --release
cargo test --locked
```

If `oxinfer` is not on `PATH`, either place it at `bin/oxinfer` in the Laravel app or point `oxcribe.oxinfer.binary` to the built binary.

Install
-------

[](#install)

```
composer require oxhq/oxcribe
php artisan vendor:publish --tag=oxcribe-config
```

If you do not already have `oxinfer`, install the matching release binary directly from GitHub:

```
php artisan oxcribe:install-binary v0.1.4
```

That command detects the local OS and architecture, downloads the release asset from `oxhq/oxinfer`, verifies its SHA-256 checksum, and installs it into the app-local binary path that `oxcribe` already resolves.

Minimal Config
--------------

[](#minimal-config)

```
// config/oxcribe.php
return [
    'oxinfer' => [
        'binary' => env('OXINFER_BINARY', 'oxinfer'),
        'working_directory' => env('OXINFER_WORKING_DIRECTORY'),
        'timeout' => (int) env('OXINFER_TIMEOUT', 120),
    ],
];
```

Commands
--------

[](#commands)

```
php artisan oxcribe:analyze
php artisan oxcribe:export-openapi
php artisan oxcribe:publish
php artisan oxcribe:doctor
php artisan oxcribe:install-binary v0.1.4
```

Both commands support `--write=/absolute/path.json` and `--pretty`. `oxcribe:publish` pushes the current OpenAPI document and `oxcribe.docs.v1` payload to `oxcloud`.

Docs Data Endpoints
-------------------

[](#docs-data-endpoints)

`oxcribe` exposes stable JSON endpoints. The package owns the data contract; your local app or `oxcloud` can render any viewer on top of it.

Enable docs in `config/oxcribe.php`:

```
'docs' => [
    'enabled' => true,
    'route' => 'oxcribe/docs',
    'openapi_route' => 'oxcribe/openapi.json',
    'payload_route' => 'oxcribe/docs/payload.json',
],
```

Routes provided by the package:

- `GET /oxcribe/docs`
- `GET /oxcribe/openapi.json`
- `GET /oxcribe/docs/payload.json`

`/oxcribe/docs` is a package-owned local Vue viewer, similar in spirit to how Scramble serves its UI from the package itself. The OpenAPI route is the canonical machine-readable document. The payload route returns the richer `oxcribe.docs.v1` viewer payload, including generated examples, snippets, runtime metadata, and component schemas. `oxcloud` can consume that same payload contract and host a more advanced version of the same experience.

Publish To Oxcloud
------------------

[](#publish-to-oxcloud)

Configure the publish target:

```
OXCLOUD_BASE_URL=https://oxcloud.example.test
OXCLOUD_TOKEN=your-project-publish-token
OXCLOUD_TIMEOUT=30
OXCLOUD_DEFAULT_VERSION=dev
```

Then publish:

```
php artisan oxcribe:doctor
php artisan oxcribe:publish
php artisan oxcribe:publish --publish-version=2026.03.25
```

On success the command prints:

- the hosted version URL
- the explorer URL for the same version
- the changelog URL for the same version
- the project latest URL

The command sends:

- `contractVersion = "oxcloud.publish.v1"`
- `version`
- `openapi`
- `docsPayload`
- `source.appName`
- `source.appUrl`
- `source.framework = "laravel"`
- `source.packageVersion = "oxcribe v0.1.4"`

Overrides
---------

[](#overrides)

Runtime is the primary source of truth, but `oxcribe` also supports route-level overrides through `.oxcribe.php` or `oxcribe.overrides.php`.

- docs: [docs/overrides.md](docs/overrides.md)
- minimal example: [docs/minimal.oxcribe.php](docs/minimal.oxcribe.php)

Supported Stacks
----------------

[](#supported-stacks)

- Laravel core request/response/resource patterns
- runtime auth and middleware-derived OpenAPI security
- first-class publish visibility via `oxcribe.publish` / `oxcribe.private` middleware markers
- Inertia transport metadata
- Spatie `laravel-data`, `laravel-query-builder`, `laravel-permission`, `laravel-medialibrary` and `laravel-translatable`

Current Limits
--------------

[](#current-limits)

- `security` is derived from runtime middleware/auth, not from static authorization hints
- static authorization hints are exposed under `x-oxcribe.authorizationStatic`
- Livewire and non-Laravel stacks are out of scope
- preview release: validate generated docs on your own routes before depending on them as the only source of truth
- the local viewer is package-owned and does not depend on publishing frontend stubs into the host app

Package Docs
------------

[](#package-docs)

- installation: [docs/installation.md](docs/installation.md)
- troubleshooting: [docs/troubleshooting.md](docs/troubleshooting.md)
- compatibility and fixtures: [docs/compatibility.md](docs/compatibility.md)
- overrides: [docs/overrides.md](docs/overrides.md)
- release checklist: [docs/release.md](docs/release.md)

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance82

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity40

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 ~7 days

Total

5

Last Release

92d ago

### Community

Maintainers

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

---

Top Contributors

[![garaekz](https://avatars.githubusercontent.com/u/14919842?v=4)](https://github.com/garaekz "garaekz (18 commits)")

---

Tags

laravelstatic analysisopenapiapi-documentationoxinfer

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/oxhq-oxcribe/health.svg)

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

###  Alternatives

[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

77922.3M186](/packages/laravel-mcp)[psalm/plugin-laravel

Psalm plugin for Laravel

3345.3M347](/packages/psalm-plugin-laravel)[laravel/surveyor

Static analysis tool for Laravel applications.

86121.4k14](/packages/laravel-surveyor)[api-platform/laravel

API Platform support for Laravel

58174.6k17](/packages/api-platform-laravel)

PHPackages © 2026

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