Loading repository data…
Loading repository data…
xberg-io / repository
A polyglot document intelligence framework with a Rust core. Extract text, metadata, images, and structured information from PDFs, Office documents, images, and 97+ formats. Available for Rust, Python, Ruby, Java, Go, PHP, Elixir, C#, R, C, TypeScript (Node/Bun/Wasm/Deno)- or use via CLI, REST API, or MCP server.
Extract clean text, tables, and structured data from documents and code — no format detection, no OCR setup, no stitched-together libraries. One engine, 15 language bindings, runs anywhere.
Xberg is the next iteration of Kreuzberg. Same document-intelligence engine, rebuilt and rebranded under a fresh v1 line.
Feed documents → get clean text, tables, metadata, transcripts, code intelligence · Run it library, CLI, REST API, or MCP server · No GPU needed · Stream multi-GB files · Cache results.
Documents · Images · Spreadsheets · Email · Archives · Code · Audio · Video
Quick start · What you get · Capabilities · CLI · Docs
Point Xberg at anything — a PDF, a spreadsheet, a scanned image, an audio file, a source tree — and get back clean, structured content you can use right away. One core does the format detection, reading, and extraction, so you don't assemble a pipeline yourself. Call it from Rust, Python, Node.js, Go, Java, C#, Ruby, PHP, Elixir, Dart, Swift, Zig, WASM, Kotlin, or C FFI, and run it as a library, CLI tool, REST API, or MCP server.
| What it does | How |
|---|---|
| Extract from 97 formats | PDFs, Office, images, HTML, email, archives, scientific publications, and code — intelligent MIME detection, streaming for large files. |
| 6 output formats | Plain text, Markdown, Djot, HTML, JSON tree structure, or Structured (JSON with OCR metadata and bounding boxes). |
| Code intelligence | Functions, classes, imports, symbols, docstrings from 306 programming languages. Syntax-aware chunking for RAG pipelines. |
| Crawl & recurse | Follow URLs, extract documents from within documents (nested archives, embedded PDFs). Auto/Document/Crawl modes. |
| OCR on demand | Tesseract, PaddleOCR, Candle, or VLM backends — fallback chains, extensible via plugins. Confidence scores. Language auto-detection. |
| Transcription | Whisper ONNX for audio/video tracks (MP3, M4A, WAV, WebM, MP4). |
| Embeddings & search | Local (ONNX models) or provider-hosted (OpenAI, Anthropic, Google, 143 providers via liter-llm). Reranking. |
| Structured outputs | LLM-powered extraction — local (Ollama, LM Studio, vLLM) or remote (OpenAI, Anthropic, Google). |
| Enrichment | NER, redaction, summarization, translation, QR code detection, page classification, keyword extraction (YAKE/RAKE), language detection, layout detection, table extraction, token reduction (TOON). |
| Batch & parallel | Process 100s of documents in parallel. Per-file timeouts. Configurable batch concurrency (max_concurrent_extractions). |
| Caching | Content-hash cache keys — skip re-extraction when the file and config are unchanged. |
| Deployment | Library, CLI (12 commands), REST API (xberg serve), MCP server (9 tools, 3 prompts, 4 resources), Docker. |
pip install xberg
See Python README for full documentation.
npm install @xberg-io/xberg
See Node.js README for full documentation.
cargo add xberg
See Rust README for full documentation.
go get github.com/xberg-io/xberg
See Go README for full documentation.
Available on Maven Central as io.xberg:xberg. See Java README for the dependency snippet.
dotnet add package Xberg
See C# README for full documentation.
gem install xberg
See Ruby README for full documentation.
composer require xberg-io/xberg
See PHP README for full documentation.
Add {:xberg, "~> 1.0"} to your mix.exs dependencies. See Elixir README for full documentation.
npm install @xberg-io/xberg-wasm
See WebAssembly README for full documentation.
Available on Maven Central as io.xberg:xberg-android. See Kotlin README for the dependency snippet.
Add via Swift Package Manager. See Swift README for full documentation.
dart pub add xberg
See Dart README for full documentation.
Add via zig fetch. See Zig README for full documentation.
Build from source as part of this workspace. See C (FFI) README for full documentation.
brew install xberg-io/tap/xberg
12 commands: extract, batch, detect, formats, version, cache (stats/clear/manifest/warm), serve, mcp, api, embed, chunk, completions.
See CLI usage guide for detailed documentation.
docker pull ghcr.io/xberg-io/xberg:latest
Run in API, CLI, or MCP modes. See Docker guide for examples.
xberg serve --host 0.0.0.0 --port 8000
One POST endpoint handles all formats. Returns JSON or Markdown. Stream large files. See API server guide.
xberg mcp --transport stdio
9 tools (extract, extract_batch, detect_mime_type, cache_stats, list_formats, cache_clear, get_version, cache_manifest, cache_warm). 3 prompts (extract_document, ex