DEV Community

Making Retype Docs AI-Ready with llms.txt Automation

Keeping documentation updated is crucial, but making it easily digestible for AI is a separate challenge. The `retype_llms` tool addresses this by converting Markdown documentation into a single, AI-ready file named `llms.txt`. This GitHub Action and Python tool automates the process of consolidating content, removing confusing front-matter, and resolving image paths for AI consumption. It ensures that AI tools can accurately process documentation by maintaining context and preserving routing logic. The tool integrates seamlessly into existing workflows, either as a standalone Python script or as a GitHub Action. It can be added to a CI pipeline, even before the main Retype build process. Behind the scenes, `retype_llms` respects Retype's configuration to accurately reflect the documentation's structure and URL style. This automation saves significant manual effort in preparing documentation for AI summarization and search. The generated `llms.txt` file is lightweight and ensures that links and images are correctly handled. This makes your documentation instantly usable by AI tools without any manual export or cleanup.
favicon
dev.to
dev.to
Create attached notes ...