NPX package to generate LLMs.txt files using Firecrawl API
npm install generate-llmstxtA 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 content
- llms-full.txt: Contains the full text content
You can run this package using NPX without installing it. There are two ways to provide your Firecrawl API key:
``bash`
npx generate-llmstxt --api-key YOUR_FIRECRAWL_API_KEY
Create a .env file in your project root and add your API key:
`env`
FIRECRAWL_API_KEY=your_api_key_here
Then run the command without the --api-key option:
`bash`
npx generate-llmstxt
- -k, --api-key (optional if set in .env): Your Firecrawl API key-u, --url
- (optional): URL to analyze (default: https://example.com)-m, --max-urls
- (optional): Maximum number of URLs to analyze (default: 50)-o, --output-dir
- (optional): Output directory path (default: 'public')
`bashUsing command line argument with default output directory
npx generate-llmstxt -k your_api_key -u https://your-website.com -m 20
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'):
1.
llms.txt: Contains a summary of the LLM-related content
2. llms-full.txt`: Contains the full text contentMIT