Llmstxt
convert `sitemap.xml` to `llms.txt`
Install / Use
/learn @dotenvx/LlmstxtREADME
llmstxt
<p align="center"> <br><br><br><br><br> <strong>sponsored by <a href="https://dotenvx.com">dotenvx</a></strong> <br><br><br><br><br> </p><p align="center"><br><img src="llmstxt.gif" width="500"><br></p>generate
llms.txt–using yoursitemap.xml. Allms.txtfile is a curated list of your website's pages in markdown format, perfect for training or fine-tuning language models with your content.
Quickstart 
$ npx -y llmstxt gen https://vercel.com/sitemap.xml
-
<details><summary>expand example</summary><br>
$ npx -y llmstxt gen https://vercel.com/sitemap.xml - [Vercel Documentation](https://vercel.com/docs): Vercel's Frontend Cloud gives developers frameworks, workflows, and infrastructure to build a faster, more personalized web - [Accounts on Vercel](https://vercel.com/docs/accounts): Learn how to manage your Vercel account and team members. - [Create a Team](https://vercel.com/docs/accounts/create-a-team): Teams on Vercel allow you to collaborate with members on projects, and grant you access to additional resources. Learn how to create or join a team on Vercel. - [Create an Account](https://vercel.com/docs/accounts/create-an-account): Learn how to create a Hobby team on Vercel and manage your login connections through your dashboard. - [Manage Emails](https://vercel.com/docs/accounts/manage-emails): Learn how to manage your email addresses on Vercel. - [Account Plans on Vercel](https://vercel.com/docs/accounts/plans): Learn about the different plans available on Vercel. - [Vercel Enterprise Plan](https://vercel.com/docs/accounts/plans/enterprise): Learn about the Enterprise plan for Vercel, including features, pricing, and more. ...
Basics
Basic usage
-
<details><summary>`gen https://yoursite.com/sitemap.xml`</summary><br>
Outputs to stdout.
</details>$ llmstxt gen https://vercel.com/sitemap.xml - [Vercel Documentation](https://vercel.com/docs): Vercel's Frontend Cloud gives developers frameworks, workflows, and infrastructure to build a faster, more personalized web - [Accounts on Vercel](https://vercel.com/docs/accounts): Learn how to manage your Vercel account and team members. - [Create a Team](https://vercel.com/docs/accounts/create-a-team): Teams on Vercel allow you to collaborate with members on projects, and grant you access to additional resources. Learn how to create or join a team on Vercel. - [Create an Account](https://vercel.com/docs/accounts/create-an-account): Learn how to create a Hobby team on Vercel and manage your login connections through your dashboard. - [Manage Emails](https://vercel.com/docs/accounts/manage-emails): Learn how to manage your email addresses on Vercel. - [Account Plans on Vercel](https://vercel.com/docs/accounts/plans): Learn about the different plans available on Vercel. - [Vercel Enterprise Plan](https://vercel.com/docs/accounts/plans/enterprise): Learn about the Enterprise plan for Vercel, including features, pricing, and more. ... -
<details><summary>`gen https://yoursite.com/sitemap.xml > llms.txt`</summary><br>
Write to file.
</details>$ llmstxt gen https://vercel.com/sitemap.xml > llms.txt
Advanced
Advanced options
-
<details><summary>`gen --exclude-path` - Exclude path(s)</summary><br>
Exclude paths from generation.
</details># exclude all blog posts $ llmstxt gen https://vercel.com/sitemap.xml --exclude-path "**/blog/**" # exclude all docs $ llmstxt gen https://vercel.com/sitemap.xml --exclude-path "**/docs/**" -
<details><summary>`gen --include-path` - Include path(s)</summary><br>
Include paths for generation.
</details># include all docs only $ llmstxt gen https://vercel.com/sitemap.xml --include-path "**/docs/**" # include all blogs only $ llmstxt gen https://vercel.com/sitemap.xml -ip "**/blog/**" -
<details><summary>`gen --replace-title s/pattern/replacement/` - Replace string(s) from title</summary><br>
Use
--replace-titleto remove redundant text from your page titles. For example, dotenvx's titles all end with| dotenvx. I want to replace those with empty string.
</details>$ llmstxt gen https://vercel.com/sitemap.xml --replace-title 's/\| dotenvx//' -
<details><summary>`gen --title 'Your Heading'` - set title</summary><br>
Set your website's heading 1 title.
</details>$ llmstxt gen https://vercel.com/sitemap.xml --title 'dotenvx' -
<details><summary>`gen --description 'Some description'` - set description</summary><br>
Set your website's description.
</details>$ llmstxt gen https://vercel.com/sitemap.xml --description 'This is a description'
FAQ
Can you give me a real world example?
I'm using it to generate dotenvx.com/llms.txt with the following command:
npx -y llmstxt@latest gen https://example.com/sitemap.xml -ep "**/privacy**" -ep "**/terms**" -ep "**/blog/**" -ep "**/stats/**" -ep "**/support/**" -rt 's/\| dotenvx//' -t 'dotenvx' > llms.txt
Related Skills
node-connect
339.1kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
83.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
339.1kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
83.8kCommit, push, and open a PR
