# purpletree/magento2-llms-txt-generator

> Magento 2 LLMs TXT Generator - Generate and auto-update llms.txt for better AI visibility

`composer require purpletree/magento2-llms-txt-generator`

Canonical URL: https://packagento.com/purpletree/magento2-llms-txt-generator

## At a glance

- **Vendor**: Purpleteree Software LLP (https://packagento.com/purpletree.md)
- **Latest version**: 1.0.0 — released 2026-07-07
- **Pricing**: Free
- **Package type**: Magento 2 module
- **Status**: active, accepting new buyers

## Installation

Packagento is licence-gated, so even free packages need a licence on a project before Composer can resolve them.

1. **Sign in or create an account** at https://packagento.com/customer/account/.

2. **Add the package to your account.** Open https://packagento.com/purpletree/magento2-llms-txt-generator and complete the free checkout. A licence is minted automatically.

3. **Create or pick a project, then activate the licence on it.**
   - Projects represent the Magento installs you deploy to. Manage them at https://packagento.com/projects/.
   - Activate the new licence on the project you'll deploy this package to. Activation is what generates the Composer credentials scoped to that project.

4. **Add the project credentials to your Magento codebase.**

   Grab the project's public + private key from https://packagento.com/projects/ (open the project, then its Credentials tab), and add them to `auth.json`:

   ```json
   {
     "http-basic": {
       "packagento.com": {
         "username": "ppk_live_...",
         "password": "psk_live_..."
       }
     }
   }
   ```

   Add the Packagento Composer repository to `composer.json`:

   ```json
   {
     "repositories": [
       { "type": "composer", "url": "https://packagento.com" }
     ]
   }
   ```

5. **Install and apply.**

   ```bash
   composer require purpletree/magento2-llms-txt-generator:*
   bin/magento setup:upgrade
   bin/magento setup:di:compile
   bin/magento cache:flush
   ```

## What it does

Magento 2 LLMs TXT Generator - Generate and auto-update llms.txt for better AI visibility

## README

### Overview
This extension allows you to generate and auto-update an `llms.txt` file for your Magento 2 store. The llms.txt file helps AI systems understand your store content better and improves AI visibility and citations.

### Features
- **Automatic Generation**: Schedule automatic generation of llms.txt file via cron
- **Manual Generation**: Generate the file instantly from admin panel
- **Company Information**: Add company name and description to the file
- **Store URL**: Include your store base URL in the file
- **Product Inclusion**: Include products with customizable fields
- **Category Inclusion**: Add store categories with custom attributes
- **CMS Pages**: Include CMS pages with selectable fields
- **Blog Support**: Full support for:
  - Blog Categories
  - Blog Posts
  - Blog Tags
  - Blog Authors
- **Custom Content**: Add markdown content to the end of the file
- **Error Handling**: Get email notifications for generation errors
- **Flexible Configuration**: Select specific fields/attributes for each content type
- **Per-Item Control**: Override settings at product, category, page, or post level

### Installation

#### Via Composer
```bash
composer require purpletree/magento2-llms-txt-generator
php bin/magento module:enable Purpletree_LlmsTxtGenerator
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy
```

#### Manual Installation
1. Extract the extension files to `app/code/Purpletree/LlmsTxtGenerator/`
2. Run the following commands:
```bash
php bin/magento module:enable Purpletree_LlmsTxtGenerator
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy
```

### Configuration

Navigate to **Stores > Configuration > Magefan Extensions > LLMs TXT Generator**

#### General Settings
- **Enable Extension**: Enable/disable the entire extension

#### Company Information
- **Company Name**: Main heading for the llms.txt file
- **Company Description**: Brief summary of your business

#### Store URL Options
- **Include in LLMs.txt**: Add store base URL to the file

#### Categories Options
- **Include in LLMs.txt**: Enable/disable category inclusion
- **Use Fields**: Select category attributes to include (Children Count, Description, Level, Name, etc.)
- **Max. Number To Include**: Maximum categories to include

#### Products Options
- **Include in LLMs.txt**: Enable/disable product inclusion
- **Use Fields**: Select product attributes to include (Categories, Description, Name, Price, SKU, etc.)
- **Max. Number To Include**: Maximum products to include (default: 100)

#### CMS Pages Options
- **Include in LLMs.txt**: Enable/disable CMS page inclusion
- **Use Fields**: Select page fields (Title, Content, Meta Description, etc.)
- **Max. Number To Include**: Maximum CMS pages to include (default: 50)

#### Blog Category Options
- **Include in LLMs.txt**: Enable/disable blog category inclusion
- **Use Fields**: Select attributes to include
- **Max. Number To Include**: Maximum blog categories (default: 50)

#### Blog Posts Options
- **Include in LLMs.txt**: Enable/disable blog post inclusion
- **Use Fields**: Select post fields to include
- **Max. Number To Include**: Maximum blog posts (default: 100)

#### Blog Tags Options
- **Include in LLMs.txt**: Enable/disable blog tag inclusion
- **Use Fields**: Select tag attributes to include
- **Max. Number To Include**: Maximum blog tags (default: 50)

#### Blog Authors Options
- **Include in LLMs.txt**: Enable/disable blog author inclusion
- **Use Fields**: Select author fields (Bio, Meta fields, etc.)
- **Max. Number To Include**: Maximum blog authors (default: 20)

#### Custom Content
- **Custom Content**: Add markdown-formatted content to append at the end of llms.txt

#### Generation Settings
- **Enabled**: Enable automatic cron-based generation
- **Error Email Recipient**: Email address for error notifications
- **Error Email Sender**: Email identity for error emails
- **Error Email Template**: Template for error email
- **Frequency**: Generation frequency (Daily, Weekly, Monthly)
- **Start Time**: Time to start generation (24-hour format)
- **Generate LLMs.txt**: Button to manually generate the file immediately
- **LLMs.txt File(s)**: Displays URL to the generated file

### Usage

#### Automatic Generation
1. Enable "Enable Automatic Generation" in Generation Settings
2. The file will be generated automatically via cron at the scheduled time
3. Check for error emails if generation fails

#### Manual Generation
1. Go to **Stores > Configuration > Magefan Extensions > LLMs TXT Generator**
2. Scroll to Generation Settings section
3. Click the "Generate Now" button
4. A success or error message will be displayed

#### Per-Item Configuration
You can override global settings for specific items:
- For **Products**: Go to Catalog > Products, scroll to "Generative Engine Optimization"
- For **Categories**: Go to Catalog > Categories, scroll to "Generative Engine Optimization"
- For **CMS Pages**: Go to Content > Pages, scroll to "Generative Engine Optimization"
- For **Blog Items**: Access through the respective blog admin sections

Set "Include in LLMs.txt" to "Yes" (with higher priority) or "No" to override global settings

#### Access the File
The generated llms.txt file is located at:
```
https://yourstore.com/llms.txt
```

### File Structure
The generated llms.txt file includes:
```markdown
## Company Name

Company Description

### Store URL
https://yourstore.com/

### Products
#### Product Name
URL: https://yourstore.com/product-url
selected_field_1: value
selected_field_2: value

### Categories
#### Category Name
URL: https://yourstore.com/category-url
selected_field_1: value

### CMS Pages
#### Page Title
content_preview...

### Blog Categories
#### Category Name
content...

### Blog Posts
#### Post Title
short_content...

### Blog Tags
#### Tag Name
content...

### Blog Authors
#### Author Name
author_bio...

### Custom Content
Your custom markdown content...
```

_(README truncated for .md surface. Full README on https://packagento.com/purpletree/magento2-llms-txt-generator.)_

## Recent Versions

| Version | Released |
|---|---|
| 1.0.0 | 2026-07-07 |

## Dependencies

### Require

| Package | Constraint |
|---|---|
| magento/framework | >=103.0 <104.0 |
| magento/module-catalog | >=104.0 <105.0 |
| magento/module-cms | >=104.0 <105.0 |
| magento/module-store | >=101.1 <102.0 |
| php | ~8.3.0 \|\| ~8.4.0 \|\| ~8.5.0 |

## Quality

Latest release (1.0.0) fails the Packagento QA pipeline. Verdicts below are per-cell (Magento line × PHP version) for the matrixed tools, and run-once for the static / security tiers.


### Compatibility

Each Magento line is installed on its supported PHP versions, then the module is built (DI compile + static-content deploy). Cells show passed / failed / untested; staircase gaps render as `–`.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | not tested | Pass | – | – |
| 2.4.8 | – | Pass | Pass | – |
| 2.4.9 | – | – | Pass | Pass |


### Code Quality

Advisory checks against the module's source. Never affect the Compatibility verdict — a phpcs finding can't make a module incompatible.

#### Static Analysis

Coding standards (phpcs), mess detection (phpmd), copy-pasted code (cpd), PHP cross-version compatibility, composer.json validity. Each runs once for the whole module.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| PHPCS | Warning | 82 | 82 warnings (ruleset: Magento2), 1 auto-fixable with phpcbf |
| PHPMD | Warning | 9 | 9 rule violations (UnusedFormalParameter:4, MissingImport:3, CyclomaticComplexity:1, NPathComplexity:1) |
| Cpd | Pass | 0 |  |
| Composer validate | Info | 1 | valid; 1 advisory note (composer validate --strict) |

#### PHPStan

Type-checks the module against a real Magento install. Re-runs per Magento + PHP version because resolvable symbols differ between releases.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | 11 | – | – |
| 2.4.8 | – | 11 | 11 | – |
| 2.4.9 | – | – | 10 | 10 |


### Tests

Unit and integration suites run per Magento + PHP cell. Test failures speak to the module's behaviour, not its compatibility with a line, so they're reported here separately.

#### Unit Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | – | – |
| 2.4.8 | – | N/A | N/A | – |
| 2.4.9 | – | – | N/A | N/A |

#### Integration Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | – | – |
| 2.4.8 | – | N/A | N/A | – |
| 2.4.9 | – | – | N/A | N/A |


### Security

Dependency-advisory audit (composer audit) plus a source malware scan. A malware detection fails the version outright.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| Composer audit | Pass | 0 |  |
| Malware scan | Pass | 0 |  |

## Licence and pricing

Free. A licence is still minted on checkout and bound to your project for Composer access — no payment step.

Refundable within 14 days of first purchase via https://packagento.com/account/refunds/.

## Install via Claude Code or any MCP client

The Packagento MCP server can run the licence + project + Composer steps above in one tool call:

```
purchase_and_install_packages(
  composer_names=["purpletree/magento2-llms-txt-generator"],
  project_id="proj_xxx"
)
```

This handles cart, checkout, licence minting, project activation, and writes auth.json credentials. Connect a client with `claude mcp add packagento https://mcp.packagento.com`. Full setup at https://packagento.com/docs/mcp-setup.

## Vendor

Purpleteree Software LLP is a Magento 2 vendor on Packagento. See https://packagento.com/purpletree.md for their full catalogue.

