loomer
v0.1.2
Published
Merge multiple files into one AI-optimized document.
Maintainers
Readme
Loomer
Merge multiple files into one AI-friendly document. Loomer normalizes structure across Markdown, HTML, JSON, YAML, and plain text so models can see context in a single pass.
Installation
Using npx (no installation required)
npx loomer merge notes.md data.json --out merged.mdGlobal installation
npm install -g loomer
loomer merge notes.md data.json --out merged.mdLocal installation
npm install loomer
npx loomer merge notes.md data.json --out merged.mdUsage
Merge files in order and write the output:
loomer merge notes.md data.json --out merged.mdNo --out? Loomer writes merged.md in the current directory by default.
Merge everything in a folder (recursive, supported file types only):
loomer merge docs/ --out combined.txtMerge as plain text:
loomer merge a.txt b.yaml --format textRender as HTML:
loomer merge docs/ --format html --out merged.htmlEvery merged file is prefixed with its path for clarity:
---
/public/article.md
---
<file contents...>Inspect how Loomer sees a file:
loomer inspect README.mdShow version:
loomer versionOptions
--outto write to a file (otherwise prints to stdout)--formatchoosemarkdown,text,html, orjson(defaults tomarkdownor derived from--out)--metadatainclude parsed metadata in the merged output--optimizeenable text optimization (collapse excess whitespace, normalize indentation; code fences are preserved)
Development
Requirements
- Bun >= 1.0
Setup
git clone https://github.com/minagishl/loomer.git
cd loomer
bun installBuild
bun run buildRun locally
bun run devTests
bun testLinting and Formatting
bun run lint # Check for linting errors
bun run lint:fix # Fix linting errors
bun run format # Check code formatting
bun run format:write # Fix code formattingProject Structure
src/coreparsers, normalization, mergersrc/cliCLI wiring for merge/inspect/version commandssrc/utilsshared helperssrc/index.tsCLI entrypoint
License
This project is licensed under the MIT License - see the LICENSE file for details.
