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:

Usage

build_llm(pkg = ".", filename = "llms.txt", quiet = FALSE)

Arguments

pkg

Path to package root

filename

Output filename (default: “llms.txt”)

quiet

Suppress messages

Value

Invisibly returns the path to the created file

Examples

# Generate llms.txt in package root
build_llm()

# Custom filename
build_llm(filename = "docs-for-llm.txt")