use_fyi_md

Create Persistent fyi.md File

Description

Generates package information and writes it to a markdown file for persistent LLM context in your project.

Usage

 1use_fyi_md(
 2  package,
 3  path = "fyi.md",
 4  src_dir = NULL,
 5  internals = TRUE,
 6  options = TRUE,
 7  exports = TRUE,
 8  docs = FALSE,
 9  pattern = NULL,
10  max_exports = NULL,
11  max_internals = NULL,
12  max_topics = NULL,
13  append = FALSE,
14  format = "default"
15)

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

 1# Create fyi.md for a package (summary only - recommended)
 2use_fyi_md("sttapi")
 3
 4# Also generate individual doc files for on-demand reading
 5use_fyi_docs("sttapi")
 6
 7# Custom path
 8use_fyi_md("sttapi", path = "docs/sttapi-context.md")
 9
10# For large packages, filter to reduce size
11use_fyi_md("torch", pattern = "^nn_", internals = FALSE)
12use_fyi_md("torch", max_exports = 100, max_internals = 0, max_topics = 100)
13
14# Hugo format (YAML front matter)
15use_fyi_md("sttapi", format = "hugo")