# Generate llms.txt in package root
build_llm()
# Custom filename
build_llm(filename = "docs-for-llm.txt")Build LLM-Optimized Documentation
Source: R/build-llm.R
Generates a single text file containing all package documentation, optimized for consumption by Large Language Models (LLMs). This file can be used to provide context about your package to AI assistants.
The output includes:
-
Package metadata (name, title, description, version)
-
README content
-
Function reference documentation
-
Articles content
-
Changelog/NEWS
Usage
build_llm(pkg = ".", filename = "llms.txt", quiet = FALSE)Arguments
Value
Invisibly returns the path to the created file