build_llm

< Back to Reference | View source

build_llm()

Build LLM-Optimized Documentation

Usage

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

Arguments

Argument Description
pkg Path to package root
filename Output filename (default: “llms.txt”)
quiet Suppress messages

Value

Invisibly returns the path to the created file

Description

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

Examples

## Not run: 
# Generate llms.txt in package root
build_llm()

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

## End(Not run)