The ultimate AI-powered generator for llms.txt
and llms-full.txt
files. Leveraging advanced AI capabilities to create the most comprehensive and AI-optimized documentation that helps language models understand your project with unprecedented clarity and depth.
AI understands AI best. Traditional documentation is written for humans, but AI models need structured, comprehensive information to truly understand your codebase. This tool leverages AI to generate documentation that:
- 🧠 Speaks AI's language - Uses patterns and structures that AI models process most effectively
- 🎯 Focuses on what matters - Highlights the information AI needs for accurate code understanding
- 📊 Maintains consistency - Ensures uniform documentation format across all projects
- ⚡ Saves time - Automatically generates comprehensive documentation without manual effort
- 📄 Generate
llms.txt
files for quick project navigation - 📚 Generate
llms-full.txt
files for comprehensive project understanding - 🤖 MCP server integration for seamless AI assistant workflows
- 🚀 Simple CLI interface with interactive setup
- 🔧 Flexible configuration supporting custom output paths and formats
# Initialize configuration file (creates llms-txt-generator.yaml)
npx llms-txt-generator init
# Build documentation files (requires configuration)
npx llms-txt-generator build
# Show help information
npx llms-txt-generator help
# Auto mode: checks for config file and runs accordingly
# - If llms-txt-generator.yaml exists: runs build
# - If no config file: runs init then build
npx llms-txt-generator
# Or if installed globally
llms-txt-generator init
llms-txt-generator build
llms-txt-generator # auto mode
-
init
: Interactive setup wizard to createllms-txt-generator.yaml
configuration -
build
: Generate documentation files based on existing configuration -
help
: Display usage information and available commands - No arguments: Smart mode that initializes if needed, then builds documentation
The generated llms.txt
file provides a concise navigation view of your project:
# Project Name
> Project introduction, briefly describing the purpose and functionality of the project.
## Core Documentation
- [Document Title](URL): Brief description
- [Document Title](URL): Brief description
## Optional Content
- [Resource Name](URL): Brief description
The llms-full.txt
file contains comprehensive documentation including:
- Detailed project overview
- Core features explanation
- Installation and usage instructions
- Complete project structure description
- Code examples and explanations
- Development requirements and commands
This file is designed to give AI models a thorough understanding of your project.
The llms-txt-generator includes a Model Context Protocol (MCP) server that allows AI assistants to generate documentation files directly.
Configure llms-txt-generator as an MCP tool in Cursor:
-
Add MCP Configuration: Add the following to your Cursor settings (
cursor-settings.json
):
{
"mcpServers": {
"llms-generator": {
"command": "npx",
"args": ["-y", "llms-txt-generator-mcp"]
}
}
}
-
Restart Cursor to load the new MCP configuration.
-
Use the Tool by asking your AI assistant:
Use the llms-generator MCP tool to create llms.txt and llms-full.txt for this project
For Claude Desktop, add to your claude_desktop_config.json
:
{
"mcpServers": {
"llms-generator": {
"command": "npx",
"args": ["-y", "llms-txt-generator-mcp"]
}
}
}
The MCP server provides this tool:
-
generate-llms
: Generate llms.txt and llms-full.txt files for the current project based on user requirements
# Basic generation
Generate llms.txt and llms-full.txt files for this project
# With specific requirements
Generate documentation files with these requirements:
1. Output to ./docs directory
2. Include comprehensive project details
3. Focus on TypeScript implementation
# Custom configuration
Create llms files with custom names: project-nav.txt and project-full.txt
- Node.js v18+
- pnpm (package manager)
- TypeScript knowledge
- Clone and Install:
git clone <repository-url>
cd llms-txt-generator
pnpm install
- Build the Project:
pnpm build
- Run Tests:
pnpm test
We welcome contributions! Please follow these guidelines:
- Fork the repository
-
Create a feature branch:
git checkout -b feature/amazing-feature
-
Follow the project rules in
.trae/project_rules.md
- Write tests for new functionality
-
Ensure all tests pass:
pnpm test
-
Lint your code:
pnpm lint
-
Format your code:
pnpm format
-
Commit with conventional commits:
feat: add amazing feature
-
Push to your branch:
git push origin feature/amazing-feature
- Create a Pull Request
- ✅ TypeScript: All code must be written in TypeScript
- ✅ Tests: New features require test coverage
- ✅ Documentation: Update README and JSDoc comments
- ✅ Linting: Code must pass ESLint checks
- ✅ Formatting: Use Prettier for consistent formatting
- ✅ Commits: Follow Conventional Commits specification
Q: "Module not found" error when using CLI
# Solution: Install globally or use npx
npm install -g llms-txt-generator
# Or use npx
npx llms-txt-generator init
Q: "Permission denied" when running CLI
# Solution: Make sure the binary is executable
chmod +x node_modules/.bin/llms-txt-generator
# Or reinstall the package
pnpm install llms-txt-generator
Q: "Configuration file not found"
# Solution: Run init command to create configuration
npx llms-txt-generator init
# Or copy from example
cp llms-txt-generator.example.yaml llms-txt-generator.yaml
Q: "TypeScript compilation errors"
# Solution: Check Node.js version and dependencies
node --version # Should be >= 18
pnpm install # Reinstall dependencies
Q: "MCP server connection issues"
# Solution: Check MCP server configuration
# Make sure the server path is correct in your MCP client
# Use full path: /path/to/node_modules/.bin/llms-txt-generator-mcp
See CHANGELOG.md for detailed version history.
MIT License - see LICENSE file for details.
Made with ❤️ for the AI development community