Scribe is an open-source Laravel package that automatically generates human-friendly API documentation from your existing codebase. It turns your routes, controllers, FormRequests, and Eloquent API Resources into ready-to-publish docs, so you don't write or maintain a documentation site by hand.
What is Scribe?
Scribe is an open-source PHP package for Laravel that turns your routing, controllers, FormRequests, and Eloquent API Resources into ready-to-publish API documentation. You run Scribe against a Laravel codebase and it outputs a single-page HTML reference, a Postman collection, and an OpenAPI specification in either v3.0.3 or v3.1.0. The project is maintained on GitHub under the knuckleswtf namespace and distributed through Packagist.
What makes Scribe stand out?
Scribe distinguishes itself by extracting documentation details directly from the code that defines your API. It can read request parameters from FormRequests or validation rules, call endpoints safely to capture sample responses, and derive response shapes from Eloquent API Resources or Transformers. The generated HTML includes code samples and an in-browser "Try It Out" tester, while the OpenAPI export remains usable for any OpenAPI-compatible tool. Customization is built in: you can rewrite text, reorder sections, swap the UI, add custom extraction strategies, or define extra endpoints that your routes alone would miss.
- Human-friendly HTML output — Generates a single-page HTML doc with readable text, code samples, and an in-browser "Try It Out" API tester.
- Postman collection generation — Exports a ready-to-import Postman collection so you can start testing immediately.
- OpenAPI spec export — Emits OpenAPI v3.0.3 or v3.1.0 JSON/YAML for integration with Swagger UI and other tools.
- Smart parameter extraction — Pulls request parameter details from FormRequests and validation rules, keeping docs in sync with validation logic.
- Sample response generation — Safely calls endpoints or inspects Eloquent API Resources and Transformers to produce realistic responses.
- UI and strategy customization — Lets you modify text, ordering, and examples, or write custom strategies to control extraction.
Who is Scribe for?
Scribe is built for Laravel developers who maintain APIs and want documentation that stays in step with the code. It suits both small projects and larger API teams who need consistent output formats. Teams that require OpenAPI specifications for code generation, contract testing, or API gateways benefit from the automatic spec export. Developers who want to share an interactive, friendly reference with frontend colleagues can use the HTML output with its built-in tester.
What can you do with Scribe?
- API maintainers: regenerate docs automatically whenever routes or validation rules change, then publish the updated HTML or spec.
- Frontend developers: use the "Try It Out" tester in the generated HTML to experiment with endpoints before writing any client code.
- Integrations engineers: export the OpenAPI spec and feed it into client generators, mock servers, or service mesh tooling.
How does Scribe work?
Scribe analyzes your Laravel routes and controllers, extracting request and response details from configuration, FormRequests, validation rules, and Eloquent API Resources. It can make safe calls to your endpoints to capture real sample responses. The extraction process can be customized through strategies, and you can add endpoints or documentation blocks manually.
Pricing
Scribe is an open-source package distributed for free through Packagist, so you can use it without a paid license.
Alternatives
- Swagger UI, which renders OpenAPI specs in a web interface rather than generating docs from code.
- ReDoc, another OpenAPI documentation renderer that focuses on a clean, single-page layout.
FAQ
Is Scribe free?
Yes, Scribe is open-source and free to use. It is distributed through Packagist as knuckleswtf/scribe, and its code is available on GitHub.
Does Scribe require Postman?
No, Scribe does not require Postman. It can generate a Postman collection as an export format, but you can also rely on the HTML documentation or the OpenAPI spec.
What does Scribe generate?
Scribe produces a single-page HTML documentation site with an interactive API tester, a Postman collection, and an OpenAPI specification in version 3.0.3 or 3.1.0.
How does Scribe get sample responses?
Scribe can safely call your endpoints during generation to capture real responses, or it can infer response shapes from Eloquent API Resources or Transformers you have defined.
Can I customize Scribe's output?
Yes. You can adjust the text, ordering, and examples in the generated docs, replace the UI entirely, add custom extraction strategies, and statically define extra endpoints not discoverable from your routes.





