fyi

Get Complete Package Information for LLMs

Description

The main function - returns everything an LLM needs to understand a package, including exports, internals, options, and optionally full documentation.

Usage

fyi(
  package,
  src_dir = NULL,
  internals = TRUE,
  options = TRUE,
  exports = TRUE,
  docs = FALSE,
  pattern = NULL,
  max_exports = NULL,
  max_internals = NULL,
  max_topics = NULL
)

Arguments

  • package: Character. Package name.
  • 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 (can be verbose).
  • 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).

Value

Character string of markdown, invisibly. Also prints to console.

Examples

fyi("sttapi")
fyi("llamaR", internals = TRUE, options = FALSE)
fyi("sttapi", docs = TRUE)  # Include full help docs

# For large packages like torch, filter to reduce size
fyi("torch", pattern = "^nn_", internals = FALSE)
fyi("torch", max_exports = 50, max_internals = 0, max_topics = 50)