Create Persistent fyi.md File
Description
Generates package information and writes it to a markdown file for persistent LLM context in your project.
Usage
use_fyi_md(
package,
path = "fyi.md",
src_dir = NULL,
internals = TRUE,
options = TRUE,
exports = TRUE,
docs = FALSE,
pattern = NULL,
max_exports = NULL,
max_internals = NULL,
max_topics = NULL,
append = FALSE,
format = "default"
)
Arguments
package: Character. Package name.path: File path to write. Default “fyi.md” in current directory.src_dir: Optional path to source directory for options extraction.internals: Logical. Include internal functions? Default TRUE.options: Logical. Include option names? Default TRUE.exports: Logical. Include exported functions? Default TRUE.docs: Logical. Include full documentation? Default FALSE. Consider using use_fyi_docs() instead for individual doc files.pattern: Optional regex to filter exports/internals/topics.max_exports: Maximum number of exports to show. Default NULL (all).max_internals: Maximum number of internals to show. Default NULL (all).max_topics: Maximum number of doc topics to list. Default NULL (all).append: Logical. Append to existing file? Default FALSE (overwrite).
Value
The file path, invisibly.
Examples
# Create fyi.md for a package (summary only - recommended)
use_fyi_md("sttapi")
# Also generate individual doc files for on-demand reading
use_fyi_docs("sttapi")
# Custom path
use_fyi_md("sttapi", path = "docs/sttapi-context.md")
# For large packages, filter to reduce size
use_fyi_md("torch", pattern = "^nn_", internals = FALSE)
use_fyi_md("torch", max_exports = 100, max_internals = 0, max_topics = 100)
# Hugo format (YAML front matter)
use_fyi_md("sttapi", format = "hugo")