The fast, precise document-intelligence engine — for every language. Point Xberg at anything — a PDF, a scanned image, a spreadsheet, an audio file, a URL, a whole archive, or a source tree — and get back clean text, tables, metadata, and structured data.
> /plugin marketplace add xberg-io/xberg> /plugin install xberg@xberg
Repo: xberg-io/xberg
What's inside
The fast, precise document-intelligence engine — for every language.
Point Xberg at anything — a PDF, a scanned image, a spreadsheet, an audio file, a URL, a whole archive, or a source tree — and get back clean text, tables, metadata, and structured data. One engine handles format detection, reading, OCR, and extraction, so you never stitch a pipeline together from a dozen libraries.
101 formats · 115 file extensions · 371 code languages · 15 language bindings · 6 output formats · OCR · transcription · embeddings
The fastest, most precise open-source document and PDF-to-Markdown engine — see the benchmarks.
Install · What you get · Capabilities · CLI · Docs
Xberg is the next iteration of Kreuzberg. Same document-intelligence engine, rebuilt and rebranded under a fresh v1 line.
Point Xberg at anything — a PDF, a spreadsheet, a scanned image, an audio file, a URL, an archive, 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.
| Capability | What you get |
|---|---|
| 101 document formats | PDFs, Office, images, HTML, email, e-books, scientific publications, structured data across 115 file extensions — intelligent MIME detection, streaming for multi-GB files. |
| URLs & the web | Point Xberg at an http(s) URL — it fetches and extracts a single document, or crawls and follows links (Auto / Document / Crawl modes via the crawlberg engine). Requires the url-ingestion feature. |
| Audio & video transcription | Speech-to-text from MP3, M4A, WAV, WebM, and MP4 tracks via Whisper ONNX (tiny → large-v3). Requires the transcription feature. |
| Archives, traversed | List and recursively extract nested .zip, .tar, .gz, .7z — documents inside documents — guarded by zip-bomb, compression-ratio, and nesting-depth limits. |
| OCR on demand | Tesseract, PaddleOCR, Candle, or VLM backends — fallback chains, confidence scores, language auto-detection, extensible via plugins. |
| Layout & tables | ML layout models (PP-DocLayout-V3, RT-DETR) and table structure (TATR, SLANet) reconstruct reading order and cell grids for clean Markdown. |
| Code intelligence | Functions, classes, imports, symbols, docstrings from 371 programming languages. Syntax-aware chunking for RAG pipelines. |
| Embeddings & search | Local (ONNX) or provider-hosted embeddings (165 providers via liter-llm), sparse and late-interaction, cross-encoder reranking. |
| Enrichment | NER, keyword extraction (YAKE/RAKE), summarization, translation, redaction, page classification, QR detection, language detection, token reduction (TOON). |
| Structured extraction | Schema-driven JSON straight from any document via local (Ollama, LM Studio, vLLM) or hosted LLMs — no prompt engineering. |
| 6 output formats | Plain text, Markdown, Djot, HTML, JSON tree, or Structured (JSON with OCR metadata and bounding boxes). |
| Runs anywhere | Library, CLI (12 commands), REST API (xberg serve), MCP server, Docker, Helm — no GPU needed. Content-hash caching, parallel batch, per-file timeouts. |
Capabilities marked requires a feature are Cargo feature flags on the core crate (
url-ingestion,transcription,reranker, layout/ORT). Prebuilt language packages and the Docker image bundle the common set; a from-source build enables only what you select.
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/packages/go@latest
⚠️ The repository root is not a Go module —
go get github.com/xberg-io/xbergwill fail. Always target the/packages/gosubdirectory as shown above.
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, extract_with_ocr, semantic_search). 4 resources (formats, models, OCR languages, embedding presets).
Add to Claude Desktop or Cursor:
{
"mcpServers": {
"xberg": { "command": "xberg", "args": ["mcp"] }
}
}
Install the Xberg plugin from xberg-io/xberg. Ships extraction APIs, OCR backends, configuration, and language conventions.
/plugin marketplace add xberg-io/xberg
/plugin install xberg@xberg
/plugins add https://github.com/xberg-io/xberg
Search for xberg and select Install Plugin.
Settings → Plugins → Add from URL → https://github.com/xberg-io/xberg, then select xberg.
gemini extensions install https://github.com/xberg-io/xberg
droid plugin marketplace add https://github.com/xberg-io/xberg
droid plugin install xberg@xberg
copilot plugin marketplace add https://github.com/xberg-io/xberg
copilot plugin install xberg@xberg
Add to opencode.json:
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@xberg-io/opencode-xberg"]
}
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.
101 formats across 115 file extensions in 8 major categories with intelligent format detection and comprehensive metadata extraction.
| Category | Formats | Capabilities |
|---|---|---|
| Word Processing | .docx, .docm, .doc, .dotx, .dotm, .dot, .odt, .pages, .wpd, .wp, .wp5, .wp6 | Full text, tables, images, metadata, styles |
| Spreadsheets | .xlsx, .xlsm, .xlsb, .xls, .xla, .xlam, .xltm, .xltx, .xlt, .ods, .numbers | Sheet data, formulas, cell metadata, charts |
| Presentations | .pptx, .pptm, .ppt, .ppsx, .potx, .potm, .pot, .odp, .key | Slides, speaker notes, images, metadata |
.pdf | Text, tables, images, metadata, OCR support | |
| eBooks | .epub, .fb2 | Chapters, metadata, embedded resources |
| Database | .dbf | Table data extraction, field type support |
| Hangul | .hwp, .hwpx | Korean document format, text extraction |
| Category | Formats | Features |
|---|---|---|
| Raster | .png, .jpg, .jpeg, .gif, .webp, .bmp, .tiff, .tif | OCR, table detection, EXIF metadata, dimensions, color space |
| Advanced | .jp2, .jpx, .jpm, .mj2, .jbig2, .jb2, .pnm, .pbm, .pgm, .ppm | OCR via pure-Rust JPEG2000 decoder, JBIG2 support, table detection |
| HEIC family | .heic, .heics, .heif, .avif, .avcs | EXIF metadata, optional pixel decoding |
| Vector | .svg | DOM parsing, embedded text, graphics metadata |
| Category | Formats | Features |
|---|---|---|
| Audio | .mp3, .mpga, .m4a, .wav, .webm | Whisper transcription |
| Video audio track | .mp4, .mpeg, .webm | Audio-track transcription only |
| Category | Formats | Features |
|---|---|---|
| Markup | .html, .htm, .xhtml, .xml, .svg | DOM parsing, metadata (Open Graph, Twitter Card), link extraction |
| Structured Data | .json, .yaml, .yml, .toml, .csv, .tsv | Schema detection, nested structures, validation |
| Text & Markdown | .txt, .md, .markdown, .djot, .mdx, .rst, .org, .rtf | CommonMark, GFM, Djot, MDX, reStructuredText, Org Mode |
| Category | Formats | Features |
|---|---|---|
.eml, .msg, .pst | Headers, body (HTML/plain), attachments, threading | |
| Archives | .zip, .tar, .tgz, .gz, .7z | File listing, nested archives, metadata, recursive extraction |
| Category | Formats | Features |
|---|---|---|
| Citations | .bib, .ris, .nbib, .enw | Structured parsing: RIS, PubMed/MEDLINE, EndNote XML, BibTeX/BibLaTeX |
| Scientific | .tex, .latex, .typ, .typst, .jats, .ipynb | LaTeX, Typst, Jupyter notebooks, PubMed JATS |
| Publishing | .fb2, .docbook, .dbk, .docbook4, .docbook5, .opml | FictionBook, DocBook XML, OPML outlines |
Extract structure from 371 programming languages via tree-sitter:
| Feature | Description |
|---|---|
| Structure Extraction | Functions, classes, methods, structs, interfaces, enums |
| Import/Export Analysis | Module dependencies, re-exports, wildcard imports |
| Symbol Extraction | Variables, constants, type aliases, properties |
| Docstring Parsing | Google, NumPy, Sphinx, JSDoc, RustDoc, and 10+ formats |
| Syntax-Aware Chunking | Split code by semantic boundaries for RAG pipelines |
| Diagnostics | Parse errors with line/column positions |
Powered by tree-sitter-language-pack.
| Format | Use case | Example |
|---|---|---|
| Plain | Raw text, no markup | "Chapter 1\nIntroduction" |
| Markdown | Readable, structured, RAG-friendly | "# Chapter 1\n## Introduction" |
| Djot | Modern lightweight markup | Similar to Markdown but stricter |
| HTML | Styled, browser-ready | <h1>Chapter 1</h1> |
| JSON | Machine-readable tree structure | Hierarchical sections with heading levels |
| Structured | OCR metadata, bounding boxes | JSON with elements[] containing {text, bbox, confidence} |
| Mode | Command | Transport | Use case |
|---|---|---|---|
| Library | xberg::extract() | Async functions | Embed in your application |
| CLI | xberg extract document.pdf | 12 commands | Scripts, batch jobs, CI/CD |
| REST API | xberg serve | HTTP POST | Microservice, serverless deployment |
| MCP Server | xberg mcp | stdio or HTTP | Claude, Cursor, IDE agents |
| Docker | docker run ghcr.io/xberg-io/xberg | All modes | Container deployment |
Fallback chains. Extensible via plugin system.
Local (ONNX Runtime):
Provider-hosted:
Reranking:
Local engines: Ollama, LM Studio, vLLM
Remote: OpenAI, Anthropic, Google, Mistral, Cohere, and 165 providers via liter-llm
Schema validation. Temperature, top-p, frequency penalty tuning.
| Command | Subcommands | Purpose |
|---|---|---|
extract | — | Extract text from a single document (path, URL, or stdin) |
batch | — | Extract from multiple documents in parallel |
detect | — | Identify MIME type of a file |
formats | — | List all supported formats and MIME types |
version | — | Show Xberg version |
cache | stats, clear, manifest, warm | Manage extraction cache and models |
serve | — | Start REST API server (default: http://127.0.0.1:8000) |
mcp | — | Start MCP server (stdio or HTTP transport) |
api | schema | Output OpenAPI 3.1 specification |
embed | — | Generate embeddings for text (local or provider-hosted) |
chunk | — | Split text into chunks (text, markdown, YAML, or semantic) |
completions | — | Generate shell completion scripts |
Run xberg --help or xberg <command> --help for detailed options.
Full guides, API references for every binding, format reference, and configuration docs live at xberg.io.
Contributions are welcome! See CONTRIBUTING.md for guidelines.
Join our Discord community for questions and discussion.
Xberg is one of six open-source projects from Kreuzberg, Inc.:
MIT License (MIT) — see LICENSE for details.
.agents/
plugins/
marketplace.json
.ai-rulez/
.ai-rulez-generated.json
.generated-manifest.json
agents/
xberg-developer.md
config.toml
domains/
document-extraction/
agents/
extraction-engineer.md
DOMAIN.md
rules/
api-compatibility.md
async-and-concurrency.md
cache-and-performance.md
extraction-quality.md
extraction-safety.md
ocr-integration/
agents/
ocr-engineer.md
DOMAIN.md
rules/
ocr-backend-standards.md
ocr-language-and-config.md
ocr-performance.md
ocr-quality.md
ocr-table-and-hocr.md
plugin-system/
agents/
plugin-engineer.md
DOMAIN.md
rules/
plugin-extensibility.md
plugin-interface-contract.md
plugin-registry-and-selection.md
plugin-testing.md
python-ffi-plugins.md
ground-truth-generation.md
rules/
typescript-conventions.md
skills/
alef-generated-bindings/
SKILL.md
api-server-mcp/
SKILL.md
chunking-embeddings/
SKILL.md
config-loading-precedence/
SKILL.md
crate-structure/
SKILL.md
extraction-pipeline-patterns/
SKILL.md
feature-flag-policy/
SKILL.md
format-specific-extraction/
SKILL.md
mime-detection-routing/
SKILL.md
plugin-architecture-patterns/
SKILL.md
release-versioning/
SKILL.md
wasm-constraints/
SKILL.md
.cargo/
config.toml
.clang-format
.claude-plugin/
marketplace.json
.dockerignore
.editorconfig
.gh-actions-updater.toml
.gitattributes
.github/
actionlint.yaml
actions/
cache-benchmark-harness/
action.yml
cache-hf-fastembed/
action.yml
cache-pdfium/
action.yml
download-pdfium/
action.yml
install-system-deps/
action.yml
setup-layout-models/
action.yml
setup-onnx-runtime/
action.yml
setup-paddle-ocr-models/
action.yml
README.md
setup-prebuilt-onnx/
action.yml
setup-tesseract-cache/
action.yml
stage-pdfium-runtime/
action.yml
CODEOWNERS
documentation/
runners.md
ISSUE_TEMPLATE/
bug_report.yml
config.yml
documentation.yml
feature_request.yml
PULL_REQUEST_TEMPLATE.md
workflows/
benchmarks.yaml
ci-docker.yaml
ci-docs.yaml
ci-e2e.yaml
ci-gpu.yaml
ci-integrations.yaml
ci-lint.yaml
ci-mobile.yaml
ci-rust.yaml
profiling.yaml
publish-docker.yaml
publish-helm.yaml
publish-pubdev.yaml
publish.yaml
validate-issues.yml
validate-pr.yml
.gitignore
.gitmodules
.golangci.yml
.hadolint.yaml
.lychee.toml
.sdkmanrc
.shellcheckrc
.task/
config/
platforms.yml
vars.yml
languages/
csharp.yml
dart.yml
elixir.yml
go.yml
java.yml
kotlin_android.yml
node.yml
php.yml
python.yml
ruby.yml
rust.yml
swift.yml
zig.yml
tools/
demo.yml
docs.yml
fixtures.yml
general.yml
integrations.yml
pdfium.yml
plugin.yml
test-apps.yml
version-sync.yml
workflows/
benchmark.yml
.textlintrc.json
alef.toml
artifacthub-repo.yml
ATTRIBUTIONS.md
basemind.toml
Cargo.lock
Cargo.toml
CHANGELOG.md
charts/
xberg/
.helmignore
Chart.yaml
README.md
templates/
_helpers.tpl
deployment.yaml
hpa.yaml
ingress.yaml
pdb.yaml
pvc.yaml
service.yaml
serviceaccount.yaml
tests/
test-connection.yaml
values.schema.json
values.yaml
cli-proxy/
npm/
bin/
xberg.js
install.js
package.json
test.mjs
pypi/
__init__.py
hatch_build.py
pyproject.toml
README.md
xberg_cli/
__init__.py
cli.py
downloader.py
CODE_OF_CONDUCT.md
composer.json
composer.lock
config.m4
CONTRIBUTING.md
crates/
ttf-parser-compat/
Cargo.toml
src/
lib.rs
tests/
patch_engaged.rs
xberg/
xberg-candle-ocr/
Cargo.toml
README.md
src/
device.rs
download_guard.rs
error.rs
lib.rs
models/
deepseek_ocr/
config.rs
engine.rs
mod.rs
model.rs
processor.rs
utils.rs
glm_ocr/
connector.rs
decoder.rs
mod.rs
mtp.rs
preprocess.rs
tokenizer.rs
vision.rs
image_processor.rs
mod.rs
paddleocr_vl/
config.rs
engine.rs
mod.rs
model.rs
processor.rs
trocr.rs
vendor/
aha/
image.rs
mod.rs
modules.rs
qwen2.rs
rope.rs
mod.rs
tests/
deepseek_ocr_integration.rs
glm_ocr_integration.rs
glm_ocr_paired_pipeline.rs
paddleocr_vl_15_integration.rs
paddleocr_vl_integration.rs
trocr_integration.rs
xberg-cli/
build.rs
Cargo.toml
README.md
src/
commands/
cache.rs
chunk.rs
config.rs
doctor.rs
embed.rs
extract.rs
formats.rs
mod.rs
ner.rs
overrides.rs
server.rs
tree_sitter.rs
input.rs
logging.rs
main.rs
output.rs
peak_memory.rs
style.rs
tests/
cli_envelope_surface.rs
commands_test.rs
config_discovery_test.rs
config_env_overrides_test.rs
config_tests.rs
contract_cli.rs
e2e_config_test.rs
extract_envelope.rs
server_test.rs
xberg-ffi/
build.rs
Cargo.toml
cbindgen.toml
cmake/
xberg-ffi-config.cmake
include/
xberg.h
README.md
SCOPE-ISSUE-DRAFT.md
SCOPE.md
src/
cancellation.rs
config/
config_builder.rs
loader.rs
merge.rs
mod.rs
serialize.rs
lib.rs
tests/
email_attachment_data_len.rs
vtable_bytes_len.rs
xberg-gliner/
Cargo.toml
src/
candle/
decode.rs
encoder.rs
error.rs
heads/
count_lstm.rs
count_pred.rs
mod.rs
schema_gather.rs
scorer.rs
span_rep.rs
token_gather.rs
lora.rs
mod.rs
model.rs
pipeline.rs
streaming_load.rs
tests.rs
config.rs
decode.rs
engine.rs
error.rs
input.rs
lib.rs
preprocess.rs
session.rs
splitter.rs
tensor.rs
tests.rs
tokenizer.rs
v2/
decode.rs
engine.rs
mod.rs
preprocess.rs
session.rs
splitter.rs
tensor.rs
tokenizer.rs
tests/
candle_smoke.rs
candle_wasm_ner.rs
xberg-jni/
Cargo.toml
src/
lib.rs
xberg-libheif/
Cargo.toml
LICENSE
README.md
src/
color_profile.rs
context.rs
decoder.rs
encoder.rs
enums.rs
errors.rs
heif.rs
image_handle.rs
image.rs
integration/
image.rs
mod.rs
lib.rs
metadata.rs
reader.rs
regions.rs
security_limits.rs
track.rs
utils.rs
tests/
... 1600 moreShowing a partial view of a very large repo.
FAQ
xberg is a Claude Code plugin with 7 hand-picked skills for data work, indexed on Flowy. Install it with the command on its page. It includes batch-extraction, chunking, extracting-keywords. Its skills do not fire on their own yet. Request auto-invocation to have Flowy route them as you prompt. Free and open source.