Weave 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 documentation from your Laravel codebase. It extracts request parameters from FormRequests or validation rules, calls endpoints for sample responses, and outputs a single-page HTML doc with a Try It Out tester, plus Postman collections and OpenAPI specs.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit

  • Scribe is a code-first documentation generator that runs as an artisan command inside an existing Laravel application. It is a build/CI artifact producer, not a runtime dependency, so it sits outside the request path and carries no production blast radius if scoped correctly (require-dev, generation in CI only).
  • It exploits conventions the team already maintains — route definitions, FormRequests, validation rules, API Resources/Transformers — so it converts existing code into docs rather than creating a second specification to maintain. That is the core architectural argument: one source of truth (the code) with docs as a derived output.
  • Output targets are the right three for most orgs: single-page HTML with "Try It Out" for humans, Postman collection for QA/onboarding, and OpenAPI 3.0.3 or 3.1.0 for gateways, SDK generation, and contract tooling. Providing all three from one extraction pass is the main leverage point.
  • Extensibility is adequate for a non-fork path: custom extraction strategies, static endpoint definitions for routes not in the codebase (webhooks, third-party APIs), and the afterExtracting hook for post-processing. This matters because every org has edge cases Scribe will not infer.

Integration feasibility

  • Low-friction proof of concept: install, publish config, run php artisan scribe:generate, inspect output. A TPM can realistically timebox this to a one-day spike on a single bounded API module before committing.
  • The real work is not installation but configuration and governance: grouping endpoints, auth/header documentation, environment-specific base_url (Blade syntax supported), and deciding whether response calls are permitted.
  • Risk concentrates in the "response calls" feature — Scribe will execute real HTTP requests against your app to capture sample responses. This is high-value and high-risk simultaneously: it produces accurate examples but requires a dedicated environment, seeded database, and stubbed outbound integrations.

Technical risk

  • Side effects from response calls (highest): writes to a database, dispatched jobs, outbound emails/webhooks, third-party API calls, rate limits, cost. Must be gated to an isolated environment and audited per-endpoint.
  • Extraction edge cases: the changelog shows a dense, repeated pattern of fixes in exactly the areas that matter — arrays of objects in validation rules, array-of-strings required fields, nested BelongsTo loading in ResponseFromApiResource, resource constructors that enforce types, nullable response fields, invalid UTF-8 in Postman output, HTML escaping in the Try It Out panel. This is evidence of active maintenance, but also of a non-trivial long tail on complex models.
  • Drift and non-determinism: docs derived from live app state mean the generated artifact can change without a doc-specific commit. Without a CI check, docs silently rot.
  • Governance risk: if OpenAPI is already the org's contract source of truth, Scribe inverts the direction (code → spec). Adopting it without resolving that creates two competing specifications.
  • Bus factor / support model: MIT-licensed, community-maintained, effectively single-maintainer-driven with a commercial course attached. No support SLA. Mitigation is version pinning plus the ability to vendor a fork.

Key questions

  • Which environment will run generation, and are response calls permitted there? Who signs off?
  • Is OpenAPI a build output or the contract source of truth? If the latter, do we accept generated specs as a downstream reconciliation step?
  • Which downstream consumers will read the OpenAPI output — gateway, SDK generator, contract tests — and do they require 3.0.3 vs 3.1.0?
  • Are docs published publicly or gated? The Try It Out panel exposes the full API surface and example payloads.
  • Do we have multi-version APIs, webhooks, or non-Laravel services that need static/merged definitions?
  • Who owns the docs artifact and the CI gate that keeps it current?

Integration Approach

Stack fit

  • Native Laravel package, PHP 8.4-compatible (Parsedown dependency was swapped specifically for 8.4), with dependency bumps tracked for Laravel 13 and symfony/yaml v8. Forward compatibility signals are strong.
  • Fits an existing Laravel monolith or modular API without architectural change. For multi-service estates, Scribe covers the Laravel services only; non-Laravel services need a spec-merge step, which is where static endpoint definitions and OpenAPI merging do part of the job but not all of it.

