valibot icon indicating copy to clipboard operation
valibot copied to clipboard

RFC: feat: add llms.txt generation

Open muningis opened this issue 8 months ago • 5 comments

This adds generation of llms.txt, which is used there and there by various libraries, to expose API, documentationn, and information in format, which is easier to be consumed by LLMS. Not yet de-facto standard. Before merging however, would probably be good to agree on a format.

Right now it just strips frontmatter (subject to change/discussion) MDX's imports and trims empty space at start and end of each Markdown file. As a minimum, probably, worth to include description from frontmatter in each section. (Using some AST manipulation would be much more effecient though probably)


More here :https://llmstxt.org/ Example in the wild: https://hono.dev/llms-full.txt, https://sdk.vercel.ai/llms.txt

muningis avatar Mar 22 '25 16:03 muningis

@muningis is attempting to deploy a commit to the Valibot Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Mar 22 '25 16:03 vercel[bot]

Thank you so much for this contribution! I will try to review it this week and provide feedback.

fabian-hiller avatar Mar 25 '25 04:03 fabian-hiller

Open in StackBlitz

npm i https://pkg.pr.new/valibot@1098

commit: 6763476

pkg-pr-new[bot] avatar Mar 25 '25 04:03 pkg-pr-new[bot]

Sorry for the delay. I will get back to this PR as soon as possible, but it may take one or two weeks.

fabian-hiller avatar Apr 01 '25 03:04 fabian-hiller

I plan to review this PR in the next few days.

fabian-hiller avatar Apr 28 '25 00:04 fabian-hiller

I will take over this PR and try to finalize it in the next few days

fabian-hiller avatar Jun 06 '25 02:06 fabian-hiller

The llms.ts script is ready! 🔥 Next, I will add a llms.txt guide to our dosc.

fabian-hiller avatar Jun 08 '25 01:06 fabian-hiller

I've merged it, but feel free to review my script if you're interested.

fabian-hiller avatar Jun 08 '25 04:06 fabian-hiller