@cssdoc/llms
v0.14.2
Published
Emit an llms.txt-style, token-efficient digest of the cssdoc model for LLM context windows.
Maintainers
Readme
@cssdoc/llms
Render the @cssdoc/core model to an llms.txt-style
digest — a flat, deterministic, token-efficient Markdown summary of every component's surface, sized for
an LLM's context window. One compact block per record; empty facets are omitted.
Usage
import { writeLlms } from "@cssdoc/llms";
import { readFileSync } from "node:fs";
writeLlms({
css: readFileSync("dist/components.css", "utf8"),
outFile: "llms.txt",
title: "My CSS",
intro: "Class-based component styles.",
});renderLlms(entries, opts) returns the string. Example block:
## button — `.button`
The primary action control.
- Modifiers: `-color-secondary` (A lower-emphasis action.), `-variant-old` (deprecated → `-color-secondary`)
- Parts: `.icon` (A leading glyph.)
- States: `loading`License
MIT
