Skip to main content

scripts/generate-llms.ts

Ghost doc. Real utility script at scripts/generate-llms.ts.This is an internal script used to maintain the docs, not a smithers-orchestrator workflow example.

Source

The script is self-contained (~300 lines). It defines its own frontmatter parser, hardcoded manifest arrays, and a renderPage helper. No external helper module is imported. See scripts/generate-llms.ts for the full source.

Running

bun scripts/generate-llms.ts

Key Details

  • Follows the llms.txt convention: produces a family of text files for AI model context.
  • Writes 9 files: llms-core.txt, llms-memory.txt, llms-openapi.txt, llms-observability.txt, llms-effect.txt, llms-integrations.txt, llms-events.txt, llms-full.txt (concatenation of all fragments), and llms.txt (index).
  • Pages are listed in hardcoded manifest arrays inside the script; edit the manifests to change what each fragment contains.
  • Strips YAML frontmatter; converts MDX bodies to Markdown. Each section is emitted as ## title + optional blockquote description + raw MDX body, separated by ---.