liffy
v0.1.0
Published
Split llms-full.txt into individual markdown files
Maintainers
Readme
liffy
liffy turns a monolithic llms-full.txt into a tree of leaves — small, searchable files you can assemble into LLM context with standard Unix tools.
Requirements: Node.js >= 20.
Install
npm install -g liffy
# or one-off
npx liffy --helpQuickstart
liffy https://vercel.com/docs/llms-full.txt
tree -L 3 liffy/vercel.comliffy/
└── vercel.com
├── index.json
├── api/
│ ├── auth.md
│ ├── files.md
│ └── rate-limits.md
├── concepts/
│ ├── context.md
│ ├── rag.md
│ └── tasks.md
└── examples/
├── file-upload.md
└── sdk.mdEach file is a leaf — a small, self-contained piece of the original document, split along its natural section boundaries.
Now you can use standard Unix tools to build exactly the context you need.
# Find anything related to rate limits
rg "rate" liffy/vercel.com/docs
# Collect all API-related docs
fd . liffy/vercel.com/docs/api | xargs cat
# Build a context for "file upload"
rg -l "file upload" liffy/vercel.com/docs | xargs cat > context.txtPipe that directly into your LLM:
cat context.txt | llm "Summarize how file uploads work in this API"No embeddings. No vector store. Just files, trees, and pipes.
Usage
liffy <input> [output-dir]
liffy split <input> [output-dir]
liffy list [output-dir]
liffy remove <files...>
liffy rm <files...>
liffy clean [output-dir]Options:
--debug,-dshow split diagnostics and flattening info--help,-hshow help--version,-vshow version
Output layout
- URL input defaults to
liffy/<host>(for example,liffy/vercel.com). - File input defaults to the current directory unless
output-diris given. - Output file paths are derived from each page URL (strip leading/trailing slashes and
.md/.html). - If all pages share one top-level directory (for example,
docs/), liffy flattens it for URL inputs (shown in--debug). index.jsonis written alongside the output and contains a tree plussource(andnamefor URL inputs).
Split patterns
liffy detects common llms-full formats automatically:
- Pattern A:
# Titlefollowed bySource: https://... - Pattern B:
<page>...</page>with frontmatter containingsource_url - Pattern C:
# Title, blank line, thenURL: https://... - Pattern D: Vercel-style dash-separated blocks with
title:andsource:
Code blocks are ignored when detecting boundaries.
Integration hints
When output is inside liffy/, liffy maintains liffy/AGENTS.md and may offer to update:
.gitignoreto ignoreliffy/tsconfig.jsonto excludeliffyAGENTS.mdto add a liffy section
In TTY, you get a y/n prompt; in non-interactive runs it prints hints only. Consent is stored in liffy/.liffy.json.
liffy lets you treat your LLM documentation the way Unix always wanted you to:
as a living, searchable filesystem of knowledge.
