LanternUI.Llms (LanternUI v0.9.0)

Copy Markdown View Source

Generates llms.txt (compact) and llms-full.txt (complete reference) from the component registry, docs, and recipes.

Both files are checked in at the package root, shipped in the Hex package, and linked from the README. Regenerate with mix lantern.llms; CI fails when the checked-in files are stale (mix lantern.llms --check).

The catalog and attribute tables come from LanternUI.__components__/0 plus Code.fetch_docs/1, so they cannot rot when components change. The HEEx blocks are extracted from docs/recipes.md and README.md — the same sources the lantern-recipes skill and the recipe tests use.

Summary

Functions

Check the files under root are fresh. Returns :ok or {:stale, paths}.

Generate %{short: binary, full: binary} from the registry under root.

Write llms.txt and llms-full.txt into root. Returns the paths.

Functions

check(root \\ File.cwd!())

Check the files under root are fresh. Returns :ok or {:stale, paths}.

generate(root \\ File.cwd!())

Generate %{short: binary, full: binary} from the registry under root.

write!(root \\ File.cwd!())

Write llms.txt and llms-full.txt into root. Returns the paths.