oidlabs-com/lexoid/lexoid-cli
Claude Code and agent skill by oidlabs-com/lexoid
- community
Checking that the SKILL.md file is still in the repository.
Parse and convert documents (PDFs, images, web pages, DOCX/XLSX/PPTX, audio) from the terminal using the `lexoid` CLI. Use when the user wants to extract markdown / JSON / LaTeX from a file or URL without writing Python, run schema-based structured extraction, or batch-parse from shell scripts. Triggers include "parse this PDF", "convert document to markdown", "extract JSON from PDF", "convert PDF to LaTeX", "use lexoid CLI", or any pipe/shell-style document-processing request.
Install
npx vskill@latest install oidlabs-com/lexoid/lexoid-cliSKILL.md
Lexoid CLI
Lexoid ships a lexoid console script (also runnable as python -m lexoid) for document parsing without writing Python. There are three sub-commands: parse, schema, and latex.
When to use this skill
- The user has a document (PDF, image, HTML, DOCX, XLSX, PPTX, CSV, TXT, audio) or a URL and wants it converted to markdown/JSON/LaTeX.
- The user wants structured extraction (JSON conforming to a schema) from the shell.
- The task is one-off or scripted — no need to build a Python integration.
If the user wants to embed parsing into a Python application or library, use the lexoid-python skill instead.
Setup checks
Before invoking, confirm:
lexoidis installed (lexoid --helporpython -m lexoid --help). If not, runpip install lexoid.- For LLM-based commands, the relevant API key env var is set:
GOOGLE_API_KEY(Gemini, default),OPENAI_API_KEY,ANTHROPIC_API_KEY,MISTRAL_API_KEY,HUGGINGFACEHUB_API_TOKEN,TOGETHER_API_KEY,OPENROUTER_API_KEY,FIREWORKS_API_KEY.- Ollama needs no key, but needs
ollama serverunning atOLLAMA_BASE_URL(defaulthttp://localhost:11434) and the target model pulled (ollama pull <model>). - Local backends (SmolDocling/granite-docling, PaddleOCR-VL) need no key and no server — they run in-process; the first call downloads weights from Hugging Face.
- For Linux DOCX → PDF, LibreOffice (
lowriter) must be installed.
Loading API keys from .env
API keys are commonly stored in a .env file at the project root rather than exported in the shell. The lexoid CLI does not auto-load .env, so for any LLM-based command (LLM_PARSE, schema, latex, or AUTO when it routes to an LLM) you must load it yourself.
Always load `.env` in a subshell so the keys never leak into the surrounding environment — the parentheses scope the exports to that one command, restoring the environment to its previous state automatically afterward. Guard the source with [ -f .env ] so the command still runs (using already-exported keys) when no .env is present:
Do not run a bare set -a; . ./.env; set +a in the parent shell — that persists secrets into the session.
The examples in the rest of this skill are written as plain `lexoid …` for readability. Apply the wrapper above to any LLM-based command (LLM_PARSE, schema, latex, or AUTO when it routes to an LLM). If your keys are already exported in the environment, run the commands as-is.
Commands
lexoid parse — Markdown / JSON output
Convert a document to markdown (default) or JSON (with segments, token usage, parser info).
Key flags: --parser-type (AUTO/LLM_PARSE/STATIC_PARSE), --model, --framework (pdfplumber/paddleocr), --api (override provider), --format (markdown/json), --pages-per-split, --max-processes, --verbose.
lexoid schema — Structured extraction
Extract data conforming to a JSON schema. Schema can be a file path or inline JSON.
All schema commands are LLM-based — load .env first (see "Loading API keys from .env") unless keys are already exported.
Defaults: model gpt-4o-mini. The provider is auto-detected from the model name unless --api is given.
lexoid latex — LaTeX conversion
Convert a document to a self-contained LaTeX source.
LaTeX conversion is LLM-based — load .env first (see "Loading API keys from .env") unless keys are already exported.
Output piping
When no --output is given, only the parsed content is written to stdout; status messages, token usage, and parser info go to stderr. This means standard piping works:
Common patterns
- Default to `AUTO`: with no
--parser-type, the CLI usesAUTO, which inspects the document and routes to the best parser (often an LLM for scans, charts, or complex tables). This is the right choice unless the user asks otherwise. - `STATIC_PARSE` is opt-in, not the default: choose it when the user explicitly wants no API calls / no cost, or you know the input is a clean native-text PDF. It returns empty output on scanned/image-only pages, so it is not a safe first guess for unknown documents.
- `LLM_PARSE` for quality: force it with
--parser-type LLM_PARSE --model <model>for scans, chart/figure-heavy pages, or messy tables where layout fidelity matters. - Scanned PDFs / images: use
--parser-type STATIC_PARSE --framework paddleocr(no API key) or an LLM model with vision. - Batch: drive the CLI from a shell loop (
for f in inputs/*.pdf; do lexoid parse -i "$f" -o "out/${f%.pdf}.md"; done). - Debug: add
--verboseto surface loguru logs to stderr.
Failure modes to watch for
- Missing API key → CLI raises a clean error naming the env var. The CLI does not auto-load
.env; load it via the subshell wrapper (see "Loading API keys from .env") and retry. - DOCX on Linux without LibreOffice installed → conversion to PDF fails. Install
libreoffice. --modeland--apimismatch → use--apionly to override an auto-inferred provider (e.g., to send a model through OpenRouter).- Ollama: must run
ollama serveandollama pull <model>first; the CLI does not start the server.
See also
- Full reference:
docs/cli.rstanddocs/api.rstin this repo. - Python equivalent:
lexoid-pythonskill.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/lexoid-cli/SKILL.md
Popularity
- Repository stars
- 108
- Repository forks
- 14
- 7-day trend score
- 23
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/oidlabs-com/lexoid/lexoid-cli)