Migration path

  • If the team currently writes OpenAPI by hand or uses annotations-based tooling, the migration is: run Scribe in parallel, diff generated spec against the hand-maintained spec, classify gaps as (a) Scribe extraction failures to fix via strategies, (b) genuine doc errors in the legacy spec, or (c) intentional manual content to preserve as overrides.
  • Teams on Scribe 4.x face a 5.0 migration (documented migration guide; shift toward PHP attributes for params and #[Deprecated]). Budget this as real work if the codebase is annotation-heavy.
  • From nothing: greenfield, no migration cost, but also no baseline to validate extraction accuracy against — make the pilot module the baseline.

Compatibility

  • Pin the minor version. Eleven minor releases in the 5.x line with frequent edge-case fixes cuts both ways: active maintenance, but a moving target if you float the constraint.
  • Choose the OpenAPI version deliberately at config time (openapi.version); 3.1's JSON-Schema-style nullable syntax is not universally supported by older gateway/tooling stacks.
  • Response-call support for streamed responses and custom response content types (problem+json) exists, but validate against your actual response shapes before assuming universal coverage.

Sequencing

  1. Spike: one bounded API module, no response calls, HTML + OpenAPI output reviewed by the API owner.
  2. Enable response calls in an isolated environment with a seeded DB and stubbed outbound clients; audit endpoints for side effects endpoint-by-endpoint.
  3. Add a CI job that generates and fails on uncommitted diff — this is the gate that prevents drift.
  4. Publish the HTML artifact to an internal docs site; distribute the Postman collection to QA as a secondary win.
  5. Wire OpenAPI output into whatever consumes it (gateway import, contract tests, SDK generation) only after step 3 is stable.
  6. Expand module-by-module, adding custom strategies and static definitions for gaps.

Operational Impact

Maintenance

  • Ongoing cost is low but non-zero: config upkeep, occasional strategy customization for complex models, and version bumps. The dominant recurring cost is the CI drift gate and the discipline to treat failed generation as a build failure, not a warning.
  • Custom strategies become internal code with internal owners. Budget for that explicitly; it is the main place a fork-like maintenance burden can accumulate.

Support

  • Community support via GitHub issues, no vendor SLA, no commercial backing tier. Acceptable for a documentation tool where failure degrades to "stale docs," unacceptable if docs become a contractual deliverable to external partners. In that case, treat the pinned version as hardened and own the fork.
  • The maintainer's paid course is a signal that first-class output requires real investment in doc quality — Scribe generates the skeleton, not the narrative.

Scaling

  • Generation is a batch CLI job; runtime scales with route count and, far more expensively, with the number of response calls (serial HTTP requests). Parallelism exists in spec generation but not fully across response calls.
  • For large APIs, expect generation time to become a CI cost. Split by API group/version and cache where possible. Do not run generation on every commit if the API surface is large — run on merge to main plus a nightly full build.

Failure modes

  • Generation crashes on unhandled validation-rule or resource shapes → CI red, docs frozen at last good artifact. Acceptable if the gate is in place.
  • Response calls mutate shared state or hit live third parties → data pollution, duplicate notifications, billing. This is the one failure mode that can cause real damage; environment isolation and a per-endpoint allowlist are mandatory controls.
  • Silent drift where generation succeeds but output is wrong (missed params, wrong required flags, wrong nullability) → worse than no docs, because it is trusted. Mitigate with spot-review of generated specs against actual behavior and consumer feedback.
  • Try It Out panel pointed at a production base URL → unauthenticated or malformed requests against live data. Restrict the published doc's target environment.

Ramp-up

  • Initial ramp is genuinely low: an engineer can produce a working doc set in hours. Proficiency in custom strategies, response-call safety, and spec merging takes longer and should be concentrated in one owner.
  • Plan for a short internal enablement session for API authors on how to shape FormRequests and Resources so extraction produces good docs — the package's quality is bounded by the quality of the code it reads.
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.
thomas-0816/doctrine-dbal-duckdb
moyisoft/laravel-admin
oxygen/mod-pages
oxygen/mod-import-export
oxygen/mod-media
ksoft/laravel-contentbuilderjs
ourgoldpackages/exchange
mikkimike/laravel-exchange1c
wandesnet/mercadopago-laravel
tsfcorp/email
larafony/core
laravel-enso/currencies
tartan/laravel-online-payment
gam/laravel-sat-catalogs
cloudcreativity/laravel-stripe
abdulelahragih/querybuilder
wedevbr/celcoin-laravel
surazdott/nepali-date
devsquad-cockpit/laravel
coding-socks/laravel-upload-handler