LLMs.txt API
Generate LLMs.txt with NPX
Generate LLMs.txt files from any website using our NPX package
generate-llmstxt
A simple NPX package that generates LLMs.txt files using the Firecrawl API. This package creates two files in your specified output directory (defaults to ‘public’ folder):
llms.txt
: Contains a summary of the LLM-related contentllms-full.txt
: Contains the full text content
Usage
You can run this package using NPX without installing it. There are two ways to provide your Firecrawl API key:
1. Using Command Line Arguments
2. Using Environment Variables
Create a .env
file in your project root and add your API key:
Then run the command without the —api-key option:
Options
-k, --api-key <key>
(optional if set in .env): Your Firecrawl API key-u, --url <url>
(optional): URL to analyze (default: https://example.com)-m, --max-urls <number>
(optional): Maximum number of URLs to analyze (default: 50)-o, --output-dir <path>
(optional): Output directory path (default: ‘public’)
Examples
Requirements
- Node.js 14 or higher
- A valid Firecrawl API key (via command line or .env file)
Output
The package will create two files in your specified output directory (defaults to ‘public’):
llms.txt
: Contains a summary of the LLM-related contentllms-full.txt
: Contains the full text content
License
MIT