PHPackages                             rtfirst/llms-txt - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. rtfirst/llms-txt

ActiveTypo3-cms-extension[Parsing &amp; Serialization](/categories/parsing)

rtfirst/llms-txt
================

LLMs.txt Generator - Generates llms.txt files for AI/LLM crawlers with website content in Markdown format, with optional API key protection.

1.0.11(1mo ago)1179↑689.5%GPL-2.0-or-laterPHPPHP ^8.2 || ^8.3 || ^8.4CI passing

Since Jan 31Pushed 1mo agoCompare

[ Source](https://github.com/rtfirst/llms-txt)[ Packagist](https://packagist.org/packages/rtfirst/llms-txt)[ Docs](https://github.com/rtfirst/llms-txt)[ RSS](/packages/rtfirst-llms-txt/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (8)Versions (14)Used By (0)

TYPO3 Extension: rt\_llms\_txt
==============================

[](#typo3-extension-rt_llms_txt)

[![TYPO3 13](https://camo.githubusercontent.com/2cf6570821614808899422f68a66a381a2de1dd0746ba9cdba6155def1f4f396/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5459504f332d31332d6f72616e67652e737667)](https://get.typo3.org/version/13)[![TYPO3 14](https://camo.githubusercontent.com/382ff45949671f1b9c4431781f1961eb04a15376fe22523e03a9893c6d4ec278/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5459504f332d31342d6f72616e67652e737667)](https://get.typo3.org/version/14)[![Latest Stable Version](https://camo.githubusercontent.com/8649ae38219a92a6f644c89b8805532d06385a6c452e06b4349b86f8a623563d/68747470733a2f2f706f7365722e707567782e6f72672f727466697273742f6c6c6d732d7478742f762f737461626c65)](https://packagist.org/packages/rtfirst/llms-txt)[![CI](https://github.com/rtfirst/llms-txt/actions/workflows/ci.yaml/badge.svg)](https://github.com/rtfirst/llms-txt/actions/workflows/ci.yaml)[![Total Downloads](https://camo.githubusercontent.com/51cac10658bb53d2d262bad839e717e052b5c93ce360d1fe28b6fe482397ed5d/68747470733a2f2f706f7365722e707567782e6f72672f727466697273742f6c6c6d732d7478742f646f776e6c6f616473)](https://packagist.org/packages/rtfirst/llms-txt)[![License](https://camo.githubusercontent.com/c0ac7ec6acd9b7b50717ea10221d0c8cede2ea60e8b397240f182d1fa24ee42f/68747470733a2f2f706f7365722e707567782e6f72672f727466697273742f6c6c6d732d7478742f6c6963656e7365)](https://packagist.org/packages/rtfirst/llms-txt)

Generates `llms.txt` for AI/LLM crawlers - a compact index of your website with SEO metadata and instructions for accessing page content in any language. Optionally protect access with an API key.

> **Note:** This extension implements the [llmstxt.org specification](https://llmstxt.org/).

Concept
-------

[](#concept)

The extension provides a two-tier approach for LLM content access:

1. **llms.txt** - A single index file containing:

    - Website metadata (title, description, domain)
    - Page structure with SEO descriptions and keywords
    - Instructions for accessing full page content
2. **Content Format** - Access page content via (spec-compliant with llmstxt.org):

    - `.md` suffix - Clean Markdown (e.g., `/page.md`)

Multi-Language Support
----------------------

[](#multi-language-support)

Instead of generating separate llms.txt files per language, this extension uses a simpler approach:

- **Single llms.txt** - Contains the site structure in the default language
- **Language-specific content** - Access any page in any language using the `.md` suffix with language URL prefix:
    - Default: `https://example.com/about.md`
    - English: `https://example.com/en/about.md`
    - German: `https://example.com/de/about.md`

This approach is cleaner and follows how multi-language sites actually work.

Features
--------

[](#features)

- **Automatic generation** of llms.txt when TYPO3 cache is cleared
- **Page properties tab**: Configure LLM-specific metadata for each page
- **HTML header link**: Adds `` to HTML pages
- **Clean output formats**: Well-formatted HTML and Markdown without excessive whitespace
- **Flexible configuration**: Via Site Settings and page properties

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

[](#requirements)

- TYPO3 13.0 - 14.x
- PHP 8.2+

Installation
------------

[](#installation)

```
composer require rtfirst/llms-txt
```

Then activate the extension:

```
ddev typo3 extension:setup
ddev typo3 cache:flush
```

Configuration
-------------

[](#configuration)

### Site Settings

[](#site-settings)

Add the Site Set "LLMs.txt Generator" to your site configuration, then configure in Site Settings:

SettingDescription`llmsTxt.baseUrl`Full URL of the website (e.g., `https://example.com`)`llmsTxt.intro`Website description shown in the intro section`llmsTxt.excludePages`Comma-separated page UIDs to exclude`llmsTxt.includeHidden`Include hidden pages (default: false)`llmsTxt.apiKey`API key for protected access (empty = public access)### Page Properties (LLM Tab)

[](#page-properties-llm-tab)

Each page has an "LLM" tab with these fields:

FieldDescription**Exclude from llms.txt**Don't include this page in the index**LLM Priority**Higher values (0-100) appear first in the list**LLM Description**Custom description (fallback: meta description)**LLM Summary**Additional summary text shown as quote**LLM Keywords**Comma-separated topics for this pageOutput File
-----------

[](#output-file)

After cache flush, `llms.txt` is created in `public/`.

Content Access Formats
----------------------

[](#content-access-formats)

### Markdown (`.md` suffix)

[](#markdown-md-suffix)

Returns clean Markdown with YAML frontmatter. Spec-compliant with llmstxt.org.

```
https://example.com/about.md

```

Output:

```
---
title: "About Us"
description: "Learn about our company..."
language: en
date: 2024-06-15
lastmod: 2026-01-31
canonical: "/about"
format: markdown
generator: "TYPO3 LLMs.txt Extension"
---

# About Us

> Learn about our company...

## Our History

Our company was founded in 1985...

## Our Values

- Quality and reliability
- Fair and transparent prices
- Personal consultation
```

### Accessing Different Languages

[](#accessing-different-languages)

Simply use the language prefix with the `.md` suffix:

```
# German (default)
https://example.com/ueber-uns.md

# English
https://example.com/en/about.md

# French
https://example.com/fr/a-propos.md

```

API Key Protection
------------------

[](#api-key-protection)

You can protect both `/llms.txt` and the `.md` suffix endpoint with an API key. This is useful when you want to:

- Restrict access to your own chatbots/RAG systems
- Prevent external scraping of structured content
- Control who can access your LLM-optimized content

### Configuration

[](#configuration-1)

Set the `llmsTxt.apiKey` in your Site Settings. Leave empty for public access (default).

### Usage

[](#usage)

Pass the API key via **HTTP header** (recommended):

```
# Access llms.txt
curl -H "X-LLM-API-Key: your-secret-key" https://example.com/llms.txt

# Access page as Markdown
curl -H "X-LLM-API-Key: your-secret-key" https://example.com/about.md
```

Or via **query parameter**:

```
https://example.com/llms.txt?api_key=your-secret-key
https://example.com/about.md?api_key=your-secret-key

```

### n8n Integration

[](#n8n-integration)

In n8n HTTP Request node, add the header:

NameValue`X-LLM-API-Key``your-secret-key`### Error Response

[](#error-response)

Invalid or missing API key returns `401 Unauthorized`:

```
{
  "error": "Unauthorized",
  "message": "Valid API key required. Provide via X-LLM-API-Key header or api_key query parameter."
}
```

Example llms.txt Output
-----------------------

[](#example-llmstxt-output)

```
# My Website

> Your expert for quality products and services.

**Specification:**
**Domain:** https://example.com
**Language:** de
**Generated:** 2026-01-31 12:00:00

## LLM-Optimized Content Access

This site provides LLM-friendly Markdown output for all pages:

### Markdown Format
Append `.md` to any page URL to get plain Markdown with YAML frontmatter.
- **Example:** `https://example.com/page-slug.md`

### Multi-Language Access
Use language-specific URL prefixes with the `.md` suffix:
- **Default language:** `https://example.com/page.md`
- **English:** `https://example.com/en/page.md`
- **Other languages:** Use configured prefix (e.g., `/de/page.md`, `/fr/page.md`)

## Page Structure

- **[Home](/)**
  Welcome to our website with all important information.
  [Markdown](/index.html.md)

  - **[About](/about/)**
    Learn about our company history and values.
    [Markdown](/about.md)

  - **[Services](/services/)**
    Professional services for your needs.
    *Keywords: services, consulting, support*
    [Markdown](/services.md)

- **[Contact](/contact/)**
  Get in touch with us via phone or email.
  [Markdown](/contact.md)
```

robots.txt Configuration
------------------------

[](#robotstxt-configuration)

Add these lines to your `public/robots.txt` to allow AI crawlers:

```
# Allow AI crawlers to access llms.txt
User-agent: GPTBot
Allow: /llms.txt

User-agent: Claude-Web
Allow: /llms.txt

User-agent: Anthropic-AI
Allow: /llms.txt

```

HTML Header Link
----------------

[](#html-header-link)

The extension automatically adds a link tag to all HTML pages:

```

```

This helps AI crawlers discover the `llms.txt` file from any page.

Development
-----------

[](#development)

### Code Quality

[](#code-quality)

```
# Static analysis (from DDEV project root)
ddev exec vendor/bin/phpstan analyse packages/llms_txt/Classes --level=8

# Code style check
ddev exec vendor/bin/php-cs-fixer fix packages/llms_txt --dry-run

# Fix code style
ddev exec vendor/bin/php-cs-fixer fix packages/llms_txt
```

### Testing

[](#testing)

```
# Run unit tests (from DDEV project root)
ddev exec "cd packages/llms_txt && ../../vendor/bin/phpunit --bootstrap ../../vendor/autoload.php"
```

### CI Pipeline

[](#ci-pipeline)

The extension includes a GitHub Actions workflow (`.github/workflows/ci.yaml`) that runs:

- PHP-CS-Fixer (code style)
- PHPStan Level 8 (static analysis)
- Rector (code modernization)
- Unit Tests (PHP 8.2-8.4, TYPO3 13 &amp; 14)

Author
------

[](#author)

**Roland Tfirst**Email:

License
-------

[](#license)

GPL-2.0-or-later

###  Health Score

48

—

FairBetter than 94% of packages

Maintenance97

Actively maintained with recent releases

Popularity17

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity58

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

Recently: every ~11 days

Total

12

Last Release

47d ago

PHP version history (2 changes)v1.0.0PHP ^8.2

v1.0.5PHP ^8.2 || ^8.3 || ^8.4

### Community

Maintainers

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

---

Top Contributors

[![rtfirst](https://avatars.githubusercontent.com/u/12475241?v=4)](https://github.com/rtfirst "rtfirst (49 commits)")

---

Tags

aiextensionllmllmollms-txtmarkdowntypo3typo3-extensionaimarkdownextensiontypo3llmllms.txt

###  Code Quality

Static AnalysisPHPStan, Rector

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/rtfirst-llms-txt/health.svg)

```
[![Health](https://phpackages.com/badges/rtfirst-llms-txt/health.svg)](https://phpackages.com/packages/rtfirst-llms-txt)
```

###  Alternatives

[spatie/laravel-markdown-response

Serve markdown versions of your HTML pages to AI agents and bots

6512.6k](/packages/spatie-laravel-markdown-response)[georgringer/doc

Render documentation based on markdown files directly in the backend

2232.7k](/packages/georgringer-doc)[leuchtfeuer/locate

Locate - The users country, preferred language and other facts will be detected. Depending on configurable rules the user can be redirected to other languages or pages. Locate also provides geo blocking for configurable pages in configurable countries.

1182.8k](/packages/leuchtfeuer-locate)[markussom/sitemap-generator

Easy to use sitemap generator for pages and records.

1164.9k](/packages/markussom-sitemap-generator)[netresearch/contexts

Multi-channel content visibility for TYPO3 - by Netresearch

1117.4k1](/packages/netresearch-contexts)

PHPackages © 2026

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