| name | liteparse |
| description | Use this skill when the user asks to parse, perform multi-format document conversion or spatially extract text from an unstructured file (PDF, DOCX, PPTX, XLSX, images, etc.) locally without cloud dependencies. |
| compatibility | Requires Node 18+ and `@llamaindex/liteparse` installed globally via npm (`npm i -g @llamaindex/liteparse`) |
| license | MIT |
| metadata | {"author":"LlamaIndex","version":"0.1.0"} |
LiteParse Skill
Parse unstructured documents (PDF, DOCX, PPTX, XLSX, images, and more) locally with LiteParse: fast, lightweight, no cloud dependencies or LLM required.
Step 0 — Install LiteParse (if needed)
If liteparse is not yet installed, install it globally:
npm i -g @llamaindex/liteparse
Verify installation:
lit --version
For Office document support (DOCX, PPTX, XLSX), LibreOffice is required:
brew install --cask libreoffice
apt-get install libreoffice
For image parsing, ImageMagick is required:
brew install imagemagick
apt-get install imagemagick
Step 1 — Produce the CLI Command or Script
Parse a Single File
lit parse document.pdf
lit parse document.pdf --format json -o output.json
lit parse document.pdf --target-pages "1-5,10,15-20"
lit parse document.pdf --no-ocr
lit parse document.pdf --dpi 300
Batch Parse a Directory
lit batch-parse ./input-directory ./output-directory
lit batch-parse ./input ./output --extension .pdf --recursive
Generate Page Screenshots
lit screenshot document.pdf -o ./screenshots
lit screenshot document.pdf --pages "1,3,5" -o ./screenshots
Key Options Reference
OCR Options
| Option | Description |
|---|
| (default) | Tesseract.js — zero setup, built-in |
--ocr-language fra | Set OCR language (ISO code) |
--ocr-server-url <url> | Use external HTTP OCR server |
--no-ocr | Disable OCR entirely |
Output Options
| Option | Description |
|---|
--format json | Structured JSON with bounding boxes |
--format text | Plain text (default) |
-o <path> | Save output to file |
Performance / Quality Options
| Option | Description |
|---|
--dpi <n> | Rendering DPI (default: 150; use 300 for high quality) |
--max-pages <n> | Limit pages parsed |
--target-pages <ranges> | Parse specific pages (e.g. "1-5,10") |
--no-precise-bbox | Disable precise bounding boxes (faster) |
--preserve-small-text | Keep very small text that would otherwise be dropped |
Supported Input Formats
| Category | Formats |
|---|
| PDF | .pdf |
| Word | .doc, .docx, .docm, .odt, .rtf |
| PowerPoint | .ppt, .pptx, .pptm, .odp |
| Spreadsheets | .xls, .xlsx, .xlsm, .ods, .csv, .tsv |
| Images | .jpg, .jpeg, .png, .gif, .bmp, .tiff, .webp, .svg |
Office documents require LibreOffice; images require ImageMagick. LiteParse auto-converts these formats to PDF before parsing.