Polyglot document intelligence with a Rust core: extract text, metadata, images, tables, and structured data from 106 formats across 140 file extensions, plus code intelligence for 371 languages.
개요
Extract clean text, tables, and structured data from documents and code — no format detection, no OCR setup, no stitched-together libraries. Same document-intelligence engine, rebuilt and rebranded under a fresh v1 line. Documents · Images · Spreadsheets · Email · Archives · Code · Audio · Video Feed any document—get structured text. Extract, batch, stream, or crawl. 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. The CLI: 12 commands for extraction, caching, serving, and MCP. OCR with confidence scores and bounding boxes. Switch backends without code changes.
README
Xberg
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 any document—get structured text. Extract, batch, stream, or crawl.
What you get
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 96 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. |
Demos
The CLI: 12 commands for extraction, caching, serving, and MCP.
OCR with confidence scores and bounding boxes. Switch backends without code changes.
Web crawl: fetch a page, follow links, extract all documents recursively.
MCP server: AI agents extract documents, detect formats, warm models, manage cache.
REST API: stream large files, get JSON or Markdown, one endpoint for all formats.
Installation
Language Packages
CLI & Deployment
AI Coding Assistants
Install the Xberg plugin from xberg-io/plugins. Ships extraction APIs, OCR backends, configuration, and language conventions.
Quick Start
Extract text from a document:
use xberg::{extract, ExtractInput, ExtractionConfig};
#[tokio::main]
async fn main() -> xberg::Result {
let config = ExtractionConfig::default();
let output = extract(
ExtractInput::from_uri("document.pdf"),
&config
).await?;
println!("{}", output.results[0].content);
Ok(())
}
Common use cases — see Quick start guide for language-specific examples, OCR, batch processing, and API configuration.
Capabilities
CLI Reference
Documentation
Full guides, API references for every binding, format reference, and configuration docs live at xberg.io.
- Getting Started
- Quick Start
- Guides
- API Reference
- Format Reference
- Live Demo (browser, WASM)
Contributing
Contributions are welcome! See CONTRIBUTING.md for guidelines.
Join our Discord community for questions and discussion.
Part of Xberg.dev
Xberg is one of six open-source projects from Kreuzberg, Inc.:
- Xberg — document intelligence: text, tables, metadata from 91+ formats with optional OCR.
- Xberg Enterprise — managed extraction API with SDKs, dashboards, and observability.
- crawlberg — web crawling and scraping with HTML→Markdown and headless-Chrome fallback.
- html-to-markdown — fast, lossless HTML→Markdown engine.
- liter-llm — universal LLM API client with native bindings for 14 languages and 143 providers.
- tree-sitter-language-pack — tree-sitter grammars and code-intelligence primitives.
- alef — the polyglot binding generator that produces every per-language binding across the 5 polyglot repos.
License
MIT License (MIT) — see LICENSE for details.
설치
This server does not publish a one-line install command.
Open the repository installation guide설정
{
"mcpServers": {
"xberg": { "command": "xberg", "args": ["mcp"] }
}
}