silarhi/llms-txt-bundle
A Symfony bundle that automatically generates an llms.txt file for your site, exposing a clean, markdown-based index of your key pages and documentation so large language models can discover and understand your content.
This is a Symfony bundle (silarhi/llms-txt-bundle), not a Laravel package — there is no service provider or config/llms-txt.php to publish. Everything below assumes a Symfony app; the mental model maps to Laravel (a route-level flag plus a generated artifact), but the wiring does not.
composer require silarhi/llms-txt-bundle, then register it in config/bundles.php (Symfony Flex does this for you).llms_txt route option (attribute #[Route(..., options: ['llms_txt' => ...])] or YAML options:). No flagged routes → nothing meaningful in the output./llms.txt, and confirm the rendered file lists exactly those and nothing else. That round-trip tells you more than the README.discovery.link_header. It is off by default and, as of v1.3.0, is the only feature that pulls in symfony/web-link.debug:router./llms.txt as a build artifact, not a live view. Since v1.3.0 the routes carrying llms_txt are cached in %kernel.build_dir%/llms_txt_routes.php, alongside the compiled routes. In deployment, run cache:warmup as part of your build so the file exists before traffic arrives — this is what makes a read-only build directory work.cache:warmup → cache:clear is no longer just a performance nicety for this bundle; it is the difference between 1.8 ms and 15.9 ms responses at ~1,000 flagged routes (19 ms vs 720 ms at 10,000). Add warmup to the image build, not to the request path./llms.txt looks stale, you are almost certainly not in debug or did not warm up — same failure mode as any other compiled-route staleness.discovery.link_header on, composer require symfony/web-link in the same commit. Do not rely on it arriving transitively.config/bundles.php, route options, cache:warmup, and the Link header — not Laravel middleware, routes files, or Artisan commands.symfony/web-link is now optional (v1.3.0). It was previously pulled in transitively. Two ways this bites:
discovery.link_header without requiring it → the container build fails (not a runtime 500). Loud, but only if you build before you deploy.preload()/link() Twig functions, AbstractController::addLink() — and was silently leaning on the bundle's dependency. That code now breaks; add composer require symfony/web-link explicitly. Audit for these calls when upgrading.llms_txt options fail the /llms.txt requests, not the warmup. cache:warmup will succeed and your deploy goes green; the breakage surfaces on the first real request to the file. Do not treat a successful warmup as validation — smoke-test /llms.txt in your deploy pipeline or a post-deploy check.%kernel.build_dir%, so a container with a read-only build dir works only if cache:warmup ran at build time. Skipping warmup and mounting the build dir read-only will fail at request time.llms_txt_routes.php stale — and they will be stale consistently, which makes it look like a bug in the bundle.preload(/addLink(/link( in templates and controllers before bumping to 1.3.0.How can I help you explore Laravel packages today?