LLM Support Plugin
The llms plugin generates a standardized /llms.txt file at the root of your site. This file is becoming a standard for helping AI agents (like ChatGPT, Claude, or Cursor) discover and read your documentation context efficiently.
Installation
This plugin is included in @docmd/core but must be enabled in your config.
Configuration
Add llms to your docmd.config.js:
module.exports = {
siteUrl: 'https://mysite.com', // REQUIRED
plugins: {
llms: {} // Enable with default settings
}
};
Options
Currently, the plugin uses your existing siteTitle, description, and page frontmatter to generate the file.
Excluding Pages
To prevent a specific page from appearing in the AI context file, add this to the frontmatter:
---
title: "Internal Draft"
llms: false
---
Output Example
The generated llms.txt will look like this:
# My Project Documentation
> Generated by docmd
This is the main description of my project.
## Documentation Files
- [Installation](https://mysite.com/install)
How to install the CLI.
- [Configuration](https://mysite.com/config)
Reference for config.js options.