> ## Documentation Index
> Fetch the complete documentation index at: https://smithers.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Ghost: scripts/generate-llms.ts

> Example from scripts/generate-llms.ts: a utility script that generates a family of llms-*.txt context files from MDX documentation pages.

# scripts/generate-llms.ts

<Note>
  **Ghost doc.** Real utility script at `scripts/generate-llms.ts`: an internal script that maintains the docs, not a smithers-orchestrator workflow example.
</Note>

## Source

The script is self-contained (\~300 lines): its own frontmatter parser, hardcoded manifest arrays, and `renderPage` helper, no external imports.

See [`scripts/generate-llms.ts`](https://github.com/smithersai/smithers/blob/main/scripts/generate-llms.ts) for the full source.

## Running

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
bun scripts/generate-llms.ts
```

## Key Details

* Follows the `llms.txt` convention: produces a family of text files for AI model context.
* Writes the current `llms-*.txt` bundle set plus version-pinned `llms-v<version>.txt` and `llms-full-v<version>.txt` artifacts for exact-release lookups.
* Page lists are hardcoded manifest arrays in the script; edit them to change each fragment's contents.
* Strips YAML frontmatter, converts MDX bodies to Markdown, and emits each section as `## title` + optional blockquote description + raw MDX body, separated by `---`.
