# How to generate llms.txt for Magento 2 in 5 minutes

> Generate llms.txt and llms.jsonl for your Magento 2 store in under 5 minutes. Free MIT module, CLI commands, multi-store, cron. Step-by-step guide.

Source: https://angeo.dev/how-to-generate-llms-txt-for-magento-2-in-5-minutes/
Updated: 2026-09-29

AI assistants like ChatGPT, Claude, and Gemini are becoming product discovery channels. But unlike Google, they don't crawl your store automatically  -  they need a structured file to understand what you sell.

That file is `llms.txt`. And for Magento 2, you can generate it in under 5 minutes with a free open-source module.

Here's how.

[image: Tutorial: generate llms.txt file for Magento 2 to improve AI search visibility in ChatGPT and LLMs]

## What Is llms.txt and Why Does Magento Need It?

`llms.txt` is a plain-text Markdown file placed at your store root (e.g., `https://yourstore.com/llms.txt`). It tells AI systems what your store is, what categories you have, what products you sell, and what CMS pages exist  -  all in a clean, readable format.

Think of it as `sitemap.xml` for AI. But instead of listing every URL for crawlers, it curates the most important content for language models.

Without `llms.txt`, an AI assistant trying to recommend your products must parse:

- Navigation menus

- Cookie consent banners

- JavaScript-rendered widgets

- Footer links and sidebars

With `llms.txt`, the AI gets clean, structured context  -  instantly.

## Step 1: Install the Module via Composer

SSH into your Magento 2 server and run:

```
composer require angeo/module-llms-txt
bin/magento setup:upgrade
bin/magento cache:flush
```

That's it for installation. The module [angeo/module-llms-txt](https://packagist.org/packages/angeo/module-llms-txt) is free, MIT-licensed, and available on Packagist. It generates both `llms.txt` and `llms.jsonl` (the structured JSON variant for product catalogs).

## Step 2: Configure in Magento Admin

Navigate to:

```
Stores -> Configuration -> Angeo -> LLMs.txt
```

Here you can:

- Trigger manual generation immediately

Click **Generate Now** (or your equivalent button) to create the files immediately.

## Step 3: Verify the Generated Files

Open your browser and check:

- `https://yourstore.com/llms.txt`

- `https://yourstore.com/llms.jsonl`

You should see something like this for `llms.txt`:

```
# Example Store

> Outdoor and hiking gear, shipped across the Netherlands and Belgium.

## Categories

- [Jackets](https://yourstore.com/jackets.md): Waterproof shells and insulated jackets
- [Backpacks](https://yourstore.com/backpacks.md): Day packs and trekking packs

## Products

- [Alpine Hiking Jacket](https://yourstore.com/alpine-jacket.md): 3-layer shell, EUR 189.99, in stock

## Pages

- [Delivery](https://yourstore.com/delivery.md): Costs and delivery times
- [Returns](https://yourstore.com/returns.md): 30-day returns
```

This is the llms.txt v2 shape the module produces since version 4.0: an H1, a one-line summary, and sections of links. With Markdown mirrors switched on, the links point to the `.md` version of each page. See [llms.txt - definition](https://angeo.dev/llms-txt-definition/).

If both files load correctly with a `200 OK` status, you're done.

## Step 4: Enable Cron for Automatic Updates

Product prices, stock levels, and catalog content change frequently. Set up automatic regeneration so your AI files always reflect your current catalog.

If Magento cron is already running on your server, simply enable cron generation in the module config. If not, add the standard Magento cron entry:

```
# crontab -e
* * * * * php /var/www/html/bin/magento cron:run 2>&1
```

Then run once manually to confirm:

```
bin/magento cron:run
```

The module will then automatically regenerate `llms.txt` and `llms.jsonl` on schedule.

## Multi-Store Setup

If you run multiple store views (e.g., English + Dutch, or separate B2B/B2C stores), the module handles this natively. Each store view generates its own files scoped to that store's products, categories, and CMS pages.

This means AI systems accessing your Dutch store view get Dutch product names and descriptions  -  not a mix of languages.

## What Gets Generated  -  Full Overview

| File | Format | Contents | Best for |

| `llms.txt` | Markdown | Store info, categories, products, CMS pages | AI context & navigation |

| `llms.jsonl` | Line-delimited JSON | Structured product objects with attributes | AI product queries & recommendations |

Both files are placed in your Magento pub/ directory and served as static files  -  no performance impact on your store.

## Checklist: You're Done When...

- [yes] `composer require angeo/module-llms-txt` ran successfully

- [yes] `bin/magento setup:upgrade` completed

- [yes] Files visible at `/llms.txt` and `/llms.jsonl`

- [yes] Both files return HTTP 200

- [yes] Cron configured for automatic regeneration

- [yes] Multi-store views configured if applicable

## Why This Matters Now

In 2026, AI assistants have become a primary product discovery channel for a growing segment of online shoppers. Users ask ChatGPT "what's the best waterproof hiking jacket" and follow the recommendation directly  -  without ever visiting Google.

Stores that provide structured, machine-readable content to AI systems get recommended. Stores that don't remain invisible  -  regardless of how good their products are.

`llms.txt` and `llms.jsonl` are the minimum viable implementation. Five minutes of setup. Potentially significant visibility gain as AI commerce grows.

## Module Details

- **Package:** [angeo/module-llms-txt](https://packagist.org/packages/angeo/module-llms-txt)

- **License:** MIT (free, open-source)

- **Compatibility:** Magento 2.4.x (Open Source, Adobe Commerce, Cloud), PHP 8.2-8.5

- **Last update:** September 2026 (module 4.3.3, llms.txt v2)

*Questions about the setup or multi-store configuration? Leave a comment below or open an issue on [GitHub](https://github.com/angeo-dev/module-llms-txt/issues).*

[image: Tutorial: generate llms.txt file for Magento 2 to improve AI search visibility in ChatGPT and LLMs]

## More on this topic

- [What Is llms.jsonl and Why Ecommerce Catalogs Need It](https://angeo.dev/what-is-llms-jsonl-and-why-ecommerce-needs-it/)
- [llms.txt for Magento 2: 6 Modules Compared (2026)](https://angeo.dev/llms-txt-magento-2-free-vs-paid-module-comparison/)
- [llms.txt for Magento 2  -  Free Module](https://angeo.dev/modules/llms-txt/)
- [Markdown Mirror - Definition](https://angeo.dev/markdown-mirror-definition/)
- [llms.txt v2: What the Spec Says, and What the Evidence Shows](https://angeo.dev/llms-txt-v2-spec-and-evidence/)
