Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Scribe Laravel Package

knuckleswtf/scribe

Scribe generates human-friendly API docs from your Laravel code. It builds a polished single-page HTML site with code samples and “Try It Out”, plus Postman collections and OpenAPI specs. It can infer params from validation and fetch sample responses.

View on GitHub
Deep Wiki
Context7

Scribe generates human-friendly API documentation directly from your Laravel codebase. It produces a polished, single-page HTML site with code samples and an in-browser “Try It Out” tester, while also exporting Postman collections and OpenAPI specs.

It’s smart and flexible: Scribe can infer request parameters from FormRequests/validation rules, call endpoints to capture real sample responses, or generate examples from API Resources/Transformers, with plenty of hooks for customization.

  • Pretty HTML docs with code samples + “Try It Out”
  • Export Postman and OpenAPI (v3.0.3/3.1.0)
  • Auto-extract params from FormRequests/validation rules
  • Generate sample responses (call endpoints or from Resources)
  • Customize UI, ordering, examples, and extraction strategies
Frequently asked questions about Scribe
How do I install Scribe for Laravel 13?
Run `composer require knuckleswtf/scribe` and then execute `php artisan scribe:install`. This sets up the package and config file. Ensure your Laravel app is on PHP 8.1+ and Laravel 10–13 for full compatibility.
Can Scribe generate API docs for non-standard routes (e.g., legacy or dynamic routes)?
Yes, Scribe supports static overrides via `scribe.php` config. Define endpoints manually if they’re not auto-detected, including custom route parameters or middleware. This is useful for legacy APIs or complex dynamic routing.
Will Scribe slow down my production API?
No, Scribe generates documentation statically—there’s zero runtime overhead. Docs are pre-built and served as static files. You can even disable response calls entirely in `scribe.php` for performance-critical environments.
How does Scribe handle validation rules in FormRequests?
Scribe automatically parses validation rules from FormRequests and Laravel’s `validate()` method. It extracts parameter names, types, and rules (e.g., `required|email`) to generate accurate request examples in the docs.
Can I customize the generated OpenAPI spec or Postman collection?
Yes, Scribe allows deep customization. Use the `scribe.php` config to override schemas, add examples, or adjust metadata. For advanced needs, extend strategies or use annotations like `#[Deprecated]` to modify behavior.
Does Scribe support GraphQL or WebSocket APIs?
No, Scribe is designed for RESTful APIs built with Laravel’s routing system. For GraphQL, consider tools like GraphQL Playground or Apollo Server docs. WebSocket APIs would require custom integration or a wrapper to expose REST-like endpoints.
How do I integrate Scribe into my CI/CD pipeline?
Add `php artisan scribe:generate` to your CI script (e.g., GitHub Actions, GitLab CI). Store generated docs in a `public/docs` folder or deploy them to a static host like Netlify. Regenerate docs on every deploy or nightly for consistency.
What if Scribe misses some validation rules or edge cases?
Scribe handles most common validation rules, but custom validators or nested arrays might need manual overrides. Use the `validation` strategy in `scribe.php` to refine parsing or add static definitions for unsupported cases.
Can I use Scribe’s OpenAPI spec to generate client SDKs?
Absolutely. Export the OpenAPI spec (YAML/JSON) and use tools like OpenAPI Generator to create SDKs for JavaScript, Python, or other languages. Scribe’s spec includes all endpoints, parameters, and responses for seamless SDK generation.
How do I handle deprecated endpoints in my API docs?
Use Scribe’s annotations like `#[Deprecated]` in your route or controller code. This marks endpoints in the docs with a warning. For versioned APIs, consider generating separate docs per version or using the `version` config option.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